From fdc9a89a070533d707b86ea82d6f9895cb7dcd36 Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Wed, 23 Jan 2019 10:37:52 +0800
Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D=E7=A0=8D=E4=BB=B7=EF=BC=8C?=
=?UTF-8?q?=E5=8E=9F=E4=BB=B7=EF=BC=8C=E5=BA=95=E4=BB=B7=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/bargain/bargain.js | 5 ++-
pages/bargain/bargainDatail/bargainDatail.js | 5 +--
.../bargain/bargainDatail/bargainDatail.wxml | 4 +-
pages/coupon/detail/index.js | 14 +++----
pages/coupon/detail/index.wxml | 9 ++---
pages/couponorder/detail/index.js | 8 +++-
pages/couponorder/detail/index.wxml | 7 ++--
pages/order/detail/index.js | 40 +++++++++++--------
pages/order/detail/index.wxml | 7 ++--
pages/order/index/index.wxml | 8 ++--
pages/passCar/couponList/couponList.wxml | 4 +-
11 files changed, 61 insertions(+), 50 deletions(-)
diff --git a/pages/bargain/bargain.js b/pages/bargain/bargain.js
index 8e61946..b644902 100644
--- a/pages/bargain/bargain.js
+++ b/pages/bargain/bargain.js
@@ -25,7 +25,6 @@ Page({
let that = this;
that.getBannerlist();
console.log("onShow")
- console.log()
var todayDate=new Date().getTime();
that.setData({
todayDate:todayDate
@@ -196,7 +195,8 @@ Page({
flag: "mybargain",
allow_load: true,
loading: false,
- content: ""
+ content: "",
+ page:1
})
that.getList(1, 'mybargain');
wx.setNavigationBarTitle({
@@ -211,6 +211,7 @@ Page({
flag: "bargaingoods",
allow_load: true,
loading: false,
+ page:1,
content: ""
})
diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js
index 2819a9f..53aec78 100644
--- a/pages/bargain/bargainDatail/bargainDatail.js
+++ b/pages/bargain/bargainDatail/bargainDatail.js
@@ -69,8 +69,6 @@ Page({
}
})
.then(res => {
- console.log(res)
- console.log("--------------------------status------------------------------------")
if (res.data.status == 1) {
that.setData({
discountStatus: 1
@@ -111,6 +109,7 @@ Page({
.then(res => {
console.log(res);
// id 是订单号
+
that.pressOrderDetail(orderId);
})
.catch(err => {
@@ -335,7 +334,7 @@ Page({
})
} else {
// 免费券
- that.payOrderUpdate(orderId, "0", 1, '', 'free');
+ that.payOrderUpdate(orderId, "0", 1, '', 'free',that);
if (that.data.cardType == 100) {
wx.setStorage({
key: 'couponNum2',
diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml
index aa7bb23..65de04a 100644
--- a/pages/bargain/bargainDatail/bargainDatail.wxml
+++ b/pages/bargain/bargainDatail/bargainDatail.wxml
@@ -9,7 +9,7 @@
可砍至{{data.salePrice/100}}元
-
+
已砍 {{already}}元
还剩 {{remain}}元
@@ -29,7 +29,7 @@
-
+
砍价成功
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 50b5f9b..5e8bc8c 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -265,7 +265,6 @@ Page({
that.setData({
data: res.data
});
-
if (res.data.validType == 1) {
that.setData({
validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"),
@@ -294,7 +293,7 @@ Page({
let that = this;
that.orderFunc("discount");
that.setData({
- showbutton:true
+ showbutton1:true
})
},
/**
@@ -507,7 +506,7 @@ Page({
key: 'couponNum2',
data: "couponNum2"
})
- } else {
+ } else if(that.data.data.type!=5){
wx.setStorage({
key: 'couponNum',
data: "couponNum"
@@ -538,6 +537,7 @@ Page({
});
})
} else {
+ console.log(that.data.type)
// 免费券
that.payOrderUpdate(orderId, "0", 1, '', 'free');
if (that.data.cardType == 100) {
@@ -545,7 +545,7 @@ Page({
key: 'couponNum2',
data: "couponNum2"
})
- } else {
+ } else if (that.data.data.type != "5"){
wx.setStorage({
key: 'couponNum',
data: "couponNum"
@@ -563,9 +563,9 @@ Page({
})
},
onShow() {
- // this.setData({
- // showbutton: false
- // })
+ this.setData({
+ showbutton: false
+ })
},
onShareAppMessage: function (options) {
var that = this;
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 00df499..fa76213 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -35,7 +35,6 @@
元
{{data.priceStr}}元
{{data.priceStr}}小时
- {{data.priceStr}}元
可砍至
{{data.salePriceStr}}元
@@ -84,21 +83,21 @@
-
+
-
+
-
+
-
diff --git a/pages/couponorder/detail/index.js b/pages/couponorder/detail/index.js
index beebc49..0b0c4c1 100644
--- a/pages/couponorder/detail/index.js
+++ b/pages/couponorder/detail/index.js
@@ -145,8 +145,12 @@ Page({
updateDate: util.formatTime(that.data.data.updateDate, "yyyy-MM-dd hh:mm:ss"),
createDate: util.formatTime(that.data.data.createDate, "yyyy-MM-dd hh:mm:ss")
});
- util.barcode("barcode", options.quancode, 510, 100);
- util.qrcode("qrcode", options.quancode, 350, 350);
+ let url = JSON.stringify({
+ END:"C",
+ TYPE:"couponorder",
+ ID: options.quancode
+ })
+ util.qrcode("qrcode", url, 350, 350);
})
.catch(err => {
wx.showToast({
diff --git a/pages/couponorder/detail/index.wxml b/pages/couponorder/detail/index.wxml
index 4ce3c25..c7cc327 100644
--- a/pages/couponorder/detail/index.wxml
+++ b/pages/couponorder/detail/index.wxml
@@ -7,7 +7,9 @@
{{data.title}}
{{data.subTitle}}
- ¥{{data.salePrice/100}}
+ ¥{{data.couponPrice/100}}
+ ¥{{data.salePrice/100}}
+ ¥{{data.salePrice/100}}
¥{{data.price/100}}
满{{data.usePrice/100}}元可用
仅限本店使用
@@ -24,9 +26,6 @@
-
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index a9b69f5..90e7b4e 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -175,6 +175,19 @@ Page({
wx.hideLoading()
}, 5000)
that.payOrderUpdate(that.data.orderId, payOrderId, 1,'','',that); // 支付成功
+ if (res.errMsg == "requestPayment:ok") {
+ if (that.data.order.type == 100) {
+ wx.setStorage({
+ key: 'couponNum2',
+ data: "couponNum2"
+ })
+ } else if (that.data.order.type != 5) {
+ wx.setStorage({
+ key: 'couponNum',
+ data: "couponNum"
+ })
+ }
+ }
},
fail: res => {
that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail',that);
@@ -186,6 +199,17 @@ Page({
} else {
// 免费券
that.payOrderUpdate(orderId, "0", 1,'','free') // 支付成功
+ if (that.data.order.type == 100) {
+ wx.setStorage({
+ key: 'couponNum2',
+ data: "couponNum2"
+ })
+ } else if (that.data.order.type != "5") {
+ wx.setStorage({
+ key: 'couponNum',
+ data: "couponNum"
+ })
+ }
wx.showToast({
title: "支付成功",
duration: 2000,
@@ -244,20 +268,4 @@ Page({
}
});
},
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {},
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {},
-
});
\ No newline at end of file
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 211769f..2615eb6 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -54,13 +54,14 @@
{{order.orderNumber}}
- 面额
+ 原价
+ 面额
{{order.price/100}}元
{{order.price/100}}小时
-
+
订单金额
- {{order.salePrice/100}}元
+ {{order.payment/100}}元
适用门店:
diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml
index a966da3..abfdb15 100644
--- a/pages/order/index/index.wxml
+++ b/pages/order/index/index.wxml
@@ -3,7 +3,7 @@
-
+
@@ -26,8 +26,8 @@
付款成功
{{item.subTitle}}
- 面额:{{item.price/100}}元{{item.price/100}}小时
-
+ 面额:{{item.price/100}}元{{item.price/100}}小时
+ 原价:{{item.price/100}}元{{item.price/100}}小时
下单时间:{{item.createDate}}
@@ -36,7 +36,7 @@
- 实付金额:{{item.salePrice/100}}元
+ 实付金额:{{item.payment/100}}元
+
{{item.title}}