wangfei hace 6 años
padre
commit
4c42f229a9
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7
    1
      src/pages/system/cardAndCouponManager/cardManager/edit.vue

+ 7
- 1
src/pages/system/cardAndCouponManager/cardManager/edit.vue Ver fichero

@@ -405,7 +405,13 @@ export default {
405 405
       this.$router.push({ name: 'couponList' })
406 406
     },
407 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
 }