tanzhongheY/app.js

36 lines
977 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//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',
// })
// }
// }
// })
},
})