|
|
@@ -4,9 +4,9 @@ App({ |
|
|
|
data: {}, |
|
|
|
onLaunch: function(options) { |
|
|
|
var that = this; |
|
|
|
this.globalData.sceneAddress = options.scene; |
|
|
|
this.getLocation() |
|
|
|
this.getUserInfo() |
|
|
|
that.globalData.sceneAddress = options.scene; |
|
|
|
that.getLocation() |
|
|
|
that.getUserInfo() |
|
|
|
// 登录 |
|
|
|
wx.login({ |
|
|
|
success: ({ |
|
|
@@ -17,18 +17,16 @@ App({ |
|
|
|
data: { |
|
|
|
appId: config.weapp.AppId, |
|
|
|
code: code, |
|
|
|
sceneAddress: this.globalData.sceneAddress, |
|
|
|
sceneAddress: that.globalData.sceneAddress, |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
// console.log("req",res); |
|
|
|
this.globalData.token = res.data.token; |
|
|
|
console.log("req",res); |
|
|
|
that.globalData.token = res.data.token; |
|
|
|
Http.setToken(res.data.token) |
|
|
|
if (that.couponChannelListCallback) { |
|
|
|
that.couponChannelListCallback(res.data.token); |
|
|
|
} |
|
|
|
if (that.couponListCallback) { |
|
|
|
that.couponListCallback(res.data.token); |
|
|
|
if (that.tokenCallback) { |
|
|
|
that.tokenCallback(res.data.token); |
|
|
|
} |
|
|
|
|
|
|
|
return Http.post({ |
|
|
|
url: config.api.checkUserStatus, |
|
|
|
data: {} |
|
|
|