Browse Source

同城店铺新建流程重构

zhujindu 1 năm trước cách đây
mục cha
commit
ca1e67e295

+ 19 - 11
src/views/storeManagement/index.vue

@@ -392,18 +392,26 @@ export default {
     };
   },
   activated() {
-    this.initSelect();
-    this.tabVal = '1';
-    if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
-      this.mapShows = false;
+    // 是否从下单成功页面跳转过来
+    let id = localStorage.getItem('successStoreId');
+    if (this.$route.query.source == 'successPage' && id) {
+      // 跳转到详情页
+      this.storeDetailFn(id);
+      localStorage.removeItem('successStoreId');
     } else {
-      this.mapShows = true;
+      this.initSelect();
+      this.tabVal = '1';
+      if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
+        this.mapShows = false;
+      } else {
+        this.mapShows = true;
+      }
+      this.getStoreTypeList();
+      this.getstoreCoverPosition();
+      this.getStreetQuery();
+      this.getMonth();
+      this.onSearch();
     }
-    this.getStoreTypeList();
-    this.getstoreCoverPosition();
-    this.getStreetQuery();
-    this.getMonth();
-    this.onSearch();
   },
   // created() {
   // },
@@ -845,7 +853,7 @@ export default {
       this.$router.push('/storeAdd');
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.push('/My/index');
     },
     onSearch() {
       window.scrollTo(0, 0);

+ 1 - 9
src/views/storeManagement/storeAdd.vue

@@ -1835,15 +1835,7 @@ export default {
               res.data.orderUrl != null &&
               (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
             ) {
-              // window.location.replace(res.data.orderUrl);
-              that.$dialog
-                .confirm({
-                  title: '测试测试',
-                  message: '测试测试',
-                })
-                .then(() => {
-                  window.open(res.data.orderUrl);
-                });
+              window.location.replace(res.data.orderUrl);
             } else {
               that.$dialog
                 .confirm({

+ 6 - 1
src/views/storeManagement/success.vue

@@ -91,8 +91,13 @@ export default {
     },
     // 返回订单详情也
     gobackStoreDetail() {
+      // window.location.replace(
+      //   window.location.origin + '/mobile/storeDetail?id=' + this.fromValue.storeId
+      // );
+      localStorage.setItem('successStoreId', this.fromValue.storeId);
+      // 跳转到列表在跳到详情页
       window.location.replace(
-        window.location.origin + '/mobile/storeDetail?id=' + this.fromValue.storeId
+        window.location.origin + '/mobile/storemanagementlist?source=successPage'
       );
     },
     visite() {