|
|
@@ -62,8 +62,9 @@ Page({
|
|
|
|
|
|
onLoad(options) {
|
|
|
console.log('入参options:', options)
|
|
|
+ const promotionid = parseInt(options.promotionid);
|
|
|
this.interstitalLoad()
|
|
|
- this.autoLogin();
|
|
|
+ this.autoLogin(promotionid);
|
|
|
// 创建动画实例
|
|
|
this.recentBookAnimator = wx.createAnimation({
|
|
|
duration: 300,
|
|
|
@@ -194,7 +195,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
// 自动登录
|
|
|
- async autoLogin() {
|
|
|
+ async autoLogin(promotionid) {
|
|
|
try {
|
|
|
// 检查是否已经登录
|
|
|
const token = wx.getStorageSync('accessToken');
|
|
|
@@ -210,7 +211,7 @@ Page({
|
|
|
}
|
|
|
|
|
|
// 未登录,执行登录
|
|
|
- const res = await getApp().login();
|
|
|
+ const res = await getApp().login(promotionid);
|
|
|
this.setData({
|
|
|
isLoggedIn: true
|
|
|
});
|