|
@@ -33,6 +33,9 @@ Page({
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
|
+ app.fetchSystemConfigCallback = () => {
|
|
|
|
+ this.setKefu()
|
|
|
|
+ }
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
async bindCallBack() {
|
|
async bindCallBack() {
|
|
@@ -51,18 +54,18 @@ Page({
|
|
*/
|
|
*/
|
|
onShow() {
|
|
onShow() {
|
|
const { shop_status } = app.globalData.userInfo
|
|
const { shop_status } = app.globalData.userInfo
|
|
- const { kefu_phone } = app.globalData.objSystemConfig
|
|
|
|
|
|
|
|
this.getTabBar().init()
|
|
this.getTabBar().init()
|
|
this.setData({
|
|
this.setData({
|
|
sessionId: wx.getStorageSync(sessionStorageKey),
|
|
sessionId: wx.getStorageSync(sessionStorageKey),
|
|
- userInfo: app.globalData.userInfo,
|
|
|
|
- kefu: kefu_phone
|
|
|
|
|
|
+ userInfo: app.globalData.userInfo
|
|
})
|
|
})
|
|
|
|
|
|
if (shop_status === 1 && this.getTabBar().data.list.findIndex(item => item.pagePath === 'pages/news/news') === -1) {
|
|
if (shop_status === 1 && this.getTabBar().data.list.findIndex(item => item.pagePath === 'pages/news/news') === -1) {
|
|
this.getTabBar().setData({ list: app.globalData.tabBarList })
|
|
this.getTabBar().setData({ list: app.globalData.tabBarList })
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.setKefu()
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -324,5 +327,12 @@ Page({
|
|
url: `/pages/login/login`
|
|
url: `/pages/login/login`
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ setKefu() {
|
|
|
|
+ const { kefu_phone } = app.globalData.objSystemConfig
|
|
|
|
+
|
|
|
|
+ this.setData({
|
|
|
|
+ kefu: kefu_phone
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|