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 @@ 立即购买 - +
+ +
diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index a8d2c76..73f0112 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -558,7 +558,7 @@ button::after { background: #fff; } -.btns > button,.btns .fl { +.btns .fr,.btns .fl { width: 277rpx; height: 95rpx; border-radius: 48rpx; diff --git a/pages/radetail/joinActivity/edit.js b/pages/radetail/joinActivity/edit.js index bb675cd..7a1113e 100644 --- a/pages/radetail/joinActivity/edit.js +++ b/pages/radetail/joinActivity/edit.js @@ -13,6 +13,7 @@ Page({ flagsex: 0, useImg:0, showReceiptUrl:false, + receiptUrl:"", items: [{ name: 1, value: '男', @@ -140,18 +141,23 @@ Page({ } else { console.log(that.data.answer) if (this.data.answerflag == 'noanswer'){ - }else{ + let data ={}; + data = { + sex: sex, + address: address, + name: username, + birthday: birthday, + answer: JSON.stringify(that.data.answer), + activityId: that.data.activityId + }; + if (that.data.receiptUrl){ + data.imgUrl = "[" + '"' + that.data.receiptUrl + '"' + "]"; + } + Http.post({ url: config.api.activityJoin, - data: { - sex: sex, - address: address, - name: username, - birthday: birthday, - answer: JSON.stringify(that.data.answer), - activityId: that.data.activityId - } + data: data }) .then(res => { wx.reLaunch({