From de217d7f6fe437a2fb51d3397ef753e32e288597 Mon Sep 17 00:00:00 2001
From: Gao xiaosong <704041637@qq.com>
Date: Wed, 18 Nov 2020 00:35:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E5=92=8C=E5=8A=A0=E5=85=A5=E8=B4=AD?=
=?UTF-8?q?=E7=89=A9=E8=BD=A6=E5=B1=9E=E6=80=A7=E5=9B=BE=E6=97=A0=E6=B3=95?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E6=94=BE=E5=A4=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/ProductConSwiper.vue | 36 ++++++++++++++++++----------
components/ProductWindow.vue | 42 +++++++++++++++++++++++----------
2 files changed, 53 insertions(+), 25 deletions(-)
diff --git a/components/ProductConSwiper.vue b/components/ProductConSwiper.vue
index 3863c86..2e2d5d8 100644
--- a/components/ProductConSwiper.vue
+++ b/components/ProductConSwiper.vue
@@ -1,9 +1,13 @@
-
+
-
+
@@ -27,35 +31,41 @@ export default {
props: {
imgUrls: {
type: Array,
- default: () => []
- }
+ default: () => [],
+ },
},
- data: function() {
+ data: function () {
let that = this;
return {
currents: 1,
ProductConSwiper: {
autoplay: {
disableOnInteraction: false,
- delay: 2000
+ delay: 2000,
},
loop: true,
speed: 1000,
observer: true,
observeParents: true,
on: {
- slideChangeTransitionStart: function() {
+ slideChangeTransitionStart: function () {
that.currents = this.realIndex + 1;
- }
- }
- }
+ },
+ },
+ },
};
},
- mounted: function() {},
+ mounted: function () {},
methods: {
handleChange(event) {
this.currents = event.mp.detail.current + 1;
- }
- }
+ },
+ previewImage(current) {
+ uni.previewImage({
+ current,
+ urls: this.imgUrls,
+ });
+ },
+ },
};
diff --git a/components/ProductWindow.vue b/components/ProductWindow.vue
index 186e945..a20d6d3 100644
--- a/components/ProductWindow.vue
+++ b/components/ProductWindow.vue
@@ -3,20 +3,24 @@
-
+
{{ attr.productSelect.store_name }}
¥
- {{ attr.productSelect.price}}
+ {{ attr.productSelect.price }}
库存: {{ attr.productSelect.stock }}
-
+
{{ item.attrName }}
{{ itemn.attr }}
+ >{{ itemn.attr }}
数量
- -
+ -
{{ cartNum }}
+
+ >+
-
+