Commit fe3d585b authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 5ef2184f
<template>
<!-- Companionx -->
<view class="body loading">
<view class="logo">
<image src="@/static/logo-about.png" mode="widthFix" style="border-radius: 20rpx;margin-bottom: 200rpx;" />
......@@ -83,11 +82,9 @@
clueToken = obj.query.callback ?? ''
adId = obj.query.aid ?? ''
}
console.log("1");
uni.login({
provider: 'weixin',
success: function(loginRes) {
console.log("2"+loginRes.code);
that.post({
url: '/user/wechatlogin',
data: {
......@@ -107,14 +104,11 @@
app.globalData.token = data.token;
app.globalData.userId = data.pk_id;
app.globalData.userInfo = data;
console.log("3");
redirectTo('home');
}
});
},
fail: function(err) {
console.log("4");
// 登录授权失败
message.notify('登录授权失败 错误码:' + err.code);
}
......
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