周总批发商场
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
5.4 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/annex/offline_pay/index"],{"1bcf":function(t,e,n){"use strict";var a=n("71bc"),i=n.n(a);i.a},"71bc":function(t,e,n){},"75ba":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$t("支付金额")),a=t.$t("¥"),i=t.payPrice&&t.show?t.$t("会员优惠价"):null,o=t.payPrice&&t.show?t.$t("¥"):null,s=t.$t("支付方式"),c=t.yuePay?t.$t("余额支付"):null,r=t.yuePay?t.$t("可用余额"):null,u=t.yuePay?t.$t("¥"):null,l=t.wxpay?t.$t("微信支付"):null,d=t.$t("确认");t.$mp.data=Object.assign({},{$root:{m0:n,m1:a,m2:i,m3:o,m4:s,m5:c,m6:r,m7:u,m8:l,m9:d}})},i=[]},"7e78":function(t,e,n){},a1c1:function(t,e,n){"use strict";var a=n("7e78"),i=n.n(a);i.a},b717:function(t,e,n){"use strict";(function(t,e){var a=n("4ea4");n("4789");a(n("66fd"));var i=a(n("cf1f"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},cf1f:function(t,e,n){"use strict";n.r(e);var a=n("75ba"),i=n("dcb5");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("a1c1"),n("1bcf");var s=n("f0c5"),c=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"ac0b9f7a",null,!1,a["a"],void 0);e["default"]=c.exports},d482:function(t,e,n){"use strict";(function(t,a){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("39ed"),s=n("86eb"),c=n("26cb"),r=i(n("19b6")),u=(getApp(),{mixins:[r.default],data:function(){return{money:"",payPrice:"",payType:"weixin",alipayHtml:"",alipay:!1,wxpay:!1,yuePay:!1,paying:!1,now_money:0,isWeixin:!1,site_name:"",isCommitted:!1,show:!1}},computed:(0,c.mapGetters)(["isLogin"]),onLoad:function(t){this.isLogin||(0,s.toLogin)()},onShow:function(){this.isLogin&&this.getPayType()},methods:{inputChange:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(.?\d{0,2})/g)[0]||"",this.$nextTick((function(){e.money=t.target.value,e.checkPrice()}))},getPayType:function(){var e=this;(0,o.orderOfflinePayType)().then((function(n){var a=n.data,i=a.ali_pay_status,o=a.pay_weixin_open,s=a.yue_pay_status,c=a.offline_pay_status,r=a.site_name,u=a.now_money;e.alipay=i,e.wxpay=o,e.yuePay=s,e.now_money=u,e.site_name=r,c||t.showModal({title:e.$t("支付提醒"),content:e.$t("线下支付已关闭,请点击确认按钮返回主页"),showCancel:!1,success:function(){t.switchTab({url:"/pages/index/index"})}}),r&&t.setNavigationBarTitle({title:r})})).catch((function(e){t.showToast({title:e,icon:"none"})}))},checkForm:function(e){var n=e.detail.value,a=n.money,i=n.method;a?this.combData(i):t.showToast({title:this.$t("请输入支付金额"),icon:"none"})},checkPrice:function(){var e=this;(0,o.offlineCheckPrice)({pay_price:this.money}).then((function(t){e.payPrice=t.data.pay_price,e.show=t.data.show})).catch((function(e){t.showToast({title:e,icon:"none"})}))},combData:function(e){var n=this,a={type:3,pay_type:e,from:"routine",price:this.payPrice||this.money,money:this.money};a.from="routine",this.paying||(this.paying=!0,t.showLoading({title:this.$t("正在确认")}),(0,o.offlineCreate)(a).then((function(e){t.hideLoading(),n.callPay(e)})).catch((function(e){n.paying=!1,t.showToast({title:e,icon:"none"})})))},formpost:function(t,e){var n=document.createElement("form");for(var a in n.action=t,n.method="post",n.target="_self",n.style.display="none",e){var i=document.createElement("input");i.name=a,i.value=e[a],n.appendChild(i)}document.body.appendChild(n),this.$nextTick((function(t){n.submit()}))},callPay:function(e){var n=e.data,i=n.status,o=n.result,s=o.orderId,c=o.jsConfig,r="/pages/annex/offline_result/index?site_name="+this.site_name;switch(i){case"ORDER_EXIST":case"EXTEND_ORDER":case"ALLINPAY_PAY":t.hideLoading(),this.initIn=!0,a.openEmbeddedMiniProgram({appId:"wxef277996acc166c3",extraData:{cusid:c.cusid,appid:c.appid,version:c.version,trxamt:c.trxamt,reqsn:c.reqsn,notify_url:c.notify_url,body:c.body,remark:c.remark,validtime:c.validtime,randomstr:c.randomstr,paytype:c.paytype,sign:c.sign,signtype:c.signtype}}),this.jumpData={orderId:data.data.result.orderId,msg:data.msg};break;case"PAY_ERROR":this.paying=!1,this.$util.Tips({title:e.msg},{tab:5,url:r});break;case"SUCCESS":this.paying=!1,this.money="",this.$util.Tips({title:e.msg,icon:"success"},{tab:5,url:r});break;case"WECHAT_PAY":var u=this,l="";l=t.requestOrderPayment?"requestOrderPayment":"requestPayment",t[l]({timeStamp:c.timestamp,nonceStr:c.nonceStr,package:c.package,signType:c.signType,paySign:c.paySign,success:function(t){u.$util.Tips({title:u.$t("支付成功"),icon:"success"},{tab:5,url:"/pages/annex/offline_result/index"})},fail:function(){t.showToast({title:u.$t("取消支付"),icon:"none",success:function(){u.paying=!1}})},complete:function(){u.paying=!1,t.hideLoading()}});break;case"PAY_DEFICIENCY":this.paying=!1,this.$util.Tips({title:e.msg});break;case"WECHAT_H5_PAY":this.paying=!1,t.showToast({title:e.msg,success:function(){location.href=c.h5_url}});break;case"ALIPAY_PAY":this.paying=!1,t.navigateTo({url:"/pages/users/alipay_invoke/index?id=".concat(s,"&link=").concat(c.qrCode)});break}}}});e.default=u}).call(this,n("543d")["default"],n("bc2e")["default"])},dcb5:function(t,e,n){"use strict";n.r(e);var a=n("d482"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a}},[["b717","common/runtime","common/vendor"]]]);