From 465c4fb1a64fd11fa14a37aabf80ee2593ed5341 Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Mon, 21 Jan 2019 15:26:55 +0800
Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E6=83=A0=E5=88=B8=E7=94=9F=E6=88=90?=
=?UTF-8?q?=E7=A0=81=E8=A7=84=E5=88=99=E7=9A=84=E4=BF=AE=E6=94=B9=EF=BC=8C?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=A0=81=E7=9A=84=E4=BF=AE=E6=94=B9]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/bargain/bargainDatail/bargainDatail.js | 26 ++++++++++++-------
.../bargain/bargainDatail/bargainDatail.wxml | 4 +--
pages/cardorder/index/index.js | 6 ++---
pages/coupon/detail/index.js | 8 +++---
pages/coupon/detail/index.wxml | 2 +-
pages/couponorder/detail/index.wxml | 4 +--
pages/couponorder/detail/index.wxss | 2 +-
pages/index/index.js | 6 ++++-
pages/order/detail/index.js | 1 +
pages/order/index/index.wxml | 2 +-
pages/orderquanma/index.js | 3 ++-
pages/user/index.js | 6 ++++-
pages/user/index.wxss | 9 ++++---
13 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js
index 53df755..7f68ce9 100644
--- a/pages/bargain/bargainDatail/bargainDatail.js
+++ b/pages/bargain/bargainDatail/bargainDatail.js
@@ -16,7 +16,8 @@ Page({
min: null,
sec: null,
showPage: false,
- discountStatus:null
+ discountStatus:null,
+ disabled:false
},
/**
@@ -39,6 +40,14 @@ Page({
that.pressOrderDetail(options.orderId);
}
},
+ onShow: function () {
+ let that = this;
+ console.log("--------------------------------onShow-------------------------------")
+ var todayDate = new Date().getTime();
+ that.setData({
+ todayDate: todayDate,
+ })
+ },
/**
* 更多砍价商品
*/
@@ -59,6 +68,8 @@ Page({
}
})
.then(res => {
+ console.log(res)
+ console.log("--------------------------status------------------------------------")
if (res.data.status == 1) {
that.setData({
discountStatus: 1
@@ -75,9 +86,10 @@ Page({
wx.stopPullDownRefresh();
})
.catch(err => {
+ console.log(err)
wx.stopPullDownRefresh();
wx.showToast({
- title: err.message,
+ title: err.errMsg,
icon: "none"
})
})
@@ -119,7 +131,6 @@ Page({
})
.then(res => {
console.log(res);
- that.getPressOrderStatus(orderId);
res.data.orderPressList.map(file => {
file.createDate = diffTime(file.createDate)
})
@@ -130,6 +141,7 @@ Page({
remain: (res.data.pressCurrentValue / 100).toFixed(2),
showPage: true
})
+ that.getPressOrderStatus(orderId);
})
.catch(err => {
wx.showToast({
@@ -139,13 +151,7 @@ Page({
wx.stopPullDownRefresh();
})
},
- onShow: function() {
- let that = this;
- var todayDate = new Date().getTime();
- that.setData({
- todayDate: todayDate,
- })
- },
+
countdown(end_time) {
let that = this;
var EndTime = end_time;
diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml
index 9d7ce7c..e376b65 100644
--- a/pages/bargain/bargainDatail/bargainDatail.wxml
+++ b/pages/bargain/bargainDatail/bargainDatail.wxml
@@ -53,7 +53,7 @@
-
+
{{data.price/100}}元
立即购买
@@ -61,6 +61,6 @@
-
+
\ No newline at end of file
diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js
index 9d44ced..de6b3df 100644
--- a/pages/cardorder/index/index.js
+++ b/pages/cardorder/index/index.js
@@ -54,12 +54,12 @@ Page({
let that = this;
wx.scanCode({
success: (res) => {
- console.log(res.result.indexOf('merchant_id_scan'))
- if(res.result.indexOf('merchant_id_scan')!=-1){
+ let value = JSON.parse(res.result);
+ if (value.END == 'B' && value.TYPE == 'merchant' && value.ID){
Http.get({
url: config.api.findByCode,
data: {
- merchantCode: JSON.parse(res.result).merchant_id_scan,
+ merchantCode:value.ID,
}
})
.then(res => {
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 8484be7..28ffa8e 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -118,8 +118,9 @@ Page({
/**
* gotopay
*/
- gotopay: function () {
+ gotopay: function (e) {
let that = this;
+ var discount = e.currentTarget.dataset.discount;
that.setData({
queueData: null,
showbutton: true
@@ -133,7 +134,7 @@ Page({
.then(res => {
console.log(res);
if (res.data == undefined) {
- that.orderFunc();
+ that.orderFunc(discount);
that.setData({
flag: false
})
@@ -338,13 +339,14 @@ Page({
* 发起支付
*/
orderFunc(discount) {
+ console.log(discount)
var that = this;
Http.post({
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
- if (discount == 'discount') {
+ if (discount == 'discount' || discount == 'discount1') {
var data = {
couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId,
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 93bb026..81dcb62 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -94,7 +94,7 @@
-