Browse Source

超级会员迁移

zhengjinyi 2 năm trước cách đây
mục cha
commit
583557af7e
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/views/member/coupon/edit.vue

+ 5 - 1
src/views/member/coupon/edit.vue

@@ -171,6 +171,10 @@ export default {
   components: { goodDialog, shopDialog },
   components: { goodDialog, shopDialog },
   data() {
   data() {
     return {
     return {
+      defaultShop: {
+        shopId: 0,
+        shopData: []
+      },
       form: {
       form: {
         formList: []
         formList: []
       },
       },
@@ -240,7 +244,7 @@ export default {
       if (data.coupons.length > 0) {
       if (data.coupons.length > 0) {
         this.delFlag = true
         this.delFlag = true
         this.form.formList = data.coupons.map((el) => {
         this.form.formList = data.coupons.map((el) => {
-          el.shopData = []
+          el = { ...el, ...this.defaultShop }
           if (el.shop) {
           if (el.shop) {
             el.shopData.push(el.shop)
             el.shopData.push(el.shop)
           }
           }