|
@@ -13,6 +13,7 @@ const _sfc_main = {
|
|
|
},
|
|
|
methods: {
|
|
|
initWechat() {
|
|
|
+ common_vendor.index.__f__("log", "at pages/login/index.vue:39", "跳过依赖 WeixinJSBridge 的初始化");
|
|
|
},
|
|
|
handleGetUserProfile() {
|
|
|
common_vendor.wx$1.showLoading({
|
|
@@ -25,11 +26,11 @@ const _sfc_main = {
|
|
|
success: (res) => {
|
|
|
this.userInfo = res.userInfo;
|
|
|
this.rawData = res.rawData;
|
|
|
- common_vendor.index.__f__("log", "at pages/login/index.vue:50", "获取到的 rawData:", this.rawData);
|
|
|
+ common_vendor.index.__f__("log", "at pages/login/index.vue:51", "获取到的 rawData:", this.rawData);
|
|
|
common_vendor.wx$1.hideLoading();
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:54", "获取用户信息失败:", err);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:55", "获取用户信息失败:", err);
|
|
|
common_vendor.wx$1.showToast({ title: "请授权后再登录", icon: "none" });
|
|
|
common_vendor.wx$1.hideLoading();
|
|
|
}
|
|
@@ -39,7 +40,7 @@ const _sfc_main = {
|
|
|
handleGetPhoneNumber: async function(e) {
|
|
|
if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
if (!this.rawData) {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:64", "请先授权获取用户信息");
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:65", "请先授权获取用户信息");
|
|
|
common_vendor.wx$1.showToast({ title: "请先授权获取用户信息", icon: "none" });
|
|
|
return;
|
|
|
}
|
|
@@ -78,12 +79,12 @@ const _sfc_main = {
|
|
|
duration: 3e3
|
|
|
});
|
|
|
}
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:103", "网络请求失败:", err);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:104", "网络请求失败:", err);
|
|
|
reject(err);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- common_vendor.index.__f__("log", "at pages/login/index.vue:109", "后端返回的完整数据:", response.data);
|
|
|
+ common_vendor.index.__f__("log", "at pages/login/index.vue:110", "后端返回的完整数据:", response.data);
|
|
|
if (response.data) {
|
|
|
if (response.data.wxNickname && response.data.wxAvatarUrl) {
|
|
|
common_vendor.wx$1.setStorageSync("userToken", response.data.token);
|
|
@@ -96,22 +97,22 @@ const _sfc_main = {
|
|
|
url: "/pages/home/index"
|
|
|
});
|
|
|
} else {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:123", "后端未返回微信昵称或头像信息:", response.data);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:124", "后端未返回微信昵称或头像信息:", response.data);
|
|
|
common_vendor.wx$1.showToast({ title: "获取用户信息失败,请重试", icon: "none" });
|
|
|
}
|
|
|
} else {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:127", "登录响应数据为空:", response);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:128", "登录响应数据为空:", response);
|
|
|
common_vendor.wx$1.showToast({ title: "登录失败,请重试", icon: "none" });
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:131", "登录过程出错:", error);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:132", "登录过程出错:", error);
|
|
|
common_vendor.wx$1.showToast({ title: "登录失败,请重试", icon: "none" });
|
|
|
} finally {
|
|
|
this.loading = false;
|
|
|
common_vendor.wx$1.hideLoading();
|
|
|
}
|
|
|
} else {
|
|
|
- common_vendor.index.__f__("error", "at pages/login/index.vue:138", "用户拒绝授权", e.detail.errMsg);
|
|
|
+ common_vendor.index.__f__("error", "at pages/login/index.vue:139", "用户拒绝授权", e.detail.errMsg);
|
|
|
common_vendor.wx$1.showToast({ title: "请授权后再登录", icon: "none" });
|
|
|
}
|
|
|
}
|