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>

View File

@@ -31,6 +31,7 @@
</view>
</template>
<script>
import common from '@/static/js/common.js'
export default {
data() {
return {
@@ -72,7 +73,7 @@ export default {
[this.nickname, this.phoneNumber, this.birthday, this.gender, this.avatar] = [
userInfo.member_nickname,
userInfo.member_mobile,
userInfo.member_birthday,
common.timestampToDate({timestamp: userInfo.member_birthday}),
userInfo.member_sex,
userInfo.member_avatar,
];
@@ -97,7 +98,7 @@ export default {
},
setBirthday(value) {
// console.log(value);
this.birthday = value.year + '.' + value.month + '.' + value.day;
this.birthday = value.year + '-' + value.month + '-' + value.day;
},
updatePhone() {
uni.navigateTo({

View File

@@ -9,7 +9,7 @@
</view>
<view class="info-item">
<view class="title">性别</view>
<view class="value">{{ userInfo.member_sex }}</view>
<view class="value">{{ userInfo.member_sex == 1 ? '男' : '女' }}</view>
</view>
<view class="info-item">
<view class="title">生日</view>

View File

@@ -6,7 +6,7 @@
:index='index'
:show="item.show"
:options="options"
@click="click"
@click="removeFavorite"
@open="open"
>
<view class="item u-border-bottom">
@@ -44,17 +44,20 @@ export default {
},
methods: {
getStoreFavoritesList() {
this.$u.api.getStoreFavoritesList({
type: 2 // 固定值
}).then(res => {
if(res.errCode == 0) {
}
this.$u.api.getFavoritesList({
type: 2 // 店铺 type: 2
})
},
click(index) {
this.list.splice(index, 1);
this.$u.toast(`删除了第${index+1}个cell`);
removeFavorite(id = 18) {
this.$u.api.removeFavorite({
id: id
}).then(res => {
if(res.errCode == 0) {
this.getStoreFavoritesList();
} else {
this.$u.toast(res.message);
}
})
},
open(index) {
// 先将正在被操作的swipeAction标记为打开状态否则由于props的特性限制

View File

@@ -57,11 +57,11 @@ export default {
},
{
title: '证件中心',
link: '../mine/ArticleDetails?title=证件照中心'
link: '../mine/ArticleDetails?type=1'
},
{
title: '关于我们',
link: '../mine/ArticleDetails?title=关于我们'
link: '../mine/ArticleDetails?type=2'
},
{
title: '帮助与反馈',

19
pageE/zhibo/index.nvue Normal file
View File

@@ -0,0 +1,19 @@
<template>
<div>
<myText ref="telText" tel="11" style="width:750rem;height:100vh" @onTel="onTel" @click="myTextClick"></myText>
</div>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>