|
|
|
@ -1,8 +1,8 @@ |
|
|
|
|
<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> |
|
|
|
@ -13,7 +13,8 @@ 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,22 +44,25 @@ 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 { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
padding: 20rpx 40rpx; |
|
|
|
|
line-height: 28px; |
|
|
|
|
|
|
|
|
|
span { |
|
|
|
|
white-space: normal !important |
|
|
|
|
} |
|
|
|
|