<template>
	<view>
        <view class="contentTitle">
            <rich-text :nodes="content"></rich-text>
        </view>
	</view>
</template>

<script>
    import { userAgree } from '@/apis/interfaces/vip'
	export default {
		data() {
			return {
				content: ''
			}
		},
        created() {
            let newUrl = ''
            if(this.$Route.query.type == 'vipAgree') newUrl = 'articles/agreement/openvip'
            if(this.$Route.query.type == 'loginPrivacy') newUrl = 'articles/agreement/secret'
            if(this.$Route.query.type == 'loginService') newUrl = 'articles/agreement/service'
        	userAgree(newUrl).then(res => {
                this.content = res.content
        	}).catch(err =>{
        		uni.showToast({
        			title: err.message,
        			icon : 'none'
        		})
        	})
        },
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
    .contentTitle {
        padding: $padding;
        box-sizing: border-box;
    }
</style>
