tanzhongheY/app.js

36 lines
977 B
JavaScript
Raw Normal View History

2021-09-01 07:52:30 +00:00
//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);
2021-09-01 08:04:11 +00:00
let hInfo = wx.getAccountInfoSync();
// console.log(hInfo.envVersion);//develop:开发版 trial体验版 release正式版
2021-09-03 02:02:54 +00:00
if(hInfo.miniProgram.envVersion != "develop"){
2021-09-01 08:04:11 +00:00
console.log = () =>{}
}
2021-09-01 07:52:30 +00:00
// this.setOpenid()
// wx.getSetting({
// success: (res) => {
// if (!res.authSetting['scope.userInfo']) { //已授权情况下
// wx.navigateTo({
// url: '/pages/auth/auth',
// })
// }
// }
// })
},
})