2020-06-19 11:20:33 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view class="packlist">
|
|
|
|
|
<view>
|
|
|
|
|
<rich-text class="rict_type" :nodes="document_content"></rich-text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-07-01 09:32:36 +00:00
|
|
|
|
import common from '@/static/js/common.js'
|
2020-06-19 11:20:33 +00:00
|
|
|
|
var graceRichText = require("../../components/logininput/rictText.js");
|
2020-07-01 09:32:36 +00:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
document_content : ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
console.log(option)
|
|
|
|
|
// 协议类型调用不同的的协议
|
|
|
|
|
let typeIindex = option.index;
|
2020-08-05 13:06:29 +00:00
|
|
|
|
this.typeIndexRquest(typeIindex);
|
2020-07-04 03:03:20 +00:00
|
|
|
|
},
|
2020-07-01 09:32:36 +00:00
|
|
|
|
methods: {
|
|
|
|
|
typeIndexRquest(typeIindex){
|
|
|
|
|
// 3种协议分别是 0 1 2 【agreement:用户协议,open_store:开店协议,privacy:隐私协议,use:使用协议】;
|
|
|
|
|
if(typeIindex == 0){
|
|
|
|
|
this.$u.api.documentInfo({
|
|
|
|
|
document_code: 'agreement'
|
|
|
|
|
}).then((res)=>{
|
2020-08-05 13:06:29 +00:00
|
|
|
|
// console.log(res.data.document_title);
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: res.data.document_title
|
|
|
|
|
})
|
2020-07-01 09:32:36 +00:00
|
|
|
|
let data = common.unescapeHTML(res.data.document_content);
|
2020-08-05 13:06:29 +00:00
|
|
|
|
this.document_content = data;
|
2020-07-01 09:32:36 +00:00
|
|
|
|
})
|
2020-06-19 11:20:33 +00:00
|
|
|
|
}
|
2020-07-01 09:32:36 +00:00
|
|
|
|
if(typeIindex == 1){
|
|
|
|
|
this.$u.api.documentInfo({
|
|
|
|
|
document_code: 'privacy'
|
|
|
|
|
}).then((res)=>{
|
2020-08-05 13:06:29 +00:00
|
|
|
|
// console.log(res.data.document_title);
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: res.data.document_title
|
|
|
|
|
})
|
2020-07-01 09:32:36 +00:00
|
|
|
|
let data = common.unescapeHTML(res.data.document_content);
|
|
|
|
|
this.document_content = data
|
|
|
|
|
})
|
2020-06-19 11:20:33 +00:00
|
|
|
|
}
|
2020-07-01 09:32:36 +00:00
|
|
|
|
if(typeIindex == 2){
|
|
|
|
|
this.$u.api.documentInfo({
|
|
|
|
|
document_code: 'use'
|
|
|
|
|
}).then((res)=>{
|
2020-08-05 13:06:29 +00:00
|
|
|
|
// console.log(res.data.document_title);
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: res.data.document_title
|
|
|
|
|
})
|
2020-07-01 09:32:36 +00:00
|
|
|
|
let data = common.unescapeHTML(res.data.document_content);
|
|
|
|
|
this.document_content = data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
},
|
|
|
|
|
components:{}
|
|
|
|
|
}
|
2020-06-19 11:20:33 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.packlist{}
|
|
|
|
|
.packlist > view{
|
|
|
|
|
width: 90%;
|
|
|
|
|
margin: 0 auto;
|
2020-07-31 00:45:30 +00:00
|
|
|
|
padding: 16upx 0;
|
|
|
|
|
font-size: 26upx;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
.rict_type {
|
|
|
|
|
text-indent: 1rem;
|
|
|
|
|
line-height: 1.2;
|
2020-06-19 11:20:33 +00:00
|
|
|
|
}
|
|
|
|
|
</style>
|