api
This commit is contained in:
@@ -7,59 +7,56 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import common from '@/static/js/common.js'
|
||||
var graceRichText = require("../../components/logininput/rictText.js");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
document_content : ''
|
||||
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)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option)
|
||||
// 协议类型调用不同的的协议
|
||||
let typeIindex = option.index;
|
||||
this.typeIndexRquest(typeIindex)
|
||||
},
|
||||
methods: {
|
||||
unescapeHTML (temp){
|
||||
temp = "" + temp;
|
||||
return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
||||
},
|
||||
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)
|
||||
let data = this.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
if(typeIindex == 1){
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'privacy'
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
let data = this.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
if(typeIindex == 2){
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'use'
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
let data = this.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
if(typeIindex == 1){
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'privacy'
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
components:{}
|
||||
}
|
||||
if(typeIindex == 2){
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'use'
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
components:{}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user