//app.js var urlPath = require('/config.js'); App({ globalData: { userInfo: {}, //用户信息获取 code: '', }, setOpenid: function () { // 判断是否存在 // if(wx.getStorageSync('openid')){ // return // } // var that = this }, onLaunch: function () { var that = this; wx.setStorageSync('urlPath', urlPath); let hInfo = wx.getAccountInfoSync(); // console.log(hInfo.envVersion);//develop:开发版 trial:体验版 release:正式版 if(hInfo.miniProgram.envVersion == "release"){ console.log = () =>{} } // this.setOpenid() // wx.getSetting({ // success: (res) => { // if (!res.authSetting['scope.userInfo']) { //已授权情况下 // wx.navigateTo({ // url: '/pages/auth/auth', // }) // } // } // }) }, })