Showing
3 changed files
with
33 additions
and
40 deletions
| @@ -158,6 +158,10 @@ Page({ | @@ -158,6 +158,10 @@ Page({ | ||
| 158 | } | 158 | } |
| 159 | }) | 159 | }) |
| 160 | if(eval_label.length<1) return util.toast('请选择标签','none') | 160 | if(eval_label.length<1) return util.toast('请选择标签','none') |
| 161 | + wx.showToast({ | ||
| 162 | + icon: 'none', | ||
| 163 | + title: '提交中,请稍后!', | ||
| 164 | + }) | ||
| 161 | let params={ | 165 | let params={ |
| 162 | sid:this.options.sid, | 166 | sid:this.options.sid, |
| 163 | rid:this.options.oid, | 167 | rid:this.options.oid, |
| @@ -41,8 +41,9 @@ Page({ | @@ -41,8 +41,9 @@ Page({ | ||
| 41 | title: '请填写意见反馈!', | 41 | title: '请填写意见反馈!', |
| 42 | }) | 42 | }) |
| 43 | } | 43 | } |
| 44 | - wx.showLoading({ | ||
| 45 | - title: '提交中', | 44 | + wx.showToast({ |
| 45 | + icon: 'none', | ||
| 46 | + title: '提交中,请稍后!', | ||
| 46 | }) | 47 | }) |
| 47 | let params = { | 48 | let params = { |
| 48 | sid: this.data.options.sellerid, | 49 | sid: this.data.options.sellerid, |
| @@ -59,7 +60,6 @@ Page({ | @@ -59,7 +60,6 @@ Page({ | ||
| 59 | }); | 60 | }); |
| 60 | App.User.SetComment(params).then(res => { | 61 | App.User.SetComment(params).then(res => { |
| 61 | if (res.ret != 200) { | 62 | if (res.ret != 200) { |
| 62 | - wx.hideLoading() | ||
| 63 | return wx.showToast({ | 63 | return wx.showToast({ |
| 64 | icon: 'none', | 64 | icon: 'none', |
| 65 | title: res.msg, | 65 | title: res.msg, |
| @@ -72,10 +72,10 @@ Page({ | @@ -72,10 +72,10 @@ Page({ | ||
| 72 | url = util.http_build_query({ | 72 | url = util.http_build_query({ |
| 73 | sellerName: options.sellerName, | 73 | sellerName: options.sellerName, |
| 74 | coupon: options.coupon, | 74 | coupon: options.coupon, |
| 75 | - couponId: options.couponId || '', | ||
| 76 | - coupon: options.coupon || '', | ||
| 77 | - price: options.price || '', | ||
| 78 | - use: options.use || '', | 75 | + couponId: options.couponId, |
| 76 | + coupon: options.coupon, | ||
| 77 | + price: options.price, | ||
| 78 | + use: options.use, | ||
| 79 | oid: options.oid, | 79 | oid: options.oid, |
| 80 | sid: options.sellerid, | 80 | sid: options.sellerid, |
| 81 | }, './opinionSuccess') | 81 | }, './opinionSuccess') |
| @@ -89,11 +89,7 @@ Page({ | @@ -89,11 +89,7 @@ Page({ | ||
| 89 | wx.redirectTo({ | 89 | wx.redirectTo({ |
| 90 | url | 90 | url |
| 91 | }) | 91 | }) |
| 92 | - if (url) { | ||
| 93 | - wx.hideLoading() | ||
| 94 | - } | ||
| 95 | }).catch(e => { | 92 | }).catch(e => { |
| 96 | - wx.hideLoading() | ||
| 97 | console.log('catch', e); | 93 | console.log('catch', e); |
| 98 | wx.showToast({ | 94 | wx.showToast({ |
| 99 | icon: 'none', | 95 | icon: 'none', |
| @@ -18,6 +18,24 @@ Page({ | @@ -18,6 +18,24 @@ Page({ | ||
| 18 | this.setData({ | 18 | this.setData({ |
| 19 | options, | 19 | options, |
| 20 | }) | 20 | }) |
| 21 | + // 金额为0 直接领券后 | ||
| 22 | + if (options.coupon == '1' && options.price * 1 == 0) { | ||
| 23 | + App.Activity.CreateNewRechargeOrder({ | ||
| 24 | + recharge_id: options.couponId, | ||
| 25 | + sellerid: options.sid, | ||
| 26 | + number: '1', | ||
| 27 | + price: options.price, | ||
| 28 | + type: '1', | ||
| 29 | + }).then(res => { | ||
| 30 | + if (res.ret != '200') { | ||
| 31 | + wx.showToast({ | ||
| 32 | + title: '领券失败!', | ||
| 33 | + duration: 2000, | ||
| 34 | + mask: true | ||
| 35 | + }) | ||
| 36 | + } | ||
| 37 | + }) | ||
| 38 | + } | ||
| 21 | }, | 39 | }, |
| 22 | seeCoupon() { | 40 | seeCoupon() { |
| 23 | wx.showLoading({ | 41 | wx.showLoading({ |
| @@ -38,35 +56,10 @@ Page({ | @@ -38,35 +56,10 @@ Page({ | ||
| 38 | wx.redirectTo({ | 56 | wx.redirectTo({ |
| 39 | url | 57 | url |
| 40 | }) | 58 | }) |
| 41 | - } else { //金额为0 直接领券后跳转到我的券页面 | ||
| 42 | - App.Activity.CreateNewRechargeOrder({ | ||
| 43 | - recharge_id: options.couponId, | ||
| 44 | - sellerid: options.sid, | ||
| 45 | - number: '1', | ||
| 46 | - price: options.price, | ||
| 47 | - type: '1', | ||
| 48 | - }).then(res => { | ||
| 49 | - if (res.ret == '200') { | ||
| 50 | - wx.hideLoading() | ||
| 51 | - let price = res.data.price; | ||
| 52 | - if (price == 0) { | ||
| 53 | - wx.showToast({ | ||
| 54 | - icon: 'none', | ||
| 55 | - title: '购买成功', | ||
| 56 | - }) | ||
| 57 | - wx.reLaunch({ | ||
| 58 | - url: '/pages/me/coupon_news' | ||
| 59 | - }) | ||
| 60 | - return | ||
| 61 | - } | ||
| 62 | - } else { | ||
| 63 | - wx.hideLoading() | ||
| 64 | - wx.showToast({ | ||
| 65 | - title: res.msg, | ||
| 66 | - duration: 2000, | ||
| 67 | - mask: true | ||
| 68 | - }) | ||
| 69 | - } | 59 | + } else { //金额为0 跳转到我的券页面 |
| 60 | + wx.hideLoading() | ||
| 61 | + wx.reLaunch({ | ||
| 62 | + url: '/pages/me/coupon_news' | ||
| 70 | }) | 63 | }) |
| 71 | } | 64 | } |
| 72 | }, | 65 | }, |
-
Please register or login to post a comment