Commit e8cffe6528ffadec6da30d49275daa720aa865cf
1 parent
83ecf95c
1。 0元支付成功的优化
Showing
2 changed files
with
13 additions
and
3 deletions
pages/user/cardinfo/cardinfo.js
| @@ -810,12 +810,18 @@ Page({ | @@ -810,12 +810,18 @@ Page({ | ||
| 810 | }, | 810 | }, |
| 811 | 811 | ||
| 812 | //--支付成功,跳转到等级卡续费页面-- | 812 | //--支付成功,跳转到等级卡续费页面-- |
| 813 | - success:function () { | ||
| 814 | - getApp().my_warnning("支付成功",0,this); | 813 | + success:function (ind) { |
| 814 | + if(ind==1){ | ||
| 815 | + getApp().my_warnning("升级成功",0,this); | ||
| 816 | + }else{ | ||
| 817 | + getApp().my_warnning("支付成功",0,this); | ||
| 818 | + } | ||
| 815 | this.init(); | 819 | this.init(); |
| 816 | }, | 820 | }, |
| 817 | 821 | ||
| 818 | 822 | ||
| 823 | + | ||
| 824 | + | ||
| 819 | //------计算俩种卡的------ | 825 | //------计算俩种卡的------ |
| 820 | change_card:async function (e) { | 826 | change_card:async function (e) { |
| 821 | var th = this,card_id =e.currentTarget.dataset.cid ,end_time=0; | 827 | var th = this,card_id =e.currentTarget.dataset.cid ,end_time=0; |
utils/pay2.js
| @@ -8,7 +8,11 @@ module.exports = { | @@ -8,7 +8,11 @@ module.exports = { | ||
| 8 | data: dd, | 8 | data: dd, |
| 9 | success: function(t) { | 9 | success: function(t) { |
| 10 | if(t.data.code==0){ | 10 | if(t.data.code==0){ |
| 11 | - i.weixinPay(t.data.data, succ,fail); | 11 | + if(t.data.data=="升级成功"){ |
| 12 | + "function" == typeof succ && succ(1); | ||
| 13 | + }else{ | ||
| 14 | + i.weixinPay(t.data.data, succ,fail); | ||
| 15 | + } | ||
| 12 | }else{ | 16 | }else{ |
| 13 | "function" == typeof fail && fail(); | 17 | "function" == typeof fail && fail(); |
| 14 | } | 18 | } |