|
@@ -103,10 +103,15 @@ const getUserInfo = async () => {
|
|
|
phone: geekerUser.userInfo.phone
|
|
phone: geekerUser.userInfo.phone
|
|
|
};
|
|
};
|
|
|
const res: any = await getMerchantByPhone(param);
|
|
const res: any = await getMerchantByPhone(param);
|
|
|
|
|
+ console.log("getMerchantByPhone返回数据:", res.data);
|
|
|
storeId.value = res.data.storeId;
|
|
storeId.value = res.data.storeId;
|
|
|
if (res && res.code == 200 && res.data) {
|
|
if (res && res.code == 200 && res.data) {
|
|
|
- // 更新缓存中的 storeId
|
|
|
|
|
- geekerUser.userInfo.storeId = res.data.storeId;
|
|
|
|
|
|
|
+ // 更新缓存中的 storeId,确保保留businessSection字段
|
|
|
|
|
+ geekerUser.userInfo = {
|
|
|
|
|
+ ...geekerUser.userInfo,
|
|
|
|
|
+ ...res.data,
|
|
|
|
|
+ businessSection: geekerUser.userInfo.businessSection
|
|
|
|
|
+ };
|
|
|
localSet("geeker-user", geekerUser);
|
|
localSet("geeker-user", geekerUser);
|
|
|
// 同时更新 createdId 缓存
|
|
// 同时更新 createdId 缓存
|
|
|
if (res.data.storeId) {
|
|
if (res.data.storeId) {
|