|
@@ -1,4 +1,4 @@
|
|
-const { getUserInfo } = require('./api/common')
|
|
|
|
|
|
+const { getUserInfo, getSystemConfig } = require('./api/common')
|
|
const { isMobile } = require('./utils/validate')
|
|
const { isMobile } = require('./utils/validate')
|
|
const { checkUpdateVersion } = require('./utils/util')
|
|
const { checkUpdateVersion } = require('./utils/util')
|
|
|
|
|
|
@@ -15,6 +15,7 @@ App({
|
|
that.globalData.menuRight = systemInfo.screenWidth - menuButtonInfo.right
|
|
that.globalData.menuRight = systemInfo.screenWidth - menuButtonInfo.right
|
|
that.globalData.menuBottom = menuButtonInfo.top - systemInfo.statusBarHeight
|
|
that.globalData.menuBottom = menuButtonInfo.top - systemInfo.statusBarHeight
|
|
that.globalData.menuHeight = menuButtonInfo.height
|
|
that.globalData.menuHeight = menuButtonInfo.height
|
|
|
|
+ that.fetchSystemConfig()
|
|
that.fetchUserData()
|
|
that.fetchUserData()
|
|
checkUpdateVersion()
|
|
checkUpdateVersion()
|
|
},
|
|
},
|
|
@@ -52,7 +53,8 @@ App({
|
|
'iconPath': 'image/tabBar/news_0@2x.png',
|
|
'iconPath': 'image/tabBar/news_0@2x.png',
|
|
'selectedIconPath': 'image/tabBar/news_1@2x.png'
|
|
'selectedIconPath': 'image/tabBar/news_1@2x.png'
|
|
}
|
|
}
|
|
- ]
|
|
|
|
|
|
+ ],
|
|
|
|
+ objSystemConfig: {}
|
|
},
|
|
},
|
|
async fetchUserData() {
|
|
async fetchUserData() {
|
|
try {
|
|
try {
|
|
@@ -90,5 +92,13 @@ App({
|
|
this.addTabBarList(tabBarList)
|
|
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) {}
|
|
}
|
|
}
|
|
})
|
|
})
|