|
|
|
@ -1,19 +1,20 @@ |
|
|
|
|
<template> |
|
|
|
|
<view> |
|
|
|
|
<!-- <view class="con">{{ content }}</view> --> |
|
|
|
|
<view class="con" v-html="content"> |
|
|
|
|
<!-- <rich-text style="white-space: normal;" :nodes="content"></rich-text> --> |
|
|
|
|
<view class="con" > |
|
|
|
|
<rich-text style="white-space: normal;" :nodes="content"></rich-text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as help from '@/api/help' |
|
|
|
|
export default { |
|
|
|
|
import * as help from '@/api/help' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
pageFlag: 1, |
|
|
|
|
content: '' |
|
|
|
|
content: '', |
|
|
|
|
uniqueKey: 0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
@ -26,7 +27,15 @@ export default { |
|
|
|
|
title: that.pageFlag == 1 ? '用户服务协议' : that.pageFlag == 2 ? '隐私政策' : '关于我们' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
richContent() { |
|
|
|
|
this.uniqueKey = this.generateUniqueKey(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
generateUniqueKey() { |
|
|
|
|
return Date.now() + Math.random(); |
|
|
|
|
}, |
|
|
|
|
async getTextData() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: "加载中" |
|
|
|
@ -35,24 +44,27 @@ export default { |
|
|
|
|
let { |
|
|
|
|
status, |
|
|
|
|
data |
|
|
|
|
} = await help.getAgreement({ type: typeVal }); |
|
|
|
|
} = await help.getAgreement({ |
|
|
|
|
type: typeVal |
|
|
|
|
}); |
|
|
|
|
if (status == 200) { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.content = data.detail.content |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
|
|
.con { |
|
|
|
|
.con { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
padding: 20rpx 40rpx; |
|
|
|
|
line-height: 28px; |
|
|
|
|
span{ |
|
|
|
|
|
|
|
|
|
span { |
|
|
|
|
white-space: normal !important |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |