wangfei 6 years ago
parent
commit
4c42f229a9
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/pages/system/cardAndCouponManager/cardManager/edit.vue

+ 7
- 1
src/pages/system/cardAndCouponManager/cardManager/edit.vue View File

405
       this.$router.push({ name: 'couponList' })
405
       this.$router.push({ name: 'couponList' })
406
     },
406
     },
407
     handleAvatarSuccess (res, file) {
407
     handleAvatarSuccess (res, file) {
408
-      this.cardInfo.Images[0].CardImageUrl = res.result.url
408
+      if ((this.cardInfo.Images || []).length > 0) {
409
+        this.cardInfo.Images[0].CardImageUrl = res.result.url
410
+      } else {
411
+        this.cardInfo.Images = [{
412
+          CardImageUrl: res.result.url,
413
+        }]
414
+      }
409
     }
415
     }
410
   }
416
   }
411
 }
417
 }