Commit 1d8444cf29c2af39ba9a5352826f95141c70fe54

Authored by WXD-SEASON\season
1 parent 6b8227e5

支付增加日志

Showing 1 changed file with 8 additions and 2 deletions
utils/pay.js
@@ -41,6 +41,7 @@ module.exports = { @@ -41,6 +41,7 @@ module.exports = {
41 n.post(this.url, { 41 n.post(this.url, {
42 data: dd, 42 data: dd,
43 success: function(t) { 43 success: function(t) {
  44 + console.log('======', t)
44 wx.hideLoading(); 45 wx.hideLoading();
45 if(t.data.code==0){ 46 if(t.data.code==0){
46 47
@@ -51,12 +52,16 @@ module.exports = { @@ -51,12 +52,16 @@ module.exports = {
51 reqType:"11",//必填 01-商户模式,11-机构模式 52 reqType:"11",//必填 01-商户模式,11-机构模式
52 reqData:t.data.data.reqData,//必填 富友加密参数 53 reqData:t.data.data.reqData,//必填 富友加密参数
53 } 54 }
  55 + console.log(plugin, plugin.fuioupay)
54 plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){ 56 plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){
  57 + console.log(res);
55 wx_paying=0; 58 wx_paying=0;
56 getApp().showSuccess("支付成功!", e); 59 getApp().showSuccess("支付成功!", e);
57 60
58 - },function (){ 61 + },function (error){
  62 + console.log("插件支付错误",error);
59 //支付失败的时候 63 //支付失败的时候
  64 + getApp().confirmBox(error.code+error.message);
60 setTimeout(function(){ 65 setTimeout(function(){
61 wx.redirectTo({ 66 wx.redirectTo({
62 url: "/pages/user/order_list/order_list", 67 url: "/pages/user/order_list/order_list",
@@ -82,7 +87,8 @@ module.exports = { @@ -82,7 +87,8 @@ module.exports = {
82 return false; 87 return false;
83 }, 88 },
84 fail: function() { 89 fail: function() {
85 - wx.hideLoading(); 90 + console.log('======fail', )
  91 + wx.hideLoading();
86 wx_paying=0; 92 wx_paying=0;
87 "function" == typeof a && a(); 93 "function" == typeof a && a();
88 }, 94 },