From 14a6bf451dfdef60e923b59ecf04fab0ef8d42ad Mon Sep 17 00:00:00 2001
From: meo <18801474720@163.com>
Date: Sat, 29 Jun 2019 15:12:39 +0800
Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E6=83=A0=E5=88=B8][=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9]:[=E6=9F=A5=E8=AF=A2=E5=BE=85=E6=94=AF=E4=BB=98?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/config.js | 4 ++-
pages/coupon/detail/index.js | 42 ++++++++++++++++++++---------
pages/coupon/detail/index.wxml | 8 +++---
pages/coupon/detail/index.wxss | 2 +-
pages/radetail/joinActivity/edit.js | 24 ++++++++++-------
5 files changed, 54 insertions(+), 26 deletions(-)
diff --git a/config/config.js b/config/config.js
index fc2451e..f8864bf 100755
--- a/config/config.js
+++ b/config/config.js
@@ -306,7 +306,9 @@ var config = {
activityJoin:"/wxActivityJoin/join",
//签到
activitySign:"/wxActivityJoin/sign",
- activityList: "/wxActivityJoin/list"
+ activityList: "/wxActivityJoin/list",
+ //获取未支付的订单
+ getUnPaidOrder: "/order/getUnPaidOrder"
},
weapp: {
AppId: weappId
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index a4123d6..8c9d2e7 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -572,8 +572,12 @@ Page({
/**
* 邀请好友继续砍价
*/
- inviteFriend: function() {
+ inviteFriend: function(e) {
let that = this;
+ let formId = e.detail.formId;
+ that.setData({
+ formId: formId
+ })
that.orderFunc("discount");
that.setData({
showbutton1: true
@@ -762,16 +766,17 @@ Page({
});
} else if (err.code == 3012) {
if(that.data.data.type == 8){
- wx.showModal({
- title: '提示',
- content: "您有未支付订单,请到'我的-我的砍价'进行支付",
- showCancel:false,
- success: function (res) {
- console.log(res.confirm)
- if (res.confirm) {
- }
- }
- })
+ that.getUnPaidOrder(that.data.couponId);
+ // wx.showModal({
+ // title: '提示',
+ // content: "您有未支付订单,请到'我的-我的砍价'进行支付",
+ // showCancel:false,
+ // success: function (res) {
+ // console.log(res.confirm)
+ // if (res.confirm) {
+ // }
+ // }
+ // })
}else{
wx.showModal({
title: '提示',
@@ -914,7 +919,20 @@ Page({
}
})
},
-
+ // 获得未支付的订单
+ getUnPaidOrder(couponId){
+ let that = this;
+ Http.get({
+ url: config.api.getUnPaidOrder,
+ data: {
+ couponId: couponId
+ }
+ }).then(res=>{
+ console.log(res);
+ }).catch(error=>{
+ console.log(error)
+ })
+ },
onShow() {
this.setData({
showbutton: false,
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 543fd04..c3b5b50 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -144,9 +144,11 @@