Browse Source

修改登录返回404的问题

shenjj 7 years ago
parent
commit
5654816ed0
2 changed files with 22 additions and 13 deletions
  1. 21 12
      pages/mobile/center/vendor/productdetails.vue
  2. 1 1
      pages/mobile/product/_batchCode.vue

+ 21 - 12
pages/mobile/center/vendor/productdetails.vue

@@ -72,8 +72,8 @@
           <div class="selectInput selectInput2" @click.stop="showdropmenu('store')">
             <span v-if="chooseItem.storeInfoOms">{{chooseItem.storeInfoOms}}</span>
             <span v-else>{{chooseItem.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}</span>
-            <img src="/images/mobile/product/drop_icon.png"/>
-            <ul :class="{active : showDrop === 'store' }">
+            <img src="/images/mobile/product/drop_icon.png" v-if="!ShowShopshelfOff"/>
+            <ul :class="{active : showDrop === 'store' }" v-if="!ShowShopshelfOff">
               <li v-for="item in storeObj" @click.stop="chooseStore(item)">{{item}}</li>
             </ul>
           </div>
@@ -164,6 +164,12 @@
     computed: {
       GetchooseItem() {
         this.chooseItem = deepCopy(this.$store.state.product.brand.onSaleDetails.data)
+      },
+      storeInfoStore() {
+        return this.$store.state.option.storeStatus.data
+      },
+      ShowShopshelfOff() {
+        return (this.storeInfoStore.storeName.indexOf('优软测试二') > -1 || this.storeInfoStore.storeName.indexOf('优软商城') > -1)
       }
     },
     methods: {
@@ -357,11 +363,11 @@
       },
       // 保存
       save() {
-      // else if (!/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(this.chooseItem.produceDate)) {
-      //     this.timeoutCount++
-      //     this.collectResult = '请输入正确的生产日期'
-      //     return false
-      //   }
+        // else if (!/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(this.chooseItem.produceDate)) {
+        //     this.timeoutCount++
+        //     this.collectResult = '请输入正确的生产日期'
+        //     return false
+        //   }
         if (!this.chooseItem.reserve && toString(this.chooseItem.reserve).trim()) {
           this.timeoutCount++
           this.collectResult = '库存不能为空'
@@ -445,12 +451,15 @@
             return false
           }
         }
-        if (this.chooseItem.storeid === '33069557578d44e69bd91ad12d28a8d4') {
-          this.chooseItem.selfSale = 1
-        } else {
-          this.chooseItem.selfSale = 2
+        this.chooseItem.selfSale = 2
+        if (this.storeInfoStore.uuid) {
+          if (this.chooseItem.storeInfoOms === '寄售') {
+            this.chooseItem.selfSale = 2
+          } else if (this.chooseItem.storeInfoOms === '自营') {
+            this.chooseItem.selfSale = 1
+          }
         }
-        this.chooseItem.prices[2].end = '9999999999'
+        this.chooseItem.prices[this.chooseItem.prices.length - 1].end = '9999999999'
         this.$http.put('/trade/goods', this.chooseItem).then(res => {
           if (res.data.success) {
             this.timeoutCount++

+ 1 - 1
pages/mobile/product/_batchCode.vue

@@ -212,7 +212,7 @@
             line-height: .76rem;
           }
           .focus-wrap {
-            width: .8rem;
+            width: .9rem;
             text-align: center;
             margin-left: .15rem;
             i {