<template>
|
<view class="rich-text-page">
|
<view class="rich-content" v-html="content"></view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
type: '',
|
content: ''
|
}
|
},
|
onLoad(options) {
|
this.type = Number(options.type || '0')
|
this.getPlatformAboutUs()
|
},
|
methods: {
|
async getPlatformAboutUs() {
|
const res = await this.$u.api.getPlatformAboutUs({ type: this.type })
|
if (res.code === 200) {
|
if (this.type === 0) {
|
this.content = res.data.userServiceAgreement || ''
|
} else if (this.type === 1) {
|
this.content = res.data.userPrivacyPolicy || ''
|
} else if (this.type === 2) {
|
this.content = res.data.storeCooperationAgreement || ''
|
} else if (this.type ===3) {
|
this.content = res.data.storePrivacyPolicy || ''
|
} else if (this.type === 4) {
|
this.content = res.data.serverIntroduce || ''
|
} else if (this.type === 5) {
|
this.content = res.data.aboutUs || ''
|
} else if (this.type === 6) {
|
this.content = res.data.storeRiskCommitment || ''
|
} else if (this.type === 7) {
|
this.content = res.data.storeLuggageStorageNotice || ''
|
} else if (this.type === 8) {
|
this.content = res.data.storeCooperationAgreement || ''
|
}else if (this.type === 9) {
|
this.content = res.data.priceDescription || ''
|
}else if (this.type === 10) {
|
this.content = res.data.prohibitedItems || ''
|
}
|
const titleMap = {
|
0: '用户服务协议',
|
1: '用户隐私政策',
|
2: '门店合作协议',
|
3: '门店隐私政策',
|
4: '规范须知',
|
5: '关于我们',
|
6: '风险承诺',
|
7: '行李寄存须知',
|
8: '代理点合作协议',
|
9: '价格说明',
|
10: '禁寄物品',
|
}
|
uni.setNavigationBarTitle({
|
title: titleMap[this.type] || '详情'
|
})
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.rich-text-page {
|
min-height: 100vh;
|
background: #ffffff;
|
padding: 30rpx;
|
box-sizing: border-box;
|
}
|
|
.rich-content {
|
width: 100%;
|
font-size: 28rpx;
|
color: #333333;
|
line-height: 1.6;
|
|
::v-deep {
|
image {
|
max-width: 100% !important;
|
height: auto !important;
|
}
|
p {
|
margin-bottom: 20rpx;
|
}
|
}
|
}
|
</style>
|