From eaaaeec4c9f4182f1612dcc0bb11026f2c1139f6 Mon Sep 17 00:00:00 2001 From: "jqtmviyu@gmail.com" Date: Fri, 26 Feb 2021 23:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E9=A2=84=E8=A7=88:?= =?UTF-8?q?=20uni.previewImage({=20urls,=20current=20})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/goods_detail/goods_detail.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/goods_detail/goods_detail.vue b/src/pages/goods_detail/goods_detail.vue index 8983cf5..1b2a3ab 100644 --- a/src/pages/goods_detail/goods_detail.vue +++ b/src/pages/goods_detail/goods_detail.vue @@ -3,7 +3,7 @@ - + @@ -27,6 +27,11 @@ export default { async getGoodsDetail(){ const { pics } = (await this.$u.api.getGoodsDetail({ goods_id: this.goods_id })).message this.pics = pics + }, + showBigImgHandle(current){ + const urls = this.pics.map(item => item.pics_big) + uni.previewImage({ urls, current }) + //Array. 数组内是字符串格式 } },