api
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -11,8 +12,11 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
// type: 1 证件中心 2: 关于我们
|
||||
// console.log(option);
|
||||
this.getUseHelpInfo(option.id);
|
||||
if(option.id) this.getUseHelpInfo(option.id);
|
||||
if(option.type == 1) this.certificateInfo();
|
||||
if(option.type == 2) this.getAboutUsInfo();
|
||||
},
|
||||
methods: {
|
||||
setTitle(title){
|
||||
@@ -20,21 +24,32 @@ export default {
|
||||
title: title
|
||||
});
|
||||
},
|
||||
// 处理富文本
|
||||
unescapeHTML (temp){
|
||||
temp = "" + temp;
|
||||
return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
||||
},
|
||||
getUseHelpInfo(id) {
|
||||
this.$u.api.getUseHelpInfo({
|
||||
launch_id: id,
|
||||
}).then((res)=>{
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.nodes = this.unescapeHTML(res.data.info[0].help_info);
|
||||
this.nodes = common.unescapeHTML(res.data.info[0].help_info);
|
||||
this.setTitle(res.data.info[0].help_title);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getAboutUsInfo() {
|
||||
this.$u.api.aboutUsInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.nodes = common.unescapeHTML(res.data.info.value);
|
||||
this.setTitle(res.data.info.remark);
|
||||
}
|
||||
})
|
||||
},
|
||||
certificateInfo() {
|
||||
this.$u.api.certificateInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.nodes = common.unescapeHTML(res.data.info.value);
|
||||
this.setTitle(res.data.info.remark);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user