瀏覽代碼

Refactor SeoKeywordsRankList component to improve loading state management and ensure rank info is fetched correctly after comprehension info is set.

Zenas 5 天之前
父節點
當前提交
6b8a37a89a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/views/adweb/seo/SeoKeywordsRankList.vue

+ 4 - 1
src/views/adweb/seo/SeoKeywordsRankList.vue

@@ -607,10 +607,10 @@ export default {
         .then((res) => {
           if (res.code == 200) {
             that.comprehenInfo = res.result;
+            that.getRankInfo();
           }
         })
         .finally(() => {
-          this.getRankInfo();
           this.setTableQuery();
           this.longSetTableQuery();
         });
@@ -623,12 +623,15 @@ export default {
         siteCode: that.siteCode,
         subscriptionId: that.subscriptionId ? that.subscriptionId : '',
       };
+      that.loading = true;
       getAction('/seo/seoKeywordsRank/getRankInfo', d).then((res) => {
         if (res.code == 200) {
           this.rankInfo.appointKeyword = res.result.appointKeyword;
           this.rankInfo.longTailKeyword = res.result.longTailKeyword;
           this.rankInfo.serverTime = res.result.serverTime;
         }
+      }).finally(() => {
+        that.loading = false;
       });
     },