From e521e723d502cba40cef6535b2a6580e3856b3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Wed, 11 Aug 2021 11:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=A5=BC=E5=B1=82=E8=A3=85=E4=BF=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili-floor-renovation/wap/decorate.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/manager/src/views/lili-floor-renovation/wap/decorate.vue b/manager/src/views/lili-floor-renovation/wap/decorate.vue index d47f53db..dfea9350 100644 --- a/manager/src/views/lili-floor-renovation/wap/decorate.vue +++ b/manager/src/views/lili-floor-renovation/wap/decorate.vue @@ -146,7 +146,7 @@ import { modelData } from "./config"; import ways from "@/views/lili-dialog/wap.js"; // 选择链接的类型 export default { components: { - ossManage + ossManage, }, data() { return { @@ -179,16 +179,18 @@ export default { }, // 回调的商品信息 selectedGoodsData(val) { + if (!val) return false; - val.forEach((item) => { + let data = val.map((item) => { delete item.selected; - item.img = item.thumbnail; - item.title = item.goodsName; - item.type = this.selectedGoods.title; + return { + img: item.thumbnail, + title: item.goodsName, + type: this.selectedGoods.title, + ...item + }; }); - this.res.options.list[0].listWay = this.res.options.list[0].listWay.concat( - val - ); + this.res.options.list[0].listWay.push(...data); this.linkType = ""; }, // 绑定商品