From 6bb8f049b6ba2c7aa9a2ffe98f1addbb8814c94d Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 12 Oct 2022 13:50:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/myOrder.html | 95 ++++++++++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 28 deletions(-) diff --git a/coupon/myOrder.html b/coupon/myOrder.html index dc1f39a..0d2172d 100644 --- a/coupon/myOrder.html +++ b/coupon/myOrder.html @@ -24,39 +24,46 @@ -
-
-
-

{{item.update_time}}

-

{{item.status_text}} -

-
-
- -
-
-

{{item.product_name}}

-

¥{{item.official_price}}

+ +
+ +
+
+
+

{{item.update_time}}

+

{{item.status_text}} +

+
+
+ +
+
+

{{item.product_name}}

+

¥{{item.official_price}}

+
+

订单编号:{{item.order_number}}

-

订单编号:{{item.order_number}}

+
+
+

实付金额:¥{{item.pay_amount}}

+

立即支付

+ +

去兑换

+ +

去兑换

-
-

实付金额:¥{{item.pay_amount}}

-

立即支付

- -

去兑换

- -

去兑换

+ +
+ +

暂无订单

- -
- -

暂无订单

-
+ @@ -98,20 +105,26 @@ /* toast */ toastShow: '', toastTip: '', + redirect: false, - redirect: false + /* 加载 */ + scrollTop: 0, + startY: 0, + loadShowHeight: 0 } }, components: { tabComponent, payPop, - modelPop + modelPop, }, created () { this.getOrderList() this.goodsCount = localStorage.getItem('goodsCount'); + this.scrollTop = + document.documentElement.scrollTop || document.body.scrollTop }, methods: { @@ -121,6 +134,32 @@ return colorArray[status]; }, + /* 以下三个方法是下拉刷新 */ + touchStart (e) { + this.startY = e.targetTouches[0].pageY + }, + + + touchMove (e) { + if (this.scrollTop == 0) { + let moveDistance = e.targetTouches[0].pageY - this.startY + if (moveDistance > 0 && moveDistance <= 80) { + this.loadShowHeight = moveDistance + } + } + }, + + touchEnd () { + if (this.loadShowHeight >= 60) { + this.getOrderList() + setTimeout(() => { + this.loadShowHeight = 0; + }, 2000); + } else { + this.loadShowHeight = 0 + } + }, + /* 图标分流 */ filterImgSrc (item) { if (item.type === 1) {