|
@@ -33,6 +33,9 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
+ app.fetchSystemConfigCallback = () => {
|
|
|
+ this.setKefu()
|
|
|
+ }
|
|
|
this.init()
|
|
|
},
|
|
|
async bindCallBack() {
|
|
@@ -51,18 +54,18 @@ Page({
|
|
|
*/
|
|
|
onShow() {
|
|
|
const { shop_status } = app.globalData.userInfo
|
|
|
- const { kefu_phone } = app.globalData.objSystemConfig
|
|
|
|
|
|
this.getTabBar().init()
|
|
|
this.setData({
|
|
|
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) {
|
|
|
this.getTabBar().setData({ list: app.globalData.tabBarList })
|
|
|
}
|
|
|
+
|
|
|
+ this.setKefu()
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -324,5 +327,12 @@ Page({
|
|
|
url: `/pages/login/login`
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ setKefu() {
|
|
|
+ const { kefu_phone } = app.globalData.objSystemConfig
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ kefu: kefu_phone
|
|
|
+ })
|
|
|
}
|
|
|
})
|