Browse Source

店铺tab 售后图片

cr 3 years ago
parent
commit
912a0c0b89
3 changed files with 45 additions and 9 deletions
  1. 40 8
      src/pages/goods/index.vue
  2. 4 0
      src/pages/order/afterSaleApply.vue
  3. 1 1
      src/pages/user/index.vue

+ 40 - 8
src/pages/goods/index.vue

@@ -125,12 +125,17 @@
125 125
         </div>
126 126
 
127 127
         <div class="tab" v-if="enableYouXuan">
128
-            <div @click="tabClick('0')" :class="{ on: curTab === '0' }">
129
-                店铺
128
+            <div
129
+                v-for="item of pageTabList"
130
+                :key="item.name"
131
+                @click="tabClick(item.value)"
132
+                :class="{ on: curTab === item.value }"
133
+            >
134
+                {{ item.title }}
130 135
             </div>
131
-            <div @click="tabClick('1')" :class="{ on: curTab === '1' }">
136
+            <!-- <div @click="tabClick('1')" :class="{ on: curTab === '1' }">
132 137
                 厂商直邮
133
-            </div>
138
+            </div> -->
134 139
         </div>
135 140
 
136 141
         <!-- :class="{ dis: categoryDis }" -->
@@ -193,7 +198,11 @@ export default {
193 198
                 selfProductCount: "",
194 199
                 youXuanProductCount: "",
195 200
             },
196
-            shopId:'',
201
+            shopId: "",
202
+            pageTabList: [
203
+                { name: "shop", index: 0, title: "店铺" },
204
+                { name: "yx", index: 1, title: "厂商直邮" },
205
+            ],
197 206
         };
198 207
     },
199 208
     filters: {},
@@ -219,10 +228,10 @@ export default {
219 228
         this.loginAfter = true;
220 229
         // this.getShopData();
221 230
         if (this.$refs.category) {
222
-            this.$refs.category.refresh(this.shopId!==this.activeShop.id);
231
+            this.$refs.category.refresh(this.shopId !== this.activeShop.id);
223 232
         }
224 233
         if (this.$refs.recommend) {
225
-            this.$refs.recommend.refresh(this.shopId!==this.activeShop.id);
234
+            this.$refs.recommend.refresh(this.shopId !== this.activeShop.id);
226 235
         }
227 236
         this.shopId = this.activeShop.id;
228 237
         this.initTab();
@@ -242,12 +251,35 @@ export default {
242 251
             this.fn.updateShop(this.$store.state.common.activeShop.id, () => {
243 252
                 this.shopInfo = this.$store.state.common.activeShop;
244 253
             });
254
+            console.log(this.enableYouXuan);
245 255
             if (!this.enableYouXuan) {
246 256
                 this.curTab = "0";
257
+            } else {
258
+                this.api.get("/Shop/getTab",{storeId:this.activeShop.store.id}).then((res) => {
259
+                    this.pageTabList = JSON.parse(res.data);
260
+                    this.pageTabList.sort((x, y) => x.index - y.index);
261
+                    let yxIndex = 0;
262
+                    let shopIndex = 0;
263
+                    for (let item of this.pageTabList) {
264
+                        if (item.name === "shop") {
265
+                            item.value = "0";
266
+                            shopIndex = item.index;
267
+                        }
268
+                        if (item.name === "yx") {
269
+                            item.value = "1";
270
+                            yxIndex = item.index;
271
+                        }
272
+                    }
273
+                    console.log(yxIndex, shopIndex);
274
+                    if (yxIndex < shopIndex) {
275
+                        this.curTab = "1";
276
+                    }
277
+                    this.pageTabList = [...this.pageTabList];
278
+                });
247 279
             }
248 280
             this.api.get("/Product/GetCount").then((res) => {
249 281
                 //有优选
250
-                // this.productCount = res.data;
282
+                this.productCount = res.data;
251 283
             });
252 284
         },
253 285
 

+ 4 - 0
src/pages/order/afterSaleApply.vue

@@ -340,6 +340,10 @@ export default {
340 340
             } else if (self.refundPriceText) {
341 341
                 self.fn.showToast("退款金额不正确");
342 342
             } else {
343
+                if(this.refundType==='1' && this.orderStatus!='20'){
344
+                    return self.fn.showToast("退货必须上传图片");
345
+                }
346
+
343 347
                 if (self.applyId && self.type === "update") {
344 348
                     // 修改申请
345 349
                     self.api

+ 1 - 1
src/pages/user/index.vue

@@ -279,7 +279,7 @@
279 279
         </div>
280 280
 
281 281
         <div class="web-support">
282
-            <p class="text">0.0.985</p>
282
+            <p class="text">0.0.986</p>
283 283
             <!-- <div class="num" @click="makeCall">400-629-6782</div> -->
284 284
         </div>
285 285
     </div>