消息中心页面开发
This commit is contained in:
44
pages/user/policyDetail.vue
Normal file
44
pages/user/policyDetail.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user