Przeglądaj źródła

零售端-删除小程序再进首页,没有重新拉取花店列表

ouyang 1 dzień temu
rodzic
commit
d81393e773
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      mallApp/src/pages/home/recent.vue

+ 4 - 4
mallApp/src/pages/home/recent.vue

@@ -367,7 +367,8 @@ export default {
     },
     /**
      * 刷新登录用户信息。
-     * 用户接口和花店列表并行返回时,在两者都就绪后补触发红包检测,避免竞态漏掉提醒。
+     * 清缓存后首次 onShow 时 vuex 尚无 loginInfo,不会拉 hd/list;
+     * current-info 确认已登录后在此补拉花店列表,避免必须离开再回来才请求。
      */
     getLoginInfo() {
       return currentInfo().then((res) => {
@@ -375,9 +376,8 @@ export default {
           if (res.data.info) {
             this.user = res.data.info;
             this.loginStyle = 1;
-            if (!this.$util.isEmpty(this.list.data)) {
-              this.checkHbArrival();
-            }
+            // 与 onShow 已登录分支对齐:确认登录态后立刻拉花店列表(含红包检测)
+            this.refreshMyHdList();
           } else {
             this.user = { name: "", smallAvatar: "", id: 0 };
             this.loginStyle = 0;