(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-payment-settlement"],{"107c6":function(t,e,r){"use strict";r("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.arrivalSubscribe=function(){var t=o();return i([t.PRODUCT_INCREASE])},e.auth=o,e.openEextractSubscribe=function(){var t=o();return i([t.EXTRACT_NOTICE])},e.openExtrctSubscribe=function(){var t=o();return i([t.EXTRACT_NOTICE])},e.openOrderRefundSubscribe=function(){var t=o();return i([t.REFUND_CONFORM_CODE])},e.openOrderSubscribe=function(){var t=o();return i([t.ORDER_DELIVER_SUCCESS,t.DELIVER_GOODS_CODE])},e.openPaySubscribe=function(){var t=o();return i([t.DELIVER_GOODS_CODE,t.ORDER_DELIVER_SUCCESS,t.ORDER_PAY_SUCCESS])},e.openRechargeSubscribe=function(){var t=o();return i([t.USER_BALANCE_CHANGE])},e.subscribe=i,r("d3b7");var a=r("8a31");function o(){var t,e=uni.getStorageSync(a.SUBSCRIBE_MESSAGE);return t=e||{},t}function i(t){wx;return new Promise((function(e,r){uni.requestSubscribeMessage({tmplIds:t,success:function(t){return e(t)},fail:function(t){return e(t)},complete:function(t){}})}))}},"26fb":function(t,e,r){var a=r("5ca7");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=r("4f06").default;o("7ec44743",a,!0,{sourceMap:!1,shadowMode:!1})},3834:function(t,e,r){"use strict";r("7a82");var a=r("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(r("5530"));r("99af");var i=r("736a"),n=r("33b4"),s=(r("107c6"),r("26cb")),u=r("5315"),c=r("4073"),d=(getApp(),{data:function(){return{platformConsumption:[],cartArr:[{name:"微信支付",icon:"icon-weixin2",value:"weixin",title:"微信快捷支付",payStatus:1},{name:"支付宝支付",icon:"icon-icon34",value:"alipay",title:"支付宝支付",payStatus:this.$store.getters.globalData.alipay_open},{name:"余额支付",icon:"icon-icon-test",value:"balance",title:"可用余额:",payStatus:this.$store.getters.globalData.yue_pay_status},{name:"线下支付",icon:"icon-yinhangqia",value:"offline",title:"线下支付",payStatus:2},{name:"先货后款",icon:"tan-a-lujing17324",value:"creditBuy",title:"结算周期:".concat(this.settle_cycle,"天 日利率:").concat(this.interest_rate,"%"),payStatus:""}],tagStyle:{img:"width:100%;display:block;",video:"width:100%;"},radioList:[{title:this.deliveryName,check:!0},{title:"到店核销",check:!1}],payType:"weixin",active:0,address:{address:!1},couponId:0,cartId:"",userInfo:{},coupon_price:0,ChangePrice:0,formIds:[],status:0,is_address:!1,toPay:!1,cartInfo:[],priceGroup:{},animated:!1,totalPrice:0,offlinePostage:"",from:"",orderStatus:"",couponIndex:0,subCoupon:{},couponData:{},orderPay:!1,pics:[],extend:[],virtualIndex:0,platformCoupon:[],total_platform_coupon_price:0,enabledPlatformCoupon:!1,plantCoupon:!1,order_key:"",product_type:"",source:null,settle_cycle:"",type_id:"",consumption_id:"",consumption_money:"",payForm:{cart_id:"",address_id:"",use_coupon:"",takes:"",use_integral:"",receipt_data:[],mark:"",pay_type:"",money:"",merName:"",return_url:""},checkForm:{address_id:"",cart_id:[],consumption_id:"",product_type:0,source:999,takes:[],use_coupon:{},use_integral:!1}}},computed:(0,o.default)((0,o.default)({},(0,s.mapGetters)(["isLogin","viewColor"])),(0,u.configMap)(["hide_mer_status","yue_pay_status"])),watch:{yue_pay_status:function(t){this.payMode[2].payStatus=t}},onLoad:function(t){var e=this;this.payForm.cart_id=t.cartId,this.payForm.money=t.money,this.payForm.merName=t.merName,this.checkForm.cart_id=t.cartId.split(",");var r=this.getOpenerEventChannel();r.on("datas",(function(t){e.platformConsumption=t})),this.from=this.$wechat.isWeixin()?"weixin":"h5",this.isLogin||(this.isAuto=!0,this.isShowAuth=!0)},onShow:function(){this.getUserInfo()},methods:{couponTap3:function(t,e){var r=this;uni.navigateTo({url:"/pages/redpacket/redpacket",success:function(t){t.eventChannel.emit("changeRedPacketInfo",r.platformConsumption),uni.$once("changeRedPacket",(function(t){r.consumption_id=t,(0,c.orderCheck)((0,o.default)((0,o.default)({},r.checkForm),{},{consumption_id:r.consumption_id})).then((function(t){r.payForm.money=r.cartForm.total_price}))}))}})},authColse:function(t){this.isShowAuth=t},onLoadFun:function(){this.isShowAuth=!1},getUserInfo:function(){var t=this;(0,n.getUserInfo)().then((function(e){t.userInfo=e.data}))},payItem:function(t){var e=t;this.active=e,this.animated=!0,this.payType=this.cartArr[e].value,"weixin"==this.payType&&(this.payType=this.from)},payment:function(t){var e=this,r=this;(0,i.createOrder)(t).then((function(t){var a=t.data.status,o=t.data.result.order_id,i=t.data.result.config,n="/pages/order_pay_status/index?order_id="+o+"&msg="+t.message+"&product_type="+r.payForm.product_type+"&source="+r.payForm.source,s="/pages/order_details/stay?order_id="+o+"&credit_buy=1&product_type="+r.payForm.product_type;switch(r.orderPay=!0,uni.hideLoading(),a){case"ORDER_EXIST":case"EXTEND_ORDER":case"PAY_ERROR":case"error":return r.$util.Tips({title:t.message},{tab:5,url:s});case"success":return r.$util.Tips({title:t.message,icon:"success"},{tab:5,url:n});case"alipay":case"alipayQr":return;case"wechat":case"weixin":case"weixinApp":i.timeStamp=i.timestamp,e.$wechat.pay(i).then((function(t){return r.$util.Tips({title:t.message,icon:"success"},{tab:4,url:n})})).catch((function(t){if("chooseWXPay:cancel"==t.errMsg)return r.$util.Tips({title:"取消支付"},{tab:5,url:n+"&status=0"})}));break;case"balance":return r.$util.Tips({title:t.msg},{tab:5,url:n+"&status=1"});case"h5":var u=window.location.protocol+"//"+window.location.host,c="".concat(u,"/pages/order_pay_status/index?order_id=").concat(o,"&msg=").concat(t.message,"&product_type=").concat(r.product_type,"&source").concat(r.source),d=encodeURIComponent(c),p=i.mweb_url||i.h5_url,f="".concat(p,"&redirect_url=").concat(d);setTimeout((function(){location.href=f}),100);break;default:var l="/pages/order_pay_status/index?order_id="+o+"&msg=取消支付&product_type="+r.product_type+"&source="+r.source;return r.$util.Tips({title:"取消支付"},{tab:5,url:l+"&status=0"})}})).catch((function(t){return r.$util.Tips({title:t})}))},SubOrder:function(){return this.payType?"balance"==this.payType&&this.userInfo.now_money