From 860388f0a530d892e8263cb5c116aba273a8cfb3 Mon Sep 17 00:00:00 2001 From: terry <2358269014@qq.com> Date: Mon, 7 Sep 2020 18:03:50 +0800 Subject: [PATCH] 'update' --- pages/order-list/order-list.js | 28 +++++++++++++--------------- pages/order-list/order-list.wxml | 2 +- pages/pay-order/pay-order.wxml | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/pages/order-list/order-list.js b/pages/order-list/order-list.js index b6cbe34..7997287 100644 --- a/pages/order-list/order-list.js +++ b/pages/order-list/order-list.js @@ -36,18 +36,15 @@ Page({ //this.initCartInfo() }, statusTap: function (e) { - var obj = e; - var count = 0; - for (var key in obj) { - count++; - } - if (count == 0) { - var curType = 0; - } else { - console.log('出现Cannot read property "dataset" of undefined;这样的错误是正常的,不用管!'); - var curType = e.currentTarget.dataset.index; - } - this.data.currentType = curType + this.setData({ + page: 0, + orderList: [] + }); + this.getOrderList(); + }, + + statusTap2: function (e) { + var curType = e.currentTarget.dataset.index; this.setData({ currentType: curType }); @@ -57,6 +54,7 @@ Page({ }); this.getOrderList(); }, + orderDetail: function (e) { var orderId = e.currentTarget.dataset.id; var order_increment_id = e.currentTarget.dataset.increment_id; @@ -101,7 +99,7 @@ Page({ var orderId = e.currentTarget.dataset.id; var order_increment_id = e.currentTarget.dataset.increment_id; var money = e.currentTarget.dataset.money; - wxpay.wxpay(app, money, order_increment_id, "/pages/order-list/order-list?currentType=1&share=1"); + wxpay.wxpay(app, money, order_increment_id, "/pages/order-list/order-list"); }, orderRecevie: function (e) { var that = this; @@ -324,10 +322,10 @@ Page({ }); var requestStatus = that.data.currentType; var wxRequestOrderStatus = ''; - if (requestStatus == 0) { + if (!requestStatus) { wxRequestOrderStatus = 'all' } else { - wxRequestOrderStatus = requestStatus -1; + wxRequestOrderStatus = requestStatus; } //this.getOrderStatistics(); wx.request({ diff --git a/pages/order-list/order-list.wxml b/pages/order-list/order-list.wxml index ee426a2..cd87d23 100644 --- a/pages/order-list/order-list.wxml +++ b/pages/order-list/order-list.wxml @@ -1,7 +1,7 @@ - + {{item}} diff --git a/pages/pay-order/pay-order.wxml b/pages/pay-order/pay-order.wxml index d685b0b..3ff0c33 100644 --- a/pages/pay-order/pay-order.wxml +++ b/pages/pay-order/pay-order.wxml @@ -63,7 +63,7 @@ - 积分 抱歉,您的积分不足,有货币满 {{pointOffsetInfo.useMinPoint> 0 ? pointOffsetInfo.useMinPoint : 0}} 个方可使用 + 积分 抱歉,您的积分不足,积分满 {{pointOffsetInfo.useMinPoint> 0 ? pointOffsetInfo.useMinPoint : 0}} 个方可使用