deming/pageE/mine/ArticleDetails.vue

62 lines
1.4 KiB
Vue
Raw Normal View History

2020-06-02 11:42:13 +08:00
<template>
2020-06-04 08:21:34 +08:00
<view class="article-details">
2020-06-02 11:42:13 +08:00
<rich-text :nodes="nodes"></rich-text>
</view>
</template>
<script>
2020-07-01 17:32:36 +08:00
import common from '@/static/js/common.js'
2020-06-02 11:42:13 +08:00
export default {
data() {
return {
2020-06-24 16:39:31 +08:00
nodes: '',
2020-06-02 11:42:13 +08:00
}
2020-06-04 08:21:34 +08:00
},
onLoad(option) {
2020-07-01 17:32:36 +08:00
// type: 1 证件中心 2: 关于我们
2020-06-24 16:39:31 +08:00
// console.log(option);
2020-07-01 17:32:36 +08:00
if(option.id) this.getUseHelpInfo(option.id);
if(option.type == 1) this.certificateInfo();
if(option.type == 2) this.getAboutUsInfo();
2020-06-04 08:21:34 +08:00
},
methods: {
setTitle(title){
uni.setNavigationBarTitle({
2020-06-08 15:23:23 +08:00
title: title
2020-06-04 08:21:34 +08:00
});
},
2020-06-19 18:07:11 +08:00
getUseHelpInfo(id) {
this.$u.api.getUseHelpInfo({
launch_id: id,
2020-07-01 17:32:36 +08:00
}).then(res => {
2020-06-19 18:07:11 +08:00
if (res.errCode == 0) {
2020-07-01 17:32:36 +08:00
this.nodes = common.unescapeHTML(res.data.info[0].help_info);
2020-06-19 18:07:11 +08:00
this.setTitle(res.data.info[0].help_title);
}
})
2020-07-01 17:32:36 +08:00
},
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);
}
})
},
2020-06-04 08:21:34 +08:00
},
2020-06-02 11:42:13 +08:00
}
</script>
<style lang="scss" scoped>
2020-06-04 08:21:34 +08:00
.article-details {
min-height: calc(100vh - var(--window-top));
2020-06-02 11:42:13 +08:00
background: #ECECEC;
padding: 20rpx 35rpx 0;
}
</style>