浏览代码

微信支付方法调整

赵启卫 2 年之前
父节点
当前提交
76a0ac4e2b
共有 2 个文件被更改,包括 24 次插入2 次删除
  1. 12 1
      application/wap/view/first/studyplan/details.html
  2. 12 1
      application/wap/view/first/studyplan/index.html

+ 12 - 1
application/wap/view/first/studyplan/details.html

xqd xqd
@@ -281,6 +281,17 @@
                             break;
                     }
                 },
+                wechatPay: function (config) {
+                    var that = this;
+                    mapleWx($jssdk(), function () {
+                        this.chooseWXPay(config, function () {
+                            that.successOrder();
+                        }, {
+                            fail: that.extendOrder,
+                            cancel: that.extendOrder
+                        });
+                    });
+                },
                 successOrder: function (msg) {
                     var that = this;
                     $h.showMsg({
@@ -316,7 +327,7 @@
                     $h.pushMsg(msg, function () {
                         that.payDialogOpen = false;
                         if (that.orderId) {
-                            app.baseGet($h.U({c: 'plan', a: 'del_order', q: {orderId: that.orderId}}));
+                            store.baseGet($h.U({c: 'studyplan', a: 'del_order', q: {orderId: that.orderId}}));
                         }
                     });
                 },

+ 12 - 1
application/wap/view/first/studyplan/index.html

xqd xqd
@@ -204,6 +204,17 @@
                             break;
                     }
                 },
+                wechatPay: function (config) {
+                    var that = this;
+                    mapleWx($jssdk(), function () {
+                        this.chooseWXPay(config, function () {
+                            that.successOrder();
+                        }, {
+                            fail: that.extendOrder,
+                            cancel: that.extendOrder
+                        });
+                    });
+                },
                 successOrder: function (msg) {
                     var that = this;
                     $h.showMsg({
@@ -239,7 +250,7 @@
                     $h.pushMsg(msg, function () {
                         that.payDialogOpen = false;
                         if (that.orderId) {
-                            app.baseGet($h.U({c: 'plan', a: 'del_order', q: {orderId: that.orderId}}));
+                            store.baseGet($h.U({c: 'studyplan', a: 'del_order', q: {orderId: that.orderId}}));
                         }
                     });
                 },