|
@@ -119,8 +119,8 @@ const _sfc_main = {
|
|
|
unionid: data.unionid || "",
|
|
|
session_key: data.session_key || "",
|
|
|
is_new_user: data.is_new_user || false,
|
|
|
- loginTime: (/* @__PURE__ */ new Date()).getTime(),
|
|
|
- tenant_id: 1
|
|
|
+ loginTime: (/* @__PURE__ */ new Date()).getTime()
|
|
|
+ /* tenant_id: 1 */
|
|
|
};
|
|
|
console.log("构建的用户数据:", userData);
|
|
|
return userData;
|
|
@@ -139,16 +139,16 @@ const _sfc_main = {
|
|
|
common_vendor.index.setStorageSync("userInfo", JSON.stringify(userData));
|
|
|
console.log("基本用户信息已保存");
|
|
|
if (userData.id) {
|
|
|
- this.fetchUserDetail(userData.id, userData);
|
|
|
+ this.fetchUserDetail(userData.id, userData, userData.openid);
|
|
|
} else {
|
|
|
this.completeLogin();
|
|
|
}
|
|
|
},
|
|
|
// 获取用户详细信息
|
|
|
- async fetchUserDetail(userId, basicUserData) {
|
|
|
+ async fetchUserDetail(userId, basicUserData, openid) {
|
|
|
try {
|
|
|
console.log("获取用户详细信息,用户ID:", userId);
|
|
|
- const userDetail = await api_user.getUserInfo(userId);
|
|
|
+ const userDetail = await api_user.getUserInfo(userId, openid);
|
|
|
console.log("获取用户详细信息成功:", userDetail);
|
|
|
if (userDetail) {
|
|
|
const updatedUserInfo = {
|