|
@@ -1,4 +1,4 @@
|
|
|
-const { getUserInfo } = require('./api/common')
|
|
|
+const { getUserInfo, getSystemConfig } = require('./api/common')
|
|
|
const { isMobile } = require('./utils/validate')
|
|
|
const { checkUpdateVersion } = require('./utils/util')
|
|
|
|
|
@@ -15,6 +15,7 @@ App({
|
|
|
that.globalData.menuRight = systemInfo.screenWidth - menuButtonInfo.right
|
|
|
that.globalData.menuBottom = menuButtonInfo.top - systemInfo.statusBarHeight
|
|
|
that.globalData.menuHeight = menuButtonInfo.height
|
|
|
+ that.fetchSystemConfig()
|
|
|
that.fetchUserData()
|
|
|
checkUpdateVersion()
|
|
|
},
|
|
@@ -52,7 +53,8 @@ App({
|
|
|
'iconPath': 'image/tabBar/news_0@2x.png',
|
|
|
'selectedIconPath': 'image/tabBar/news_1@2x.png'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ objSystemConfig: {}
|
|
|
},
|
|
|
async fetchUserData() {
|
|
|
try {
|
|
@@ -90,5 +92,13 @@ App({
|
|
|
this.addTabBarList(tabBarList)
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ async fetchSystemConfig() {
|
|
|
+ try {
|
|
|
+ const { status, data } = await getSystemConfig()
|
|
|
+ if (status && Object.prototype.toString.call(data) === '[object Object]') {
|
|
|
+ this.globalData.objSystemConfig = data
|
|
|
+ }
|
|
|
+ } catch (err) {}
|
|
|
}
|
|
|
})
|