From 2eed62b1e966f01529ac5e06615674040e265b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=9C=B3=E5=93=B2?= <wuzhenzhe@weixiuhui.cn> Date: Tue, 8 Jun 2021 19:01:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=8C=E5=B7=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/photo/list.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/photo/list.vue b/src/pages/photo/list.vue index c2bfcbc..6a79ad0 100644 --- a/src/pages/photo/list.vue +++ b/src/pages/photo/list.vue @@ -246,16 +246,17 @@ }, async closeTake(img) { if(img !==undefined){ + // å¤åˆ¶ä¸€ä»½ 用于ä¿å˜ + if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = [] + let saveList = JSON.parse(JSON.stringify(this.currentItemDate.orderImages)) + const files = img.map(v => v.path) const value = await this.saveToTask(files) - if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = [] - // å¤åˆ¶ä¸€ä»½ 用于ä¿å˜ - let saveList = this.currentItemDate.orderImages.concat(); value.map(item =>{ - // step1 æ·»åŠ ç¼“å˜å›¾ç‰‡ 到显示 - this.currentItemDate.orderImages.push(item.path) // 文件keyæ·»åŠ ä¿å˜æ•°ç»„ä¸ saveList.push(item.key) + // step1 æ·»åŠ ç¼“å˜å›¾ç‰‡ 到显示 + this.currentItemDate.orderImages.push(item.path) }) // step2 ä¿å˜å›¾ç‰‡ var data={ @@ -263,6 +264,7 @@ images : Array.from(saveList), fieldsName:this.currentItemDate.fieldName } + console.log("data", data) this.$u.api.saveImage(data,this.orderId).then((res) => { if (res.code == 200) { } else { -- 2.23.0