瀏覽代碼

Merge branch 'feature_20250116_提示类建店指标跳转页' into uat(dev)

zhujindu 10 月之前
父節點
當前提交
493a7eb649
共有 2 個文件被更改,包括 27 次插入20 次删除
  1. 26 16
      src/views/home/hintTabPage/unCreateStore.vue
  2. 1 4
      src/views/storeManagement/storeDetail.vue

+ 26 - 16
src/views/home/hintTabPage/unCreateStore.vue

@@ -304,20 +304,25 @@ export default {
     },
   },
   created() {
+    this.toastLoading(0, '加载中...', true);
     // 授权
-    getTicketFun().then(() => {
-      // 获取定位
-      getPosition()
-        .then((res) => {
-          let { TXisBD } = res;
-          this.getList(TXisBD);
-        })
-        .catch((error) => {
-          this.$dialog.alert({
-            message: error,
+    getTicketFun()
+      .then(() => {
+        // 获取定位
+        getPosition()
+          .then((res) => {
+            let { TXisBD } = res;
+            this.getList(TXisBD);
+          })
+          .catch((error) => {
+            this.$dialog.alert({
+              message: error,
+            });
           });
-        });
-    });
+      })
+      .catch(() => {
+        this.toastLoading().clear();
+      });
     this.activeName = this.activaTypeStore || '';
   },
   methods: {
@@ -328,10 +333,15 @@ export default {
       selectUserStoreNoVisits({
         lat: TXisBD.lat,
         lon: TXisBD.lon,
-      }).then((res) => {
-        this.list = res.data;
-        console.log(this.list);
-      });
+      })
+        .then((res) => {
+          this.toastLoading().clear();
+          this.list = res.data;
+          console.log(this.list);
+        })
+        .catch(() => {
+          this.toastLoading().clear();
+        });
     },
     storeDetailFn(id) {
       this.$router.push({

+ 1 - 4
src/views/storeManagement/storeDetail.vue

@@ -41,7 +41,7 @@
       </van-nav-bar>
     </div>
     <!--主体内容-->
-    <div style="margin-top: 44px; padding-bottom: 50px" v-if="pageShow">
+    <div style="margin-top: 44px; padding-bottom: 50px" v-if="list">
       <van-dialog title="门店位置">
         <mapmarker :info="list"></mapmarker>
       </van-dialog>
@@ -575,7 +575,6 @@ export default {
       markers: undefined,
       markers1: undefined,
       marker: undefined,
-      pageShow: false,
       mapsearchlist: [],
       map: '',
       img: '',
@@ -1242,7 +1241,6 @@ export default {
         });
     },
     getDetail() {
-      this.pageShow = false;
       this.lat = '';
       this.lon = '';
       getById({ storeId: this.$route.query.id })
@@ -1384,7 +1382,6 @@ export default {
               // 获取审批历史
               this.storeApprovaHistoryFun();
             }
-            this.pageShow = true;
           } else {
             this.$toast.fail(res.msg);
           }