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 @@