storeBelieveInLight 1 year ago
parent
commit
07e23363c8

+ 27 - 2
commit/product.js

@@ -286,7 +286,7 @@ export function shippingListApi(data) {
286
 /**
286
 /**
287
  * 添加商品
287
  * 添加商品
288
  */
288
  */
289
-export function addProduct(data) {
289
+export function addProduct(id,data) {
290
     return myRequestPhp({
290
     return myRequestPhp({
291
         url: `${pre}mer/store/product/create`,
291
         url: `${pre}mer/store/product/create`,
292
         method: 'POST',
292
         method: 'POST',
@@ -390,4 +390,29 @@ export function getMerchantProfitApi(data) {
390
         data,
390
         data,
391
         apiType
391
         apiType
392
     })
392
     })
393
-}
393
+}
394
+
395
+
396
+//产品详情
397
+export function getProductDetail(id,data){
398
+	
399
+	return myRequestPhp({
400
+	    url: `${pre}mer/store/product/detail/${id}`,
401
+	    method: 'GET',
402
+	    data,
403
+	    apiType
404
+	})
405
+}
406
+
407
+//产品gengx
408
+export function updateProduct(id,data){
409
+	
410
+	return myRequestPhp({
411
+	    url: `${pre}mer/store/product/update/${id}`,
412
+	    method: 'POST',
413
+	    data,
414
+	    apiType
415
+	})
416
+}
417
+
418
+

+ 18 - 1
components/editor.vue

@@ -201,7 +201,24 @@ export default {
201
       formats: {},
201
       formats: {},
202
     };
202
     };
203
   },
203
   },
204
-
204
+  watch: {
205
+    value:{
206
+      handler(val){
207
+         this.richText = val
208
+         console.log(val)
209
+         if(val){
210
+          this.$nextTick(()=>{
211
+            this.onEditorReady()
212
+          })
213
+         }
214
+      },
215
+      deep:true,
216
+    },
217
+  },
218
+  mounted(){
219
+     this.richText = this.value;
220
+     this.onEditorReady()
221
+  },
205
   methods: {
222
   methods: {
206
     readOnlyChange() {
223
     readOnlyChange() {
207
       this.readOnly = !this.readOnly;
224
       this.readOnly = !this.readOnly;

+ 124 - 26
shop/productManagementModule/addProduct.vue

@@ -13,11 +13,13 @@
13
       <uploadVue
13
       <uploadVue
14
         formItemTitle="商品封面"
14
         formItemTitle="商品封面"
15
         :maxLimit="1"
15
         :maxLimit="1"
16
+        :fileList="fengMianImage"
16
         @changeFiles="changeFilesfengmian"
17
         @changeFiles="changeFilesfengmian"
17
       ></uploadVue>
18
       ></uploadVue>
18
       <!-- 商品轮播图 -->
19
       <!-- 商品轮播图 -->
19
       <uploadVue
20
       <uploadVue
20
         formItemTitle="商品轮播图"
21
         formItemTitle="商品轮播图"
22
+        :fileList="lunBoTuImage"
21
         @changeFiles="changeFileslunbotu"
23
         @changeFiles="changeFileslunbotu"
22
       ></uploadVue>
24
       ></uploadVue>
23
 
25
 
@@ -366,6 +368,8 @@ import {
366
   addProduct,
368
   addProduct,
367
   productConfigApi,
369
   productConfigApi,
368
   getMerchantProfitApi,
370
   getMerchantProfitApi,
371
+  getProductDetail,
372
+  updateProduct,
369
 } from "@/commit/product.js";
373
 } from "@/commit/product.js";
370
 import { getBaseInfo } from "@/commit/user.js";
374
 import { getBaseInfo } from "@/commit/user.js";
371
 import { accMul, accDiv, accAdd, accSub } from "@/utils/acc.js";
375
 import { accMul, accDiv, accAdd, accSub } from "@/utils/acc.js";
@@ -460,21 +464,112 @@ export default {
460
         volume: "", //商品体积(m³)
464
         volume: "", //商品体积(m³)
461
       },
465
       },
462
       costInputValue: "",
466
       costInputValue: "",
467
+      clickType: "create",
468
+      product_id: "",
469
+      fengMianImage: [], //封面
470
+      lunBoTuImage: [], //轮播图
463
     };
471
     };
464
   },
472
   },
465
-  async onLoad() {
466
-    await this.initData();
473
+  async onLoad(e) {
474
+    this.product_id = e.product_id || "";
475
+    this.clickType = e.clickType;
476
+     await this.getGoodsClassCategoryData();
477
+      await this.getMerchantProfit();
478
+    if (this.clickType == "updated" && this.product_id) {
479
+      uni.showLoading({
480
+        title: "加载中",
481
+        mask: true,
482
+      });
483
+      await this.getProductDetailData(this.product_id);
484
+    }
485
+     await this.initData();
467
   },
486
   },
468
   onShow() {},
487
   onShow() {},
469
   methods: {
488
   methods: {
489
+    async getProductDetailData(id) {
490
+      try {
491
+        const res = await getProductDetail(id);
492
+        if (res.data.status == 200) {
493
+          let data = res.data.data || {};
494
+          let attrValue = (data.attrValue && data.attrValue[0]) || {};
495
+          this.formData.store_name = data.store_name;
496
+          this.formData.unit_name = data.unit_name;
497
+          this.formData.brand_id = data.brand_id;
498
+          this.formData.temp_id = data.temp_id;
499
+          this.formData.type = String(data.type);
500
+          this.formData.spec_type = String(data.spec_type);
501
+          this.formData.extension_type = String(data.extension_type);
502
+          this.formData.cate_id = data.cate_id;
503
+          this.formData.store_info = data.store_info;
504
+          this.formData.content = data.content;
505
+          this.attrValueForm.extension_one = attrValue.extension_one;
506
+          this.attrValueForm.cost = attrValue.cost;
507
+          this.priceDefault = attrValue.price;
508
+          this.attrValueForm.ot_price = attrValue.ot_price;
509
+          this.attrValueForm.stock = attrValue.stock;
510
+          this.attrValueForm.bar_code = attrValue.bar_code;
511
+          this.attrValueForm.weight = attrValue.weight;
512
+          this.attrValueForm.volume = attrValue.volume;
513
+          console.log(this.fengMianImage, "this.fengMianImage999");
514
+          console.log(this.pingtaiData, "this.fengMianImage999his.pingtaiData");
515
+          let dataArr = this.convertToFlatArray(this.pingtaiData);
516
+          console.log(this.fengMianImage, "this.fengMianImage99945454545");
517
+          const findObj =
518
+            dataArr.find((item) => item.value == data.cate_id) || {};
519
+          this.pingtaifeilei.name = findObj.label || "";
520
+          this.pingtaifeilei.id = findObj.value || data.cate_id || "";
521
+          console.log(this.base_commission,"this.base_commission")
522
+          this.getCalcAfterPrice({
523
+            extension_one:attrValue.extension_one,
524
+            cost:this.attrValueForm.cost
525
+          })
526
+          if (data.image) {
527
+            this.fengMianImage = [];
528
+            let fenMian = {
529
+              //封面
530
+              path: data.image,
531
+              Files: [],
532
+            };
533
+            this.fengMianImage.push(fenMian);
534
+          }
535
+          console.log(this.fengMianImage, "this.fengMianImage");
536
+          if (data.slider_image && data.slider_image.length > 0) {
537
+            this.lunBoTuImage = [];
538
+            data.slider_image.forEach((item) => {
539
+              let lunBoTu = {
540
+                //轮播图
541
+                path: item,
542
+                Files: [],
543
+              };
544
+              this.lunBoTuImage.push(lunBoTu);
545
+            });
546
+          }
547
+        }
548
+        uni.hideLoading();
549
+      } catch (error) {
550
+        uni.hideLoading();
551
+      }
552
+    },
470
     async initData() {
553
     async initData() {
471
       await this.getBrandSelectData();
554
       await this.getBrandSelectData();
472
       await this.getShippingListData();
555
       await this.getShippingListData();
473
       await this.getGoodsClassData();
556
       await this.getGoodsClassData();
474
-      await this.getGoodsClassCategoryData();
557
+    
475
       await this.productCon();
558
       await this.productCon();
476
       await this.getMerInfo();
559
       await this.getMerInfo();
477
-      await this.getMerchantProfit();
560
+     
561
+    },
562
+    convertToFlatArray(data) {
563
+     return Array.isArray(data)
564
+        ? data.flatMap((node) => {
565
+            const { value, label, children = [] } = node;
566
+            if (typeof value !== "number" || typeof label !== "string")
567
+              return [];
568
+            return Array.isArray(children)
569
+              ? [{ value, label }, ...convertToFlatArray(children)]
570
+              : [{ value, label }];
571
+          })
572
+        : [];
478
     },
573
     },
479
     productCon() {
574
     productCon() {
480
       productConfigApi()
575
       productConfigApi()
@@ -566,7 +661,7 @@ export default {
566
       const { data } = e;
661
       const { data } = e;
567
       const lastItem = data[data.length - 1];
662
       const lastItem = data[data.length - 1];
568
       this.selectData = data || [];
663
       this.selectData = data || [];
569
-      console.log(lastItem, "pickerCallback回調");
664
+      console.log(lastItem, "pickerCallcate_idcate_idcate_idback回調");
570
       this.formData.mer_cate_id.push(lastItem.id);
665
       this.formData.mer_cate_id.push(lastItem.id);
571
       this.classification = lastItem || {};
666
       this.classification = lastItem || {};
572
     },
667
     },
@@ -589,7 +684,7 @@ export default {
589
       const { data } = e;
684
       const { data } = e;
590
       const lastItem = data[data.length - 1];
685
       const lastItem = data[data.length - 1];
591
       this.selectData = data || [];
686
       this.selectData = data || [];
592
-      console.log(lastItem, "pickerCallbackpintai");
687
+      console.log(lastItem, "pickerCallback99999pintai");
593
       this.pingtaifeilei = lastItem || {};
688
       this.pingtaifeilei = lastItem || {};
594
     },
689
     },
595
     bindTextAreaBlur(e) {
690
     bindTextAreaBlur(e) {
@@ -673,14 +768,18 @@ export default {
673
         });
768
         });
674
         return;
769
         return;
675
       }
770
       }
676
-      if(this.attrValueForm.extension_one <5 || this.attrValueForm.extension_one > 100 || this.attrValueForm.extension_one == ""){
771
+      if (
772
+        this.attrValueForm.extension_one < 5 ||
773
+        this.attrValueForm.extension_one > 100 ||
774
+        this.attrValueForm.extension_one == ""
775
+      ) {
677
         uni.showToast({
776
         uni.showToast({
678
           title: "请填写正确的分润比例",
777
           title: "请填写正确的分润比例",
679
-          icon: "none", 
680
-        })
778
+          icon: "none",
779
+        });
681
         return;
780
         return;
682
       }
781
       }
683
-       
782
+
684
       if (this.formData.store_info == "") {
783
       if (this.formData.store_info == "") {
685
         uni.showToast({
784
         uni.showToast({
686
           title: "请填写商品简介",
785
           title: "请填写商品简介",
@@ -688,19 +787,20 @@ export default {
688
         });
787
         });
689
         return;
788
         return;
690
       }
789
       }
691
-      this.attrValueForm.image =  this.formData.image 
692
-
693
-
694
-
790
+      this.attrValueForm.image = this.formData.image;
791
+      this.formData.cate_id = this.pingtaifeilei.id; //平台商品分类
695
       // 转换为包含合并后对象的数组
792
       // 转换为包含合并后对象的数组
696
-      const result = [{  ...this.attrValueForm }];
793
+      const result = [{ ...this.attrValueForm }];
697
       const newParams = { ...this.formData, attrValue: result };
794
       const newParams = { ...this.formData, attrValue: result };
698
       console.log(newParams, "newParams");
795
       console.log(newParams, "newParams");
699
       uni.showLoading({
796
       uni.showLoading({
700
         title: "数据提交中...",
797
         title: "数据提交中...",
701
       });
798
       });
799
+      let req = this.clickType === "updated" ? updateProduct : addProduct
800
+      let product_id = this.clickType === "updated"? this.product_id : ""
801
+
702
       try {
802
       try {
703
-        const res = await addProduct(newParams);
803
+        const res = await req(product_id,newParams);
704
         if (res.data.status == 200) {
804
         if (res.data.status == 200) {
705
           uni.showToast({
805
           uni.showToast({
706
             title: "数据提交成功",
806
             title: "数据提交成功",
@@ -772,19 +872,18 @@ export default {
772
           title: "分润比例不能小于5%",
872
           title: "分润比例不能小于5%",
773
           icon: "none",
873
           icon: "none",
774
         });
874
         });
775
-        this.$nextTick(()=>{
776
-        this.attrValueForm.extension_one = '5';
777
-        })
875
+        this.$nextTick(() => {
876
+          this.attrValueForm.extension_one = "5";
877
+        });
778
       }
878
       }
779
       if (value > 100) {
879
       if (value > 100) {
780
         uni.showToast({
880
         uni.showToast({
781
           title: "分润比例不能大于100%",
881
           title: "分润比例不能大于100%",
782
           icon: "none",
882
           icon: "none",
783
         });
883
         });
784
-        this.$nextTick(()=>{
785
-        this.attrValueForm.extension_one = this.base_commission;
786
-        })
787
-
884
+        this.$nextTick(() => {
885
+          this.attrValueForm.extension_one = this.base_commission;
886
+        });
788
       }
887
       }
789
 
888
 
790
       let data = {
889
       let data = {
@@ -844,10 +943,9 @@ export default {
844
       }
943
       }
845
 
944
 
846
       const formatted = this.limitPriceFormat(value);
945
       const formatted = this.limitPriceFormat(value);
847
-        this.$nextTick(()=>{
946
+      this.$nextTick(() => {
848
         _this.attrValueForm.ot_price = formatted;
947
         _this.attrValueForm.ot_price = formatted;
849
-        })
850
-     
948
+      });
851
     },
949
     },
852
 
950
 
853
     limitPriceFormat(value) {
951
     limitPriceFormat(value) {

+ 22 - 5
shop/productManagementModule/components/upload.vue

@@ -69,6 +69,20 @@ export default {
69
       type: Number,
69
       type: Number,
70
       default: 0,
70
       default: 0,
71
     },
71
     },
72
+    fileList: {
73
+      type: Array,
74
+      default: () => [],
75
+    },
76
+  },
77
+  watch: {
78
+    fileList: {
79
+      handler(newVal) {
80
+        console.log(newVal, "newVal");
81
+        this.fileListData = newVal;
82
+        this.emitChangeFiles(newVal);
83
+      },
84
+      deep: true,
85
+    },
72
   },
86
   },
73
   data() {
87
   data() {
74
     return {
88
     return {
@@ -76,6 +90,10 @@ export default {
76
       paths: "",
90
       paths: "",
77
     };
91
     };
78
   },
92
   },
93
+  mounted() {
94
+    this.fileListData = this.fileList;
95
+    this.emitChangeFiles(this.fileListData);
96
+  },
79
   methods: {
97
   methods: {
80
     emitChangeFiles(data) {
98
     emitChangeFiles(data) {
81
       this.$emit("changeFiles", {
99
       this.$emit("changeFiles", {
@@ -94,10 +112,9 @@ export default {
94
         // sizeType: ["compressed"], // original 原图,compressed 压缩图,默认二者都有
112
         // sizeType: ["compressed"], // original 原图,compressed 压缩图,默认二者都有
95
         sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
113
         sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
96
         success: async function (res) {
114
         success: async function (res) {
97
-            const tempFiles = res.tempFiles;
98
-            const tempFilePaths = res.tempFilePaths;
115
+          const tempFiles = res.tempFiles;
116
+          const tempFilePaths = res.tempFilePaths;
99
           if (that.fileListData.length === 0) {
117
           if (that.fileListData.length === 0) {
100
-          
101
             const data = await that.uploadFileData(tempFiles[0]);
118
             const data = await that.uploadFileData(tempFiles[0]);
102
             if (!data) {
119
             if (!data) {
103
               that.fileListData = [];
120
               that.fileListData = [];
@@ -167,14 +184,14 @@ export default {
167
             }
184
             }
168
             resolve(this.paths);
185
             resolve(this.paths);
169
             console.log("上传成功", JSON.parse(res.data));
186
             console.log("上传成功", JSON.parse(res.data));
170
-             uni.hideLoading();
187
+            uni.hideLoading();
171
             uni.hideToast();
188
             uni.hideToast();
172
           },
189
           },
173
           fail: (err) => {
190
           fail: (err) => {
174
             console.error("上传失败", err);
191
             console.error("上传失败", err);
175
             this.paths = "";
192
             this.paths = "";
176
             resolve(this.paths);
193
             resolve(this.paths);
177
-             uni.hideLoading();
194
+            uni.hideLoading();
178
             uni.hideToast();
195
             uni.hideToast();
179
           },
196
           },
180
           complete: () => {
197
           complete: () => {

+ 7 - 0
shop/productManagementModule/index.vue

@@ -30,6 +30,8 @@
30
        class="mb-t1" 
30
        class="mb-t1" 
31
       :fullSreen="true"
31
       :fullSreen="true"
32
         fullSreenTitle="在线选品列表"  @custom-handle-click="onHandleXuanPin"></listCardInfo> -->
32
         fullSreenTitle="在线选品列表"  @custom-handle-click="onHandleXuanPin"></listCardInfo> -->
33
+		
34
+		 <listCardInfo headerTitle="添加商品" class="mb-t1" :fullSreen="true" fullSreenTitle="添加单规格商品" @custom-handle-click="addProductRuKou"></listCardInfo>
33
     </view>
35
     </view>
34
   </view>
36
   </view>
35
 </template>
37
 </template>
@@ -201,6 +203,11 @@ export default {
201
     }
203
     }
202
   },
204
   },
203
   methods: {
205
   methods: {
206
+	  addProductRuKou(){
207
+		  uni.redirectTo({
208
+		  	url:`./addProduct?clickType=create`
209
+		  })
210
+	  },
204
     async getGoodsTabNum() {
211
     async getGoodsTabNum() {
205
       try {
212
       try {
206
         const res = await getGoodsTab();
213
         const res = await getGoodsTab();

+ 63 - 14
shop/productManagementModule/productManagement.vue

@@ -74,9 +74,17 @@
74
               <button
74
               <button
75
                 class="list-card-bottom-btn-list--item set-activity active"
75
                 class="list-card-bottom-btn-list--item set-activity active"
76
                 @click="huodong(item, index)"
76
                 @click="huodong(item, index)"
77
+                v-if="type != 1 && type != 2"
77
               >
78
               >
78
                 活动
79
                 活动
79
               </button>
80
               </button>
81
+              <button
82
+                class="list-card-bottom-btn-list--item edit-activity active"
83
+                @click="editProduct(item, index)"
84
+                v-if="type == 1 || type == 2"
85
+              >
86
+                编辑
87
+              </button>
80
               <!-- v-if="tableFrom.type === '5'" -->
88
               <!-- v-if="tableFrom.type === '5'" -->
81
               <button
89
               <button
82
                 v-if="type == 5"
90
                 v-if="type == 5"
@@ -203,6 +211,7 @@ import {
203
   productDeleteApi,
211
   productDeleteApi,
204
   productRestoreApi,
212
   productRestoreApi,
205
   Addseckill, //活动
213
   Addseckill, //活动
214
+  getProductDetail,
206
 } from "@/commit/product.js";
215
 } from "@/commit/product.js";
207
 //商品列表
216
 //商品列表
208
 export default {
217
 export default {
@@ -289,15 +298,15 @@ export default {
289
     await this.getGoodsTabData();
298
     await this.getGoodsTabData();
290
     await this.getProductListData();
299
     await this.getProductListData();
291
   },
300
   },
292
-  async onPullDownRefresh() {
301
+  onPullDownRefresh() {
293
     uni.showLoading({
302
     uni.showLoading({
294
       title: "加载中",
303
       title: "加载中",
295
     });
304
     });
296
     this.page = 1;
305
     this.page = 1;
297
     this.is_panudn = true;
306
     this.is_panudn = true;
298
     this.list = [];
307
     this.list = [];
299
-    await this.getProductListData();
300
-     uni.hideLoading();
308
+    this.getProductListData();
309
+    uni.hideLoading();
301
   },
310
   },
302
   onReachBottom() {
311
   onReachBottom() {
303
     console.log("onReachBottom");
312
     console.log("onReachBottom");
@@ -348,13 +357,13 @@ export default {
348
         is_gift_bag: this.is_gift_bag,
357
         is_gift_bag: this.is_gift_bag,
349
         p_type: this.p_type,
358
         p_type: this.p_type,
350
       };
359
       };
351
-
360
+      uni.showLoading({
361
+        title: "加载中",
362
+      });
352
       try {
363
       try {
353
-        uni.showLoading({
354
-          title: "加载中",
355
-        });
356
         const res = await getProductList(params);
364
         const res = await getProductList(params);
357
-         uni.hideLoading();
365
+        uni.hideLoading();
366
+        uni.stopPullDownRefresh();
358
         if (res.data.status == 200) {
367
         if (res.data.status == 200) {
359
           this.tihsi = res.data.data.list.length;
368
           this.tihsi = res.data.data.list.length;
360
           if (res.data.data.count > 0) {
369
           if (res.data.data.count > 0) {
@@ -392,7 +401,7 @@ export default {
392
     async onHandleShow(item, type) {
401
     async onHandleShow(item, type) {
393
       const id = item.product_id;
402
       const id = item.product_id;
394
       const data = {
403
       const data = {
395
-        status: item.is_show==1?0:1,
404
+        status: item.is_show == 1 ? 0 : 1,
396
       };
405
       };
397
       const titleTips = item.is_show == 1 ? "商品下架中" : "商品上架中";
406
       const titleTips = item.is_show == 1 ? "商品下架中" : "商品上架中";
398
       const titleMsg = item.is_show == 1 ? "商品下架成功" : "商品上架成功";
407
       const titleMsg = item.is_show == 1 ? "商品下架成功" : "商品上架成功";
@@ -406,12 +415,12 @@ export default {
406
             title: titleMsg,
415
             title: titleMsg,
407
             icon: "none",
416
             icon: "none",
408
           });
417
           });
409
-          await this.getGoodsTabData()
418
+          await this.getGoodsTabData();
410
           await this.getProductListData();
419
           await this.getProductListData();
411
-           uni.hideLoading();
420
+          uni.hideLoading();
412
         }
421
         }
413
       } catch (error) {
422
       } catch (error) {
414
-         uni.hideLoading();
423
+        uni.hideLoading();
415
       } finally {
424
       } finally {
416
         uni.hideLoading();
425
         uni.hideLoading();
417
         uni.hideToast();
426
         uni.hideToast();
@@ -494,7 +503,7 @@ export default {
494
     huodong(item) {
503
     huodong(item) {
495
       this.dataObj = item;
504
       this.dataObj = item;
496
       const _this = this;
505
       const _this = this;
497
-      if (item.seckill == 1 && this.type !=2) {
506
+      if (item.seckill == 1 && this.type != 2) {
498
         uni.showModal({
507
         uni.showModal({
499
           title: "温馨提示",
508
           title: "温馨提示",
500
           content: "此商品正在处于秒杀状态,请勿操作",
509
           content: "此商品正在处于秒杀状态,请勿操作",
@@ -503,7 +512,7 @@ export default {
503
         });
512
         });
504
         return;
513
         return;
505
       }
514
       }
506
-       _this.showPopup()
515
+      _this.showPopup();
507
       // Addseckill({}).then(data=>{
516
       // Addseckill({}).then(data=>{
508
       //   console.log(data)
517
       //   console.log(data)
509
       // }).catch((res) => {
518
       // }).catch((res) => {
@@ -597,6 +606,42 @@ export default {
597
         this.isEmpty = false;
606
         this.isEmpty = false;
598
       }
607
       }
599
     },
608
     },
609
+    async editProduct(item, index) {
610
+      const isU = await this.getProductType(item.product_id);
611
+      if (isU == "single") {
612
+        uni.redirectTo({
613
+          url: `./addProduct?clickType=updated&product_id=${item.product_id}`,
614
+        });
615
+      } else if (isU == "multi") {
616
+        uni.showModal({
617
+          content: "非单规格产品,不支持移动端编辑,请前往PC端编辑",
618
+          showCancel: false,
619
+        });
620
+      } else {
621
+        uni.showModal({
622
+          content: "网络错误",
623
+          showCancel: false,
624
+        });
625
+      }
626
+      console.log(item, index, isU);
627
+    },
628
+    async getProductType(id) {
629
+      uni.showLoading({
630
+        title: "正在跳转",
631
+      });
632
+      try {
633
+        const res = await getProductDetail(id);
634
+        if (res.data.status == 200) {
635
+          return res.data.data.spec_type == 0 ? "single" : "multi";
636
+        } else {
637
+          return false;
638
+        }
639
+      } catch (err) {
640
+        return false;
641
+      } finally {
642
+        uni.hideLoading();
643
+      }
644
+    },
600
   },
645
   },
601
 };
646
 };
602
 </script>
647
 </script>
@@ -766,6 +811,10 @@ page {
766
               background: #e9ca1d;
811
               background: #e9ca1d;
767
               color: white;
812
               color: white;
768
             }
813
             }
814
+            &.edit-activity {
815
+              background: #e9ca1d;
816
+              color: white;
817
+            }
769
 
818
 
770
             &:active {
819
             &:active {
771
               opacity: 0.8;
820
               opacity: 0.8;