12345678910111213141516171819202122232425262728293031323334 |
- // app.js
- import storage from "./utils/storage";
- import basePage from "./utils/baseListPage";
- import UpdateManager from './model/update-manager.js';
- import Config from "./model/config";
- console.log = Config.LOG_ENABLE ? console.log : () => {
- };
- App({
- globalData: {
- userInfo: null,
- token: "",
- isPC: false,
- isPCDeviceUnkonw: false,
- systemInfo: null,
- },
- onLaunch(options) {
- // UpdateManager.update();
- this.globalData.token = storage.getItem("token")
- const res = wx.getSystemInfoSync()
- this.globalData.isPC = (res.platform == "windows" || res.platform == 'mac')
- this.globalData.isPCDeviceUnkonw = (this.globalData.isPC && res.devicePixelRatio == res.pixelRatio && res.pixelRatio != 1);
- wx.getSystemInfo({
- success: (result) => {
- this.globalData.systemInfo = result;
- },
- })
- },
- onShow(){
- UpdateManager.update();
- },
- Base: basePage,
- })
|