(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/annex/offline_pay/index"],{"15d9":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("f076");i(n("3240"));var a=i(n("7454"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"234d":function(t,e,n){"use strict";var i=n("d0fc"),a=n.n(i);a.a},"4d6d":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"6f7e":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("606e"),a=n("5088"),o=n("8f59"),s=(getApp(),{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,isShowAuth:!1}},watch:{money:function(t,e){t&&"number"===typeof t?this.checkPrice():this.payPrice=""}},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(t){},onShow:function(){this.isLogin?this.getPayType():(0,a.toLogin)()},methods:{getPayType:function(){var e=this;(0,i.orderOfflinePayType)().then((function(n){var i=n.data,a=i.ali_pay_status,o=i.pay_weixin_open,s=i.yue_pay_status,c=i.offline_pay_status,u=i.site_name,r=i.now_money;e.alipay="1"===a,e.wxpay=1===o,e.yuePay=1===s,e.now_money=r,e.site_name=u,c||t.showModal({title:"支付提醒",content:"线下支付已关闭，请点击确认按钮返回主页",showCancel:!1,success:function(){t.switchTab({url:"/pages/index/index"})}}),u&&t.setNavigationBarTitle({title:u})})).catch((function(e){t.showToast({title:e,icon:"none"})}))},checkForm:function(e){var n=e.detail.value,i=n.money,a=n.method;i?this.combData(a):t.showToast({title:"请输入支付金额",icon:"none"})},checkPrice:function(){var e=this;(0,i.offlineCheckPrice)({pay_price:this.money}).then((function(t){e.payPrice=t.data.pay_price})).catch((function(e){t.showToast({title:e,icon:"none"})}))},combData:function(e){var n=this,a={type:3,pay_type:e,from:"weixinh5",price:this.payPrice||this.money,money:this.money};a.from="routine",this.paying||(this.paying=!0,t.showLoading({title:"正在确认…"}),(0,i.offlineCreate)(a).then((function(e){t.hideLoading(),n.callPay(e)})).catch((function(e){n.paying=!1,t.showToast({title:e,icon:"none"})})))},callPay:function(e){var n=e.data,i=n.status,a=n.result,o=(a.orderId,a.jsConfig),s="/pages/annex/offline_result/index?site_name="+this.site_name;switch(i){case"ORDER_EXIST":case"EXTEND_ORDER":case"PAY_ERROR":this.paying=!1,this.$util.Tips({title:e.msg},{tab:5,url:s});break;case"SUCCESS":this.paying=!1,this.money="",this.$util.Tips({title:e.msg,icon:"success"},{tab:5,url:s});break;case"WECHAT_PAY":var c=this,u="";u=t.requestOrderPayment?"requestOrderPayment":"requestPayment",t[u]({timeStamp:o.timestamp,nonceStr:o.nonceStr,package:o.package,signType:o.signType,paySign:o.paySign,success:function(t){c.$util.Tips({title:"支付成功",icon:"success"},{tab:5,url:"/pages/annex/offline_result/index"})},fail:function(){t.showToast({title:"取消支付",icon:"none",success:function(){c.paying=!1}})},complete:function(){c.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=o.mweb_url}});break;case"ALIPAY_PAY":this.paying=!1,t.showToast({title:"微信小程序不支持支付宝支付"});break}}}});e.default=s}).call(this,n("df3c")["default"])},7454:function(t,e,n){"use strict";n.r(e);var i=n("4d6d"),a=n("a0d8");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("234d"),n("8036");var s=n("828b"),c=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"29143d6f",null,!1,i["a"],void 0);e["default"]=c.exports},8036:function(t,e,n){"use strict";var i=n("a5fc"),a=n.n(i);a.a},a0d8:function(t,e,n){"use strict";n.r(e);var i=n("6f7e"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},a5fc:function(t,e,n){},d0fc:function(t,e,n){}},[["15d9","common/runtime","common/vendor"]]]);