doum
8 天以前 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<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>