deming/pageA/pactList/pactList.vue
2020-08-18 11:28:51 +08:00

84 lines
1.9 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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