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>
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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的特性限制,
|
||||
|
||||
@@ -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
19
pageE/zhibo/index.nvue
Normal 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>
|
||||
Reference in New Issue
Block a user