var t = require("../../utils/common.js"); var os = getApp().globalData.setting; Page({ data: { store: null, imghots: os.imghost, }, onLoad: function () { var th = this, app = getApp(); app.getConfig(function (e) { th.setData({ store: e }); }) }, onShow(){ }, bindGetUserInfo: function(e) { var that = this, app = getApp(); //此处授权得到userInfo console.log(e.detail.userInfo); app.globalData.getu = e.detail.userInfo; //接下来写业务代码 //最后,记得返回刚才的页面 app.auth.wxLogin_fir(function(){ console.log("togoin"); console.log("1"); wx.navigateBack({ delta: 1 }) }) } });