소스 검색

同城店铺新建流程重构

zhujindu 1 년 전
부모
커밋
7e7e846e48
3개의 변경된 파일28개의 추가작업 그리고 22개의 파일을 삭제
  1. 17 10
      src/views/storeManagement/index.vue
  2. 9 1
      src/views/storeManagement/storeDetail.vue
  3. 2 11
      src/views/storeManagement/success.vue

+ 17 - 10
src/views/storeManagement/index.vue

@@ -12,7 +12,7 @@
         </van-col>
       </van-row> -->
       <div class="selectFilter" v-if="tabVal == 1">
-        <van-dropdown-menu>
+        <van-dropdown-menu :close-on-click-overlay="false">
           <van-dropdown-item :title="dropdownTitle" ref="dropdownItem" @open="dropdownOpen">
             <van-cell
               center
@@ -392,6 +392,7 @@ export default {
     };
   },
   activated() {
+    this.initSelect();
     this.tabVal = '1';
     if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
       this.mapShows = false;
@@ -409,20 +410,20 @@ export default {
   watch: {
     $route(to, from) {
       if (to.path == '/storemanagement/index' && from.path == '/storeAdd') {
-        this.getStoreTypeList();
-        this.getstoreCoverPosition();
-        this.onSearch();
+        // this.getStoreTypeList();
+        // this.getstoreCoverPosition();
+        // this.onSearch();
       }
       if (to.path == '/storemanagement/index' && from.path == '/storeEdit') {
-        this.getStoreTypeList();
-        this.getstoreCoverPosition();
-        this.onSearch();
+        // this.getStoreTypeList();
+        // this.getstoreCoverPosition();
+        // this.onSearch();
       }
       if (to.path == '/storemanagement/index' && from.path == '/My/index') {
         this.tabVal = '1';
-        this.getStoreTypeList();
-        this.getstoreCoverPosition();
-        this.onSearch();
+        // this.getStoreTypeList();
+        // this.getstoreCoverPosition();
+        // this.onSearch();
       }
       if (localStorage.getItem('postType') == 'JZ' || localStorage.getItem('postType') == 'GZ') {
         this.mapShows = false;
@@ -433,6 +434,12 @@ export default {
     },
   },
   methods: {
+    initSelect() {
+      this.activatedTitles = [];
+      this.activatedValues = [];
+      this.dropdownTitle = '门店状态';
+      this.dropdownOpen();
+    },
     linkList(val) {
       this.$router.push({
         path: '/pItem',

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

@@ -1461,7 +1461,15 @@ export default {
               (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
             ) {
               localStorage.setItem('storeId', res.data.sfaStore.storeId);
-              window.location.replace(res.data.orderUrl);
+              // window.location.replace(res.data.orderUrl);
+              that.$dialog
+                .confirm({
+                  title: '测试测试',
+                  message: '测试测试',
+                })
+                .then(() => {
+                  window.open(res.data.orderUrl);
+                });
             } else {
               checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
                 localStorage.setItem('startTime', new Date());

+ 2 - 11
src/views/storeManagement/success.vue

@@ -70,20 +70,11 @@ export default {
       flag: true,
       lat: null,
       lon: null,
-      storeId: null,
     };
   },
-  created() {
-    this.storeId = localStorage.getItem('storeId');
+  activated() {
     this.addstoreRegister();
   },
-  watch: {
-    $route(to, from) {
-      if (to.path == '/success') {
-        this.addstoreRegister();
-      }
-    },
-  },
   methods: {
     addstoreRegister() {
       console.log('this.$route.query=' + JSON.stringify(this.$route.query));
@@ -100,7 +91,7 @@ export default {
     },
     // 返回订单详情也
     gobackStoreDetail() {
-      window.location.replace(window.location.origin + '/mobile/storeDetail?id=' + this.storeId);
+      window.location.replace(window.location.origin + '/mobile/storeDetail?id=' + this.fromValue);
     },
     visite() {
       var that = this;