diff --git a/packageA/pages/serviceCard_pd/cart/cart.js b/packageA/pages/serviceCard_pd/cart/cart.js
index 35f9333..6d88281 100644
--- a/packageA/pages/serviceCard_pd/cart/cart.js
+++ b/packageA/pages/serviceCard_pd/cart/cart.js
@@ -3,6 +3,7 @@ var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.
var oo = t.globalData.setting, os = oo;
var regeneratorRuntime = require('../../../../utils/runtime.js');
var util_pay = require("../../../../utils/pay.js");
+var t_pay = require("../../../../utils/pay2.js");
Page({
data: {
@@ -66,6 +67,8 @@ Page({
},
onLoad: function (t) {
console.log("onLoad_pt_cart");
+
+
var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, });
var appD = getApp().get_b_now();
@@ -209,6 +212,12 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
+
+ s.fy_back('',0);
+
+ t_pay.set_fir();
+ util_pay.set_fir();
+
var th = this;
if (th.data.isclose == 0) {
wx.navigateTo({
@@ -371,39 +380,31 @@ Page({
//要进行判断,如果是用微信支付,就要跳转到支付界面
if (order_amount > 0) {
th.setData({ isclose: 0 });
- getApp().request.post("/api/weshop/order/pay/createRechargeOrder", {
- data: {
- parentSn: data.data.order_sn,
- store_id: oo.stoid
- },
- success: function(su) {
-
- var n = su.data.data;
- let order_id = data.data.order_id;
- th.weixinPay(n,
- function() {
- // getApp().showWarning("购买成功");
- wx.showToast({
- title: '购买成功',
- icon: 'success',
- duration: 2000
- });
- setTimeout(function() {
- wx.redirectTo({
- url: "/packageA/pages/serviceCard_pd/team_success/team_success?order_sn=" + data.data.order_sn
- });
- }, 1000)
- },
- function() {
- getApp().showWarning("支付失败");
- setTimeout(function() {
- wx.reLaunch({
- url: "/pages/user/order_list/order_list?index=2&tabindex=1",
- })
- }, 1000)
- })
- }
+
+ t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder");
+ t_pay.pay({
+ parentSn: data.data.order_sn,
+ store_id: oo.stoid
+ }, function () {
+ wx.showToast({
+ title: '购买成功',
+ icon: 'success',
+ duration: 2000
+ });
+ setTimeout(function() {
+ wx.redirectTo({
+ url: "/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + data.data.order_sn
+ });
+ }, 1000)
+
+ }, function (e) {
+ wx.showToast({
+ title: e,
+ icon: 'none',
+ duration: 2000
+ });
})
+
}
} else {
th.data.is_summit_ing = 0; //是否提交中
diff --git a/packageA/pages/serviceCard_pd/cart/cart.wxml b/packageA/pages/serviceCard_pd/cart/cart.wxml
index 20e6192..5af16ee 100644
--- a/packageA/pages/serviceCard_pd/cart/cart.wxml
+++ b/packageA/pages/serviceCard_pd/cart/cart.wxml
@@ -1,136 +1,36 @@