deming/pageE/mine/ArticleDetails.vue

132 lines
2.9 KiB
Vue
Raw Normal View History

2020-06-02 03:42:13 +00:00
<template>
2020-08-18 03:02:41 +00:00
<view>
<view class="header" v-if="type == 2">
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
<view class="title">德铭阳光</view>
<view class="tit-info">版本:{{ version }} for {{ phone_type }}</view>
</view>
<rich-text :nodes="nodes" v-if="type != 2"></rich-text>
<view class="main" v-if="type == 2">
<view @click="show = true">
<text>产品介绍</text>
<u-icon name="arrow-right" color="#999"></u-icon>
</view>
<view>
<text>版本更新</text>
<text class="tips">已是最新版本</text>
</view>
</view>
<u-popup v-model="show" v-if="type == 2">
<view>出淤泥而不染濯清涟而不妖</view>
</u-popup>
2020-06-02 03:42:13 +00:00
</view>
</template>
<script>
2020-07-01 09:32:36 +00:00
import common from '@/static/js/common.js'
2020-06-02 03:42:13 +00:00
export default {
data() {
return {
2020-08-18 03:02:41 +00:00
version: "",
phone_type: "",
type: 1,
nodes: "",
show: false,
2020-06-02 03:42:13 +00:00
}
2020-06-04 00:21:34 +00:00
},
onLoad(option) {
2020-07-01 09:32:36 +00:00
// type: 1 证件中心 2: 关于我们
2020-06-24 08:39:31 +00:00
// console.log(option);
2020-07-01 09:32:36 +00:00
if(option.id) this.getUseHelpInfo(option.id);
if(option.type == 1) this.certificateInfo();
if(option.type == 2) this.getAboutUsInfo();
2020-08-18 03:02:41 +00:00
this.type = option.type;
this.getVersion();
this.phone_type = this.$u.os();
2020-06-04 00:21:34 +00:00
},
methods: {
setTitle(title){
uni.setNavigationBarTitle({
2020-06-08 07:23:23 +00:00
title: title
2020-06-04 00:21:34 +00:00
});
},
2020-06-19 10:07:11 +00:00
getUseHelpInfo(id) {
this.$u.api.getUseHelpInfo({
launch_id: id,
2020-07-01 09:32:36 +00:00
}).then(res => {
2020-06-19 10:07:11 +00:00
if (res.errCode == 0) {
2020-07-01 09:32:36 +00:00
this.nodes = common.unescapeHTML(res.data.info[0].help_info);
2020-06-19 10:07:11 +00:00
this.setTitle(res.data.info[0].help_title);
}
})
2020-07-01 09:32:36 +00: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-08-18 03:02:41 +00:00
// 检查版本号
getVersion() {
this.$u.post("Specialci/checkVersion",{app_version: 1}).then(res => {
console.log(res);
this.version = res.data.app_version;
})
}
2020-06-04 00:21:34 +00:00
},
2020-06-02 03:42:13 +00:00
}
</script>
<style lang="scss" scoped>
2020-08-18 03:02:41 +00:00
page {
background-color: #f2f2f2;
}
.header {
width: 500rpx;
margin: 0 auto;
padding: 30rpx;
text-align: center;
.tit-img {
width: 200rpx;
height: 200rpx;
}
.title {
margin: 18rpx 0;
font-weight: bold;
font-size: 26rpx;
letter-spacing: 2rpx;
}
.tit-info {
font-size: 22rpx;
color: #666;
}
}
.main {
margin: 20rpx 0;
& > view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
padding: 0 20rpx;
line-height: 100rpx;
color: #333;
font-size: 30rpx;
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
}
.tips {
color: #999;
font-size: 22rpx;
}
2020-06-02 03:42:13 +00:00
}
</style>