|
@@ -96,20 +96,20 @@ Page({
|
|
|
},
|
|
|
|
|
|
async initMyPage () {
|
|
|
+ wx.showNavigationBarLoading()
|
|
|
await this.getAccountNmberFn()
|
|
|
await this.appointmentListFn()
|
|
|
await this.getAppGetConfigImg()
|
|
|
+ wx.hideNavigationBarLoading()
|
|
|
},
|
|
|
|
|
|
getAppGetConfigImg() {
|
|
|
const that = this
|
|
|
- wx.showNavigationBarLoading()
|
|
|
// 类型 【1.关于我的 2.用户协议 3.我的 4.实体卡兑换说明 】
|
|
|
return new Promise((reslove,rej) => {
|
|
|
appGetConfigImg({
|
|
|
'imgType': '3'
|
|
|
}).then(configRes => {
|
|
|
- wx.hideNavigationBarLoading()
|
|
|
that.setData({
|
|
|
imageList: configRes.data || []
|
|
|
})
|
|
@@ -158,21 +158,17 @@ Page({
|
|
|
|
|
|
// 获取用户预约信息
|
|
|
appointmentListFn () {
|
|
|
- wx.showNavigationBarLoading()
|
|
|
return new Promise((resolve, reject) => {
|
|
|
appointmentList({
|
|
|
status: 1,
|
|
|
currentPage: 1
|
|
|
}).then(res => {
|
|
|
- wx.hideNavigationBarLoading()
|
|
|
if (res.data.vos.length !== 0) {
|
|
|
app.globalData.hasAppointment = true
|
|
|
} else {
|
|
|
app.globalData.hasAppointment = false
|
|
|
}
|
|
|
resolve(res)
|
|
|
- }).catch(e => {
|
|
|
- wx.hideNavigationBarLoading()
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -180,18 +176,14 @@ Page({
|
|
|
// 获取用户剩余检测机会
|
|
|
getAccountNmberFn () {
|
|
|
var that = this
|
|
|
- wx.showNavigationBarLoading()
|
|
|
return new Promise((resolve, reject) => {
|
|
|
getAccountNmber({}).then(res => {
|
|
|
- wx.hideNavigationBarLoading()
|
|
|
that.setData({
|
|
|
count: res.data,
|
|
|
isFirstGetCount: false
|
|
|
})
|
|
|
app.globalData.useNumber = res.data
|
|
|
resolve(res)
|
|
|
- }).catch(e => {
|
|
|
- wx.hideNavigationBarLoading()
|
|
|
})
|
|
|
})
|
|
|
},
|