You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news1/text.vue

58 lines
1.1 KiB

<template>
9 months ago
<view>
9 months ago
<!-- <view class="con">{{ content }}</view> -->
<view class="con">
9 months ago
<rich-text style="white-space: normal;" :nodes="content"></rich-text>
9 months ago
</view>
</view>
</template>
<script>
9 months ago
import * as help from '@/api/help'
export default {
data() {
return {
9 months ago
pageFlag: 1,
content: ''
};
},
onShow() {
9 months ago
this.getTextData()
},
onLoad(params) {
9 months ago
let that = this
that.pageFlag = params.pageFlag
uni.setNavigationBarTitle({
title: that.pageFlag == 1 ? '用户服务协议' : that.pageFlag == 2 ? '隐私政策' : '关于我们'
})
},
methods: {
9 months ago
async getTextData() {
uni.showLoading({
title: "加载中"
})
let typeVal = this.pageFlag == 1 ? 'user' : this.pageFlag == 2 ? 'policy' : 'about'
let {
status,
data
} = await help.getAgreement({ type: typeVal });
if (status == 200) {
uni.hideLoading();
this.content = data.detail.content
}
},
}
}
</script>
9 months ago
<style scoped lang="scss">
.con {
font-size: 28rpx;
9 months ago
padding: 20rpx 40rpx;
line-height: 28px;
9 months ago
span{
white-space: normal !important
}
9 months ago
}
</style>