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 @@
- - - - - - - - - - - - - - - {{bn_pickname}} - + - - {{bn_goods.goods_name}} - - - {{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}} - - + + {{bn_goods.service_name}} - - {{filters.toFix(bn_goods.shop_price,2)}} - x{{bn_goods.buynum}} - + + {{filters.toFix(bn_goods.shop_price,2)}} + x{{bn_goods.buynum}} + - - - - - - - - - {{show_card.CardName}} - - 立减 {{filters.toFix(card_cut_price,2) }} - - - vip超级会员仅需{{show_card.CardFee}}元 - - - - - 立即开通 - - - - - {{order.store_prom}} - - - - - - 选择物流 - - {{wu_arr[index].name}} - - - - - - - - 留言 - - - + + + {{order.store_prom}} + - - - - - 使用余额 :¥{{yuer}} - - 商品金额 ¥ {{formData.all_price}}元 @@ -141,70 +41,15 @@ ¥ {{formData.all_price}}元 - - 配送费用 - ¥ {{formData.shipping_price}}元 - - - 使用余额 - - ¥ {{formData.user_money}}元 - - 应付金额:¥{{formData.order_amount}} -
- - - - - - - - - - 选择物流名字 - - - - × - - - - - - - - Γ - - - - - {{express_list.name}} - - - - - - - 确定 - - - 设为默认 - - - - - -