MrShi
5 小时以前 3f9032e92fdd383bfefc87a0bec9b242e1223851
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
<template>
    <view class="agreement-page">
        <rich-text :nodes="content"></rich-text>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                title: '',
                content: '',
                agreementType: ''
            }
        },
        onLoad(options) {
            this.agreementType = options.type || ''
            this.title = options.title || '协议'
            uni.setNavigationBarTitle({
                title: this.title
            })
            this.getAgreementContent()
        },
        methods: {
            getAgreementContent() {
                this.$u.api.getPlatformAboutUs().then(res => {
                    if (res.code === 200) {
                        this.content = res.data[this.agreementType] || '暂无内容'
                    }
                })
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .agreement-page {
        width: 100%;
        padding: 30rpx;
        box-sizing: border-box;
        background: #ffffff;
    }
</style>