Commit bae59d4e authored by jyx's avatar jyx

代码优化

parent 6fdf3637
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
methods: { methods: {
ttLoging() { ttLoging() {
var that = this; var that = this;
var obj = wx.getLaunchOptionsSync() var obj = ks.getLaunchOptionsSync()
var tips2 = ''; // 投放测试 var tips2 = ''; // 投放测试
var thirdParam = ""; var thirdParam = "";
...@@ -73,14 +73,13 @@ ...@@ -73,14 +73,13 @@
}); });
} }
uni.login({ ks.login({
provider: 'weixin', success(res) {
success: function(loginRes) {
that.post({ that.post({
url: '/user/wechatlogin', url: '/user/ksLogin',
data: { data: {
vedioId: bookId, vedioId: bookId,
code: loginRes.code, code: res.code,
thirdParam: thirdParam thirdParam: thirdParam
}, },
showLoading: false, showLoading: false,
...@@ -90,16 +89,19 @@ ...@@ -90,16 +89,19 @@
app.globalData.userId = data.idcode; app.globalData.userId = data.idcode;
saveToken(data.token) saveToken(data.token)
setTimeout(() => { setTimeout(() => {
redirectTo('home?activiteFlag='+data.activiteFlag+"&idcode="+data.idcode); redirectTo('home?activiteFlag=' + data.activiteFlag +
"&idcode=" + data.idcode);
// redirectTo('/pagesA/vipPay/vipPay'); // redirectTo('/pagesA/vipPay/vipPay');
}, 1000); }, 1000);
} }
}); });
}, },
fail: function(err) { fail(res) {
} console.log(`login 调用失败`);
},
}); });
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment