(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-fee-qrCodeCashier"],{"797c":function(e,t,a){"use strict";a.r(t);var n=a("dfd1"),o=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=o.a},"96ec":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=this._self._c||e;return t("v-uni-view",[t("v-uni-text",[this._v(this._s(this.msg))])],1)},o=[]},a6b0:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.cashierPayFee=function(e,t,a){a||(a="/pages/successPage/successPage?msg=支付成功&objType=3003");wx.showLoading({title:"支付中"}),(0,o.requestNoAuth)({url:i.default.cashier,method:"POST",data:t,success:function(t){if("扣费为0回调成功"===t.data.msg){uni.navigateTo({url:"/pages/successPage/successPage?msg=支付成功&objType=3003"})}uni.showToast({title:t.data.msg,duration:2e3}),console.log(t),console.log();var a=t.data.returnData.abapay_deeplink,n=t.data.orderId;e.aba_train_id=t.data.returnData.status.tran_id,e.order_id_query=t.data.orderId;var o=Date.now(),i=60*t.data.lifetime*1e3;if(e.order_lifetime_timestamp=o+i,e.qrImage=t.data.returnData.qrImage,e.abadeeplink=t.data.returnData.abapay_deeplink,e.app_store=t.data.returnData.app_store,e.play_store=t.data.returnData.play_store,void 0!=e.abadeeplink){if("undefined"!==typeof plus)plus.runtime.openURL(a,(function(t){console.log("打开结果:",t),t&&t.code&&(e.showQrToast=!0)})),e.banButton=!1;else try{var u=window.open(a,"_blank");if(!u)return;setTimeout((function(){u&&!u.closed&&(u.close(),e.showQrToast=!0,e.showQRButton=!0)}),2e3)}catch(d){console.error("window.open 错误:",d)}var r=[];try{var s=uni.getStorageSync("order_list");s?r=s:console.log("存储数据为空,使用默认空列表")}catch(c){console.log("无存储数据,使用默认空列表",c)}r.push({order_id:n,train_id:e.aba_train_id,qr_image:e.qrImage,abapayDeeplink:a,money:e.money,des:e.data.feeName,time:Date.now(),feeIds:e.data.feeIds}),console.log("order list:"),console.log(r);try{uni.setStorageSync("order_list",r),console.log("列表存储成功")}catch(c){console.log("列表存储失败",c)}}else uni.showModal({title:"Error",content:t.data.returnData.status.message,showCancel:!1})},fail:function(t){wx.hideLoading(),wx.showToast({title:"服务器异常了",icon:"none",duration:2e3}),e.banButton=!1}})},t.computeObjFee=function(e){return new Promise((function(t,a){(0,o.request)({url:i.default.computeObjFee,method:"GET",data:e,success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.computePayFeeCoupon=function(e){return new Promise((function(t,a){(0,o.request)({url:i.default.computePayFeeCoupon,method:"GET",data:e,success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.couponPropertyUserGiftCar=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.couponPropertyUserGiftCar,method:"POST",data:JSON.stringify(e),success:function(e){0!=e.data.code?a():t(e.data)},fail:function(e){a()}})}))},t.generatorCouponQrcode=function(e){return new Promise((function(t,a){(0,o.request)({url:i.default.generatorCouponQrcode,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.getCouponUsers=function(e,t){return new Promise((function(a,n){(0,o.requestNoAuth)({url:i.default.queryCouponUser,method:"GET",data:e,success:function(e){if(200==e.statusCode)return t=e.data,t.length<1&&n(),void a(t);n()},fail:function(e){n()}})}))},t.getFeeDiscounts=function(e){return new Promise((function(t,a){(0,o.request)({url:i.default.computeFeeDiscount,method:"GET",data:e,success:function(e){if(200!=e.statusCode)a();else{var n=e.data.data;t(n)}},fail:function(e){a()}})}))},t.getParkingCarCoupon=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.listParkingCouponCar,method:"GET",data:e,success:function(e){var n=e.data;0!=n.code?a(n.msg):t(n.data)},fail:function(e){a()}})}))},t.getQrCodeData=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.getNativeQrcodePayment,method:"GET",data:e,success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.getRoomFees=function(e,t){return new Promise((function(a,n){var r=[];(0,o.request)({url:i.default.queryFeeByOwner,method:"GET",data:e,success:function(e){if(200==e.statusCode){var o=e.data.fees;return o.length<1&&n(),o.forEach((function(e){t=JSON.parse(JSON.stringify(t)),t.endTime=(0,u.dateTimeStringToDateString)(e.endTime);var a=new Date;e.endTime>a?t.feeStateName="正常":t.feeStateName="欠费",t.additionalAmount=e.additionalAmount,t.squarePrice=e.squarePrice,t.amount=e.feePrice,t.feeId=e.feeId,t.feeName=e.feeName,t.feeFlag=e.feeFlag,t.paymentCycle=e.paymentCycle,t.preDegrees=e.preDegrees,t.curDegrees=e.curDegrees,t.preReadingTime=e.preReadingTime,t.curReadingTime=e.curReadingTime,t.feeState=e.state,t.deadlineTime=e.deadlineTime,t.amountOwed=e.amountOwed,t.startTime=e.startTime,t.payOnline=e.payOnline,r.push(t)})),void a(r)}n()},fail:function(e){n()}})}))},t.getRoomOweFees=function(e){return new Promise((function(t,a){(0,o.request)({url:i.default.listOweFees,method:"GET",data:e,success:function(e){if(200==e.statusCode){var n=e.data.data;return n.length<1&&a(),n.forEach((function(e){e.endTime=(0,u.dateTimeStringToDateString)(e.endTime),e.deadlineTime=(0,u.dateTimeStringToDateString)(e.deadlineTime)})),void t(n)}a()},fail:function(e){a()}})}))},t.getTempCarFeeOrder=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.getTempCarFeeOrder,method:"GET",data:e,success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.payFeeApp=function(e,t){wx.showLoading({title:"支付中"}),(0,o.request)({url:i.default.preOrder,method:"POST",data:t,success:function(e){if(wx.hideLoading(),"0"==e.data.code){var t;e.data;return t=JSON.stringify({}),void uni.requestPayment({provider:"wxpay",orderInfo:t,success:function(e){uni.navigateTo({url:"/pages/successPage/successPage?msg=支付成功&objType=3003"})},fail:function(e){console.log("fail:"+JSON.stringify(e))}})}if("100"==e.data.code){e.data;return uni.showToast({title:"支付成功",duration:2e3}),void uni.navigateTo({url:"/pages/successPage/successPage?msg=支付成功&objType=3003"})}wx.showToast({title:data.msg,icon:"none",duration:2e3})},fail:function(e){wx.hideLoading(),wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})},t.payFeeWechat=function(e,t,a){a||(a="/pages/successPage/successPage?msg=支付成功&objType=3003");wx.showLoading({title:"支付中"}),(0,o.request)({url:i.default.unifiedPayment,method:"POST",data:t,success:function(e){if(wx.hideLoading(),"0"!=e.data.code){if(200==e.statusCode&&"100"==e.data.code){e.data;return uni.showToast({title:"支付成功",duration:2e3}),void setTimeout((function(){uni.navigateBack({})}),2e3)}wx.showToast({title:"缴费失败"+e.data.msg,icon:"none",duration:2e3})}else{var t=e.data;WexinPayFactory.wexinPay(t,(function(){uni.navigateTo({url:a})}))}},fail:function(e){wx.hideLoading(),wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})},t.receiveParkingCoupon=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.saveParkingCouponCar,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.toAliPayTempCarFee=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.alipayPayTempCarFee,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},t.toPayTempCarFee=function(e){return new Promise((function(t,a){(0,o.requestNoAuth)({url:i.default.cashier,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?a():t(e.data)},fail:function(e){a()}})}))},a("bf0f"),a("2797"),a("d4b5"),a("aa9c");var o=a("a7bc"),i=n(a("79d4")),u=a("fcd3")},ae3c:function(e,t,a){"use strict";a.r(t);var n=a("96ec"),o=a("797c");for(var i in o)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return o[e]}))}(i);var u=a("828b"),r=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,"643b54ce",null,!1,n["a"],void 0);t["default"]=r.exports},dfd1:function(e,t,a){"use strict";a("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("a6b0"),o={data:function(){return{msg:"正在处理,请稍等!",qrToken:""}},onLoad:function(e){this.qrToken=e.qrToken,this.qrToken?this._loadQrcodeData():this.msg="二维码错误"},methods:{_loadQrcodeData:function(){var e=this;(0,n.getQrCodeData)({qrToken:this.qrToken}).then((function(t){if(0!=t.code)return uni.showToast({icon:"none",title:t.msg}),void(e.msg=t.msg);var a=t.data;a.tradeType="JSAPI",uni.setStorageSync("doing_cashier",a),uni.navigateTo({url:"/pages/fee/cashier?money="+a.money+"&business="+a.business+"&communityId="+a.communityId+"&cashierUserId="+a.createUserId})}))}}};t.default=o}}]);