45 lines
823 B
Vue
45 lines
823 B
Vue
|
|
<template>
|
||
|
|
<view class="policy-content">
|
||
|
|
<view v-html="strings"></view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import {getPolicyDetail} from '@/api/newIndex.js'
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
strings:'',
|
||
|
|
contentShow:false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onLoad(option) {
|
||
|
|
console.log('1111111111')
|
||
|
|
getPolicyDetail (option.id).then(res => {
|
||
|
|
let htmlString = res.data.data.guidelineContent
|
||
|
|
this.strings = htmlString.replace(/width=\"\d+\" height=\"\d+\"/g, 'width="100%" height="auto"');
|
||
|
|
})
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
percent2percent25 (URI) {
|
||
|
|
if(URI.indexOf('%') > -1) {
|
||
|
|
return URI.replace(/%/g,'%25')
|
||
|
|
}else{
|
||
|
|
return URI;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style>
|
||
|
|
page{
|
||
|
|
padding: 20px 20px 20px 20px;
|
||
|
|
overflow: auto;
|
||
|
|
}
|
||
|
|
.policy-content>img {
|
||
|
|
width: 100% !important;
|
||
|
|
height: auto !important;
|
||
|
|
}
|
||
|
|
</style>
|