This commit is contained in:
2020-07-01 17:32:36 +08:00
parent dc69746320
commit dc72f79ee8
24 changed files with 268 additions and 127 deletions

View File

@@ -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(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/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>