1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-fee-cashier"],{"0563":function(e,t,n){"use strict";n.r(t);var a=n("daca"),i=n("b14e");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("3cd4");var s=n("828b"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"3d85e12f",null,!1,a["a"],void 0);t["default"]=r.exports},"0dbe":function(e,t,n){"use strict";var a=n("0f8a"),i=n.n(a);i.a},"0f8a":function(e,t,n){var a=n("ac58");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var i=n("967d").default;i("4c6d35b6",a,!0,{sourceMap:!1,shadowMode:!1})},"151e":function(e,t,n){var a=n("c86c");t=a(!1),t.push([e.i,"@charset \"UTF-8\";.block__title[data-v-3d85e12f]{margin:0;font-weight:400;font-size:14px;color:rgba(69,90,100,.6);padding:%?0?% %?30?% %?20?%}.money-info[data-v-3d85e12f]{height:%?400?%;margin:%?20?%}.money-info .money-black[data-v-3d85e12f]{height:%?120?%}.money-info .money-title[data-v-3d85e12f]{font-size:%?32?%}.money-info .money-value[data-v-3d85e12f]{color:#e54d42;margin-top:%?20?%;font-size:%?64?%}.payment-methods[data-v-3d85e12f]{padding:%?10?% %?30?%}.payment-options[data-v-3d85e12f]{display:flex;flex-direction:column;gap:%?16?%;width:100%}.payment-method[data-v-3d85e12f]{display:flex;align-items:center;padding:%?20?%;gap:%?20?%;background:#fff;box-shadow:0 1px 4px rgba(183,190,203,.36);border-radius:%?16?%;cursor:pointer;width:100%;box-sizing:border-box;transition:all .2s ease}.payment-method.payment-method--selected[data-v-3d85e12f]{border:%?2?% solid #007aff;box-shadow:0 %?4?% %?12?% rgba(0,122,255,.15)}.payment-method.disabled[data-v-3d85e12f]{cursor:not-allowed;opacity:.7}.payment-icon-wrapper[data-v-3d85e12f]{width:%?70?%;height:%?70?%;border-radius:%?12?%;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.payment-icon[data-v-3d85e12f]{width:%?60?%;height:%?60?%;transition:opacity .2s ease}.payment-label-wrapper[data-v-3d85e12f]{display:flex;flex-direction:column;flex:1}.payment-main-label[data-v-3d85e12f]{font-size:%?28?%;font-weight:600;margin-bottom:%?6?%;transition:color .2s ease}.payment-sub-label[data-v-3d85e12f]{font-size:%?22?%;transition:color .2s ease}.payment-action-wrapper[data-v-3d85e12f]{position:relative;width:%?40?%;height:%?40?%;transition:opacity .2s ease}.arrow-bg[data-v-3d85e12f]{position:absolute;inset:0;border-radius:%?6?%;transition:background-color .2s ease}.arrow-icon[data-v-3d85e12f]{position:absolute;left:16%;top:22%;width:%?20?%;height:%?20?%;border-top:%?2?% solid #535362;border-right:%?2?% solid #535362;-webkit-transform:rotate(45deg);transform:rotate(45deg);transition:border-color .2s ease}\n/* 二维码弹窗容器:居中显示,半透明遮罩 */\n/* 弹窗整体居中+遮罩 */.qr-toast[data-v-3d85e12f]{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999;padding:50px 20px;box-sizing:border-box}\n/* 白色内容卡片 */.qr-toast__content[data-v-3d85e12f]{position:relative;background:#fff;border-radius:12px;padding:20px;width:90vw;max-width:640px;display:flex;flex-direction:column;align-items:center;margin:0 auto}\n/* 右上角关闭 */.qr-toast__close-icon[data-v-3d85e12f]{position:absolute;top:10px;right:10px;font-size:20px;color:#999;cursor:pointer}\n/* 提示文字 */.qr-toast__title[data-v-3d85e12f]{font-size:16px;color:#333;margin-bottom:15px;text-align:center}\n/* 二维码 */.qr-toast__image[data-v-3d85e12f]{width:280px;height:auto;background:#fff;padding:12px;border-radius:8px;margin-bottom:10px}\n/* 底部按钮区:横向排列按钮 */.qr-toast__actions[data-v-3d85e12f]{display:flex;justify-content:space-between;\n /* 或者可以用 'flex-start' 或 'flex-end' 根据需求调整 */align-items:center\n /* 确保垂直居中对齐 */}\n/* 通用按钮 */.qr-toast__btn[data-v-3d85e12f]{padding:10px;font-size:14px;border-radius:6px;border:none;width:100%}\n/* 灰色按钮:确定支付 */.qr-toast__btn--confirm[data-v-3d85e12f]{margin-right:auto;\n /* 将左侧的内容推到最左边 */background:#666;width:40vw;color:#fff}\n/* 蓝色按钮:打开ABA */.qr-toast__btn--aba[data-v-3d85e12f]{margin-left:auto;\n /* 将右侧的内容推到最右边 */background:#007aff;width:40vw;color:#fff}",""]),e.exports=t},"19b2":function(e,t,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("bd06"),n("bf0f"),n("4626"),n("5ac7"),n("e838");var i=a(n("39d8")),o=(a(n("b885")),n("97d4")),s=n("b9a1"),r=n("6cd6"),c=n("a6b0"),d=a(n("bf7d")),u=n("c162"),l=n("b9a1"),p=n("a7bc"),f=(a(n("b885")),a(n("79d4"))),h=n("c8b3"),m=a(n("eb04")),g={data:function(){var e;return e={selectedAbaOption:"abapay_khqr",showPaymentOptions:!1,aba_pay_data:null,communityId:"",orgMoney:0,queryTime:0,isPaid:!1,money:0,business:"",showQRButton:!1,abadeeplink:void 0,app_store:void 0,play_store:void 0,openId:"",appId:"",data:{}},(0,i.default)(e,"appId",""),(0,i.default)(e,"cashierUserId",""),(0,i.default)(e,"banButton",!1),(0,i.default)(e,"useIntegral","N"),(0,i.default)(e,"integral",0),(0,i.default)(e,"integralMoney",0),(0,i.default)(e,"cashierOrderList",[]),(0,i.default)(e,"payment_option","aba_pay"),(0,i.default)(e,"paymentOptions",[{value:"aba_pay",label:"ABA KHQR",des:"Scan to pay with any banking app",icon:"/static/pay_images/aba_options/ABAKHQR.png",iconBg:"#005E7B",enabled:!0},{value:"alipay",label:"Alipay",des:"Scan to pay with Alipay",icon:"/static/pay_images/aba_options/Alipay.png",iconBg:"#00A0E9",enabled:!1},{value:"wechat",label:"Wechat",des:"Scan to pay with WeChat",icon:"/static/pay_images/aba_options/Wechat.png",iconBg:"#00C800",enabled:!1}]),(0,i.default)(e,"aba_train_id",""),(0,i.default)(e,"order_id_query",""),(0,i.default)(e,"order_lifetime_minute",0),(0,i.default)(e,"timer",null),(0,i.default)(e,"showQrToast",!1),(0,i.default)(e,"qrImage",""),e},mounted:function(){if("ALIPAY"==(0,r.isWxOrAli)()){xu;var e=document.createElement("script");e.type="text/javascript",e.src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js",document.body.appendChild(e)}},onUnload:function(){this.clearQueryTimer()},onShow:function(){if(this.get_train_status(),this.startQueryTimer(),(0,h.isShowLaterTime)()){var e=[];try{var t=uni.getStorageSync("order_list");t?e=t:console.log("存储数据为空,使用默认空列表")}catch(c){console.log("无存储数据,使用默认空列表",c)}if(console.log("=========================\n\n"),console.log(e),e.length>0){var n=this.data.feeIds,a=this.money,i=this.data.feeName,o=e.findIndex((function(e){return n&&""!==n&&e.feeIds?e.feeIds.some((function(e){return n.includes(e)})):e.money===a&&e.des===i})),s=this.$t("pages.fee.cashier.您有未支付的订单,是否前往支付?"),r="";-1!==o?(s=this.$t("pages.fee.cashier.检测到您有和这个订单相关的未支付订单,是否前往支付?"),r="/pages/fee/orderNotPay?showHigh="+o,console.log(r)):r="/pages/fee/orderNotPay",console.log(1),console.log(e),uni.showModal({title:this.$t("pages.fee.cashier.提示"),content:s,cancelText:this.$t("pages.fee.cashier.稍后再说"),confirmText:this.$t("pages.fee.cashier.去支付"),success:function(e){e.confirm?uni.navigateTo({url:r,fail:function(e){uni.showToast({title:"跳转失败,请稍后重试",icon:"none",duration:2e3}),console.error("导航失败原因:",e)}}):e.cancel&&(console.log("用户选择稍后处理未支付订单"),(0,h.setShowLaterTime)())},fail:function(e){console.error("弹窗调用失败:",e)}})}}},onLoad:function(e){this.openId=e.openId,this.communityId=e.communityId,this.cashierUserId=e.cashierUserId;var t=this;this._loadAppId((function(){if(!(0,o.isNotNull)(t.openId))return"ALIPAY"==(0,r.isWxOrAli)()?void t._refreshAliPayOpenId():void t._refreshWechatMiniOpenId()})),this.money=e.money,this.orgMoney=e.money,this.business=e.business,this.data=uni.getStorageSync("doing_cashier"),(0,u.hasLogin)()&&this._loadUserIntegral()},components:{CashierAbaOptions:m.default,tips:d.default},methods:{close_qr:function(){this.get_train_status(),this.showQrToast=!1,this.banButton=!1},togglePaymentOptions:function(){this.showPaymentOptions=!this.showPaymentOptions},handleShowPaymentOptions:function(e){console.log("弹窗显示状态变化为:",e),this.showPaymentOptions=e,!0!==this.showQRButton&&(this.banButton=!1!==e)},handleSelectedAbaOption:function(e){console.log("选中的支付方式:",e),this.selectedAbaOption=e,this.processPaymentSelection(e)},processPaymentSelection:function(e){console.log("处理支付方式:",e),this.aba_pay_data.aba_pay_option=e,(0,c.cashierPayFee)(this,this.aba_pay_data)},get_train_status:function(){var e=this;""!==this.aba_train_id&&(uni.showToast({title:"Loading",icon:"none",duration:2e3}),e.queryTime=e.queryTime+1,(0,p.request)({url:f.default.queryPayStatus,method:"GET",data:{trainId:e.aba_train_id},success:function(t){try{var n=t.data;if(console.log("支付状态查询ID:",e.aba_train_id),console.log("支付状态查询结果:",n),!0===n||!0===n.success){console.log("支付成功 ✅,停止轮询"),clearInterval(this.timer),e.banButton=!1,e.isPaid=!0,uni.showToast({title:e.$t("pages.fee.cashier.支付成功"),icon:"none",duration:2e3});var a="/pages/successPage/successPage?msg="+e.$t("pages.fee.unifiedPaymentCashier.支付成功")+"&objType=3003";uni.navigateTo({url:a})}else uni.showToast({title:e.$t("pages.fee.cashier.查询中"),icon:"none",duration:2e3}),e.banButton=!0}catch(i){console.error("解析支付状态响应失败:",i)}},fail:function(e){console.error("支付状态请求失败:",e)}}))},selectPaymentMethod:function(e){this.payment_option=e,!this.banButton&&this.appId&&this._submit()},startQueryTimer:function(){var e=this;if(1===this.queryTime&&(this.notice_Backend(),console.log("通知后台成功")),!this.isPaid&&!this.timer&&this.queryTime>=1){this.timer=setInterval((function(){e.get_train_status(),(e.isPaid||Date.now()>=e.order_lifetime_timestamp)&&(clearInterval(e.timer),e.timer=null,console.log("定时器停止,原因:",e.isPaid?"支付成功":"订单已过期"))}),3e3)}},clearQueryTimer:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},_loadAppId:function(e){var t=this;(0,s.getCommunityWechatAppId)({communityId:this.communityId,objType:"1100"}).then((function(n){t.appId=n.data,e()}))},_refreshWechatOpenId:function(){var e=window.location.href;(0,s.refreshUserOpenId)({redirectUrl:e,wAppId:this.appId}).then((function(e){0!=e.code||(window.location.href=e.data.openUrl)}))},_refreshWechatMiniOpenId:function(){var e=this;wx.login({success:function(t){if(t.code){var n=uni.getAccountInfoSync(),a=n.miniProgram.appId;(0,s.getWechatMiniOpenId)({code:t.code,appId:a}).then((function(t){0==t.code?e.openId=t.data:uni.showToast({icon:"none",title:t.msg})}))}},fail:function(e){console.log("调用wx.login获取code失败"),console.log(e)}})},_submit:function(){if(this.appId){this.banButton=!0;var e=this.data;if(e.business=this.business,e.tradeType="JSAPI",e.appId=this.appId,e.cashierUserId=this.cashierUserId,e.openId="122132132132",e.paymentOption=this.payment_option,e.useIntegral=this.useIntegral,"aba_pay"===this.payment_option)return this.showPaymentOptions=!0,void(this.aba_pay_data=e);(0,c.cashierPayFee)(this,e)}else uni.showToast({icon:"none",title:this.$t("pages.fee.cashier.小区未配置支付信息")})},_loadUserIntegral:function(){var e=this;(0,l.queryUserIntegral)({page:1,row:1}).then((function(t){e.integral=t.integral,e.integralMoney=t.integralMoney}))},toggleQr:function(){this.showQrToast=!this.showQrToast},DownloadQr:function(){var e=document.createElement("a");e.href=this.qrImage,e.download="qr-code.png",e.click()},notice_Backend:function(){var e={order_id:this.order_id_query,tran_id:this.aba_train_id};(0,p.requestNoAuth)({url:f.default.abaCallBackAppUser,method:"POST",data:e,success:function(e){console.log("刷新订单状态返回结果:",e),(0,o.isNotNull)(e)&&"OK"===e.data?uni.showToast({title:e.data,icon:"none",duration:1500}):uni.showToast({title:"通知后台成功",icon:"none",duration:1500})},fail:function(e){console.error("刷新订单请求失败:",e)}})},_checkIntegral:function(e){console.log(e);var t=e.detail.value;if(!t||t.length<1)return this.useIntegral="N",void(this.money=this.orgMoney);this.useIntegral="Y",parseFloat(this.integralMoney)>parseFloat(this.orgMoney)?this.money=0:(this.money=parseFloat(this.orgMoney)-parseFloat(this.integralMoney),this.money=this.money.toFixed(2))},_viewGetIntegral:function(){var e=this.$t("pages.fee.cashier.您可以到商城购物或者物业缴费的方式获取积分积分可以用来物业缴费和商城购物");this.$refs.tipRef.openTip(this.$t("pages.fee.cashier.如何获取积分"),e)}}};t.default=g},"25be":function(e,t,n){var a=n("151e");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var i=n("967d").default;i("36bf6b62",a,!0,{sourceMap:!1,shadowMode:!1})},"3cd4":function(e,t,n){"use strict";var a=n("25be"),i=n.n(a);i.a},"597f":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"cu-modal",class:1==e.showTips?"show":""},[n("v-uni-view",{staticClass:"cu-dialog"},[n("v-uni-view",{staticClass:"cu-bar bg-white justify-end"},[n("v-uni-view",{staticClass:"content"},[e._v(e._s(e.title))]),n("v-uni-view",{staticClass:"action",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e._cancleTip()}}},[n("v-uni-text",{staticClass:"cuIcon-close text-red"})],1)],1),n("v-uni-view",{staticClass:"padding-xl"},[n("v-uni-view",[e._v(e._s(e.content))])],1),n("v-uni-view",{staticClass:"cu-bar bg-white justify-end"},[n("v-uni-view",{staticClass:"action margin-0 flex-sub solid-left",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e._cancleTip()}}},[e._v(" "+e._s(e.$t("pages.fee.unifiedPaymentCashier.关闭")))])],1)],1)],1)],1)},i=[]},7021:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a={name:"tips",data:function(){return{showTips:!1,title:"",content:""}},methods:{openTip:function(e,t){this.title=e,this.content=t,this.showTips=!0,console.log("openTip",this.showTips)},_cancleTip:function(){this.showTips=!1}}};t.default=a},8702:function(e,t,n){"use strict";n.r(t);var a=n("fe7b"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},a6b0:function(e,t,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.cashierPayFee=function(e,t,n){n||(n="/pages/successPage/successPage?msg=支付成功&objType=3003");wx.showLoading({title:"支付中"}),(0,i.requestNoAuth)({url:o.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 n=t.data.returnData.abapay_deeplink,a=t.data.orderId;e.aba_train_id=t.data.returnData.status.tran_id,e.order_id_query=t.data.orderId;var i=Date.now(),o=60*t.data.lifetime*1e3;if(e.order_lifetime_timestamp=i+o,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){"undefined"!==typeof plus?(plus.runtime.openURL(n,(function(t){console.log("打开结果:",t),t&&t.code&&(e.showQrToast=!0)})),e.banButton=!1):uni.showModal({title:e.$t("pages.fee.unifiedPaymentCashier.提示"),content:e.$t("pages.fee.unifiedPaymentCashier.是否打开ABA应用完成支付")+"?",showCancel:!0,cancelText:e.$t("pages.fee.unifiedPaymentCashier.取消"),confirmText:e.$t("pages.fee.unifiedPaymentCashier.打开"),success:function(t){if(!t.confirm)return e.showQrToast=!0,void(e.showQRButton=!0);window.open(n,"_blank"),e.showQRButton=!0},fail:function(t){console.error("弹窗交互失败:",t),e.showQrToast=!0,e.showQRButton=!0}});var s=[];try{var r=uni.getStorageSync("order_list");r?s=r:console.log("存储数据为空,使用默认空列表")}catch(c){console.log("无存储数据,使用默认空列表",c)}s.push({order_id:a,train_id:e.aba_train_id,qr_image:e.qrImage,abapayDeeplink:n,money:e.money,des:e.data.feeName,time:Date.now(),feeIds:e.data.feeIds}),console.log("order list:"),console.log(s);try{uni.setStorageSync("order_list",s),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,n){(0,i.request)({url:o.default.computeObjFee,method:"GET",data:e,success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.computePayFeeCoupon=function(e){return new Promise((function(t,n){(0,i.request)({url:o.default.computePayFeeCoupon,method:"GET",data:e,success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.couponPropertyUserGiftCar=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.couponPropertyUserGiftCar,method:"POST",data:JSON.stringify(e),success:function(e){0!=e.data.code?n():t(e.data)},fail:function(e){n()}})}))},t.generatorCouponQrcode=function(e){return new Promise((function(t,n){(0,i.request)({url:o.default.generatorCouponQrcode,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.getCouponUsers=function(e,t){return new Promise((function(n,a){(0,i.requestNoAuth)({url:o.default.queryCouponUser,method:"GET",data:e,success:function(e){if(200==e.statusCode)return t=e.data,t.length<1&&a(),void n(t);a()},fail:function(e){a()}})}))},t.getFeeDiscounts=function(e){return new Promise((function(t,n){(0,i.request)({url:o.default.computeFeeDiscount,method:"GET",data:e,success:function(e){if(200!=e.statusCode)n();else{var a=e.data.data;t(a)}},fail:function(e){n()}})}))},t.getParkingCarCoupon=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.listParkingCouponCar,method:"GET",data:e,success:function(e){var a=e.data;0!=a.code?n(a.msg):t(a.data)},fail:function(e){n()}})}))},t.getQrCodeData=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.getNativeQrcodePayment,method:"GET",data:e,success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.getRoomFees=function(e,t){return new Promise((function(n,a){var r=[];(0,i.request)({url:o.default.queryFeeByOwner,method:"GET",data:e,success:function(e){if(200==e.statusCode){var i=e.data.fees;return i.length<1&&a(),i.forEach((function(e){t=JSON.parse(JSON.stringify(t)),t.endTime=(0,s.dateTimeStringToDateString)(e.endTime);var n=new Date;e.endTime>n?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 n(r)}a()},fail:function(e){a()}})}))},t.getRoomOweFees=function(e){return new Promise((function(t,n){(0,i.request)({url:o.default.listOweFees,method:"GET",data:e,success:function(e){if(200==e.statusCode){var a=e.data.data;return a.length<1&&n(),a.forEach((function(e){e.endTime=(0,s.dateTimeStringToDateString)(e.endTime),e.deadlineTime=(0,s.dateTimeStringToDateString)(e.deadlineTime)})),void t(a)}n()},fail:function(e){n()}})}))},t.getTempCarFeeOrder=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.getTempCarFeeOrder,method:"GET",data:e,success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.payFeeApp=function(e,t){wx.showLoading({title:"支付中"}),(0,i.request)({url:o.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,n){n||(n="/pages/successPage/successPage?msg=支付成功&objType=3003");wx.showLoading({title:"支付中"}),(0,i.request)({url:o.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:n})}))}},fail:function(e){wx.hideLoading(),wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})},t.receiveParkingCoupon=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.saveParkingCouponCar,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.toAliPayTempCarFee=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.alipayPayTempCarFee,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},t.toPayTempCarFee=function(e){return new Promise((function(t,n){(0,i.requestNoAuth)({url:o.default.cashier,method:"POST",data:JSON.stringify(e),success:function(e){200!=e.statusCode?n():t(e.data)},fail:function(e){n()}})}))},n("bf0f"),n("2797"),n("d4b5"),n("aa9c");var i=n("a7bc"),o=a(n("79d4")),s=n("fcd3")},ac58:function(e,t,n){var a=n("c86c");t=a(!1),t.push([e.i,"\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/* 弹窗容器 */.payment-popup[data-v-24d68814]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:300px;background-color:#fff;box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:12px;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);padding:20px;z-index:1000}\r\n/* 弹窗头部 */.popup-header[data-v-24d68814]{display:flex;justify-content:space-between;align-items:center;width:100%;margin-bottom:16px}\r\n/* 弹窗标题 */.popup-title[data-v-24d68814]{font-family:SF Pro Display,sans-serif;font-weight:600;font-size:16px;color:#081b37}\r\n/* 关闭按钮 */.popup-close[data-v-24d68814]{font-size:24px;color:#535362;cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:700}\r\n/* 支付选项列表容器 */.payment-options[data-v-24d68814]{display:flex;flex-direction:column;gap:8px;overflow-y:auto;width:100%;max-height:200px}\r\n/* 单个支付选项样式 */.payment-method[data-v-24d68814]{display:flex;flex-direction:row;align-items:center;padding:10px;gap:10px;background:#fff;box-shadow:0 1px 4px rgba(183,190,203,.36);border-radius:8px;cursor:pointer;width:100%;box-sizing:border-box;transition:all .2s ease}\r\n/* 禁用状态样式 */.payment-method.disabled[data-v-24d68814]{cursor:not-allowed;opacity:.7}\r\n/* 支付图标容器 */.payment-icon-wrapper[data-v-24d68814]{width:40px;height:40px;border-radius:6px;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}\r\n/* 支付图标样式 */.payment-icon[data-v-24d68814]{width:30px;height:30px;transition:opacity .2s ease}\r\n/* 文字标签区域 */.payment-label-wrapper[data-v-24d68814]{display:flex;flex-direction:column;width:175px}\r\n/* 主标签样式 */.payment-main-label[data-v-24d68814]{font-size:12px;font-weight:600;margin-bottom:2px;transition:color .2s ease}\r\n/* 子标签/描述样式 */.payment-sub-label[data-v-24d68814]{font-size:11px;transition:color .2s ease}\r\n/* 右侧箭头容器 */.payment-action-wrapper[data-v-24d68814]{position:relative;width:20px;height:20px;transition:opacity .2s ease}\r\n/* 箭头背景 */.arrow-bg[data-v-24d68814]{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:3.2px;transition:background-color .2s ease}\r\n/* 箭头图标 */.arrow-icon[data-v-24d68814]{position:absolute;left:16%;top:22%;width:10px;height:10px;border-top:1.6px solid #535362;border-right:1.6px solid #535362;-webkit-transform:rotate(45deg);transform:rotate(45deg);transition:border-color .2s ease}\r\n/* 选中结果样式 */.selected-result[data-v-24d68814]{margin-top:20px;font-size:14px;color:#333;text-align:center}",""]),e.exports=t},b14e:function(e,t,n){"use strict";n.r(t);var a=n("19b2"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},bf7d:function(e,t,n){"use strict";n.r(t);var a=n("597f"),i=n("c046");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);var s=n("828b"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"d88db4ee",null,!1,a["a"],void 0);t["default"]=r.exports},c046:function(e,t,n){"use strict";n.r(t);var a=n("7021"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},c8b3:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.isShowLaterTime=function(){var e=uni.getStorageSync("later_time"),t=Date.now();if(!e)return!0;return t>e},t.setShowLaterTime=function(){var e=Date.now(),t=e+3e5;console.log("延迟5min"),uni.setStorageSync("later_time",t)}},daca:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"bg-white money-info text-center"},[n("v-uni-view",{staticClass:"money-black"}),n("v-uni-view",{staticClass:"money-title"},[e._v(" "+e._s(e.$t("pages.fee.cashier.订单金额")))]),n("v-uni-view",{staticClass:"money-value"},[e._v(e._s(e.money))])],1),n("v-uni-view",{staticClass:"padding-sm"},[n("v-uni-view",{staticClass:"block__title"},[e._v(" "+e._s(e.$t("pages.fee.cashier.使用积分")))]),n("v-uni-checkbox-group",{on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e._checkIntegral.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"cu-list menu"},[n("v-uni-view",{staticClass:"cu-item "},[n("v-uni-view",{staticClass:"content padding-tb-sm"},[n("v-uni-view",[n("v-uni-view",{staticClass:"text-cut",staticStyle:{width:"220px"}},[e.integral<=0?n("v-uni-checkbox",{attrs:{value:"Y",disabled:"true"}}):n("v-uni-checkbox",{attrs:{value:"Y"}})],1)],1)],1),n("v-uni-view",{staticClass:"action"},[n("v-uni-text",{staticClass:"text-grey text-sm"},[e._v(e._s(e.integral)+" "+e._s(e.$t("pages.fee.cashier.个积分")))])],1)],1)],1)],1),n("v-uni-view",{staticClass:"text-right",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e._viewGetIntegral()}}},[e._v(" "+e._s(e.$t("pages.fee.cashier.如何获取积分")))])],1),n("v-uni-view",{staticClass:"padding-sm"},[n("v-uni-view",{staticClass:"block__title"},[e._v(" "+e._s(e.$t("pages.fee.cashier.选择支付方式")))]),n("v-uni-view",{staticClass:"payment-methods"},[n("v-uni-view",{staticClass:"payment-options"},e._l(e.paymentOptions,(function(t){return n("v-uni-view",{key:t.value,staticClass:"payment-method",class:[{disabled:!t.enabled},{"payment-method--selected":e.payment_option===t.value}],on:{click:function(n){arguments[0]=n=e.$handleEvent(n),t.enabled&&e.selectPaymentMethod(t.value)}}},[n("v-uni-view",{staticClass:"payment-icon-wrapper",style:{backgroundColor:t.enabled?t.iconBg:"#E5E7EB"}},[n("v-uni-image",{staticClass:"payment-icon",style:{opacity:t.enabled?1:.5},attrs:{src:t.icon,mode:"aspectFit"}})],1),n("v-uni-view",{staticClass:"payment-label-wrapper"},[n("v-uni-view",{staticClass:"payment-main-label",style:{color:t.enabled?"#081B37":"#9CA3AF"}},[e._v(" "+e._s(t.label)+" ")]),n("v-uni-view",{staticClass:"payment-sub-label",style:{color:t.enabled?"#697386":"#D1D5DB"}},[e._v(" "+e._s(t.des)+" ")])],1),n("v-uni-view",{staticClass:"payment-action-wrapper",style:{opacity:t.enabled?1:.5}},[n("v-uni-view",{staticClass:"arrow-bg",style:{backgroundColor:t.enabled?"#F2F3F7":"#E5E7EB"}}),n("v-uni-view",{staticClass:"arrow-icon",style:{borderColor:t.enabled?"#535362":"#9CA3AF"}})],1)],1)})),1)],1)],1),e.showQRButton?n("v-uni-view",{staticClass:"cu-bar btn-group",staticStyle:{"margin-top":"30px"}},[n("v-uni-button",{staticClass:"cu-btn bg-green shadow-blur round lg",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleQr.apply(void 0,arguments)}}},[e._v(" "+e._s(e.$t("pages.fee.cashier.展示二维码"))+" ")])],1):e._e(),n("tips",{ref:"tipRef"}),e.showQrToast?n("v-uni-view",{staticClass:"qr-toast"},[n("v-uni-view",{staticClass:"qr-toast__content"},[n("v-uni-view",{staticClass:"qr-toast__tran-id"},[e._v("Tran Id:"+e._s(e.aba_train_id))]),n("v-uni-view",{staticClass:"qr-toast__close-icon",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.close_qr.apply(void 0,arguments)}}},[e._v("×")]),n("v-uni-image",{staticClass:"qr-toast__image",attrs:{src:e.qrImage,mode:"widthFix"}})],1)],1):e._e(),n("cashierAbaOptions",{attrs:{showPaymentOptions:e.showPaymentOptions,selectedAbaOption:e.selectedAbaOption},on:{"update:showPaymentOptions":function(t){arguments[0]=t=e.$handleEvent(t),e.handleShowPaymentOptions.apply(void 0,arguments)},"update:selectedAbaOption":function(t){arguments[0]=t=e.$handleEvent(t),e.handleSelectedAbaOption.apply(void 0,arguments)}}})],1)},i=[]},eb04:function(e,t,n){"use strict";n.r(t);var a=n("f89b"),i=n("8702");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("0dbe");var s=n("828b"),r=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"24d68814",null,!1,a["a"],void 0);t["default"]=r.exports},f89b:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[e.showPaymentOptions?n("v-uni-view",{staticClass:"payment-popup"},[n("v-uni-view",{staticClass:"popup-header"},[n("v-uni-view",{staticClass:"popup-title"},[e._v(e._s(e.$t("pages.fee.cashierAbaOptions.选择ABA支付方式")))]),n("v-uni-view",{staticClass:"popup-close",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.closePopup.apply(void 0,arguments)}}},[e._v("×")])],1),n("v-uni-view",{staticClass:"payment-options"},e._l(e.paymentOptions,(function(t){return n("v-uni-view",{key:t.value,staticClass:"payment-method",class:{disabled:!t.enabled},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),t.enabled&&e.selectPaymentOption(t)}}},[n("v-uni-view",{staticClass:"payment-icon-wrapper",style:{backgroundColor:t.enabled?t.iconBg:"#E5E7EB"}},[n("v-uni-image",{staticClass:"payment-icon",style:{opacity:t.enabled?1:.5},attrs:{src:t.icon,mode:"aspectFit"}})],1),n("v-uni-view",{staticClass:"payment-label-wrapper"},[n("v-uni-view",{staticClass:"payment-main-label",style:{color:t.enabled?"#081B37":"#9CA3AF"}},[e._v(" "+e._s(t.label)+" ")]),n("v-uni-view",{staticClass:"payment-sub-label",style:{color:t.enabled?"#697386":"#D1D5DB"}},[e._v(" "+e._s(t.des)+" ")])],1),n("v-uni-view",{staticClass:"payment-action-wrapper",style:{opacity:t.enabled?1:.5}},[n("v-uni-view",{staticClass:"arrow-bg",style:{backgroundColor:t.enabled?"#F2F3F7":"#E5E7EB"}}),n("v-uni-view",{staticClass:"arrow-icon",style:{borderColor:t.enabled?"#535362":"#9CA3AF"}})],1)],1)})),1),n("v-uni-view",{staticClass:"selected-result"},[e._v(" "+e._s(e.$t("pages.fee.cashierAbaOptions.当前选中"))+":"+e._s(e.getSelectedLabel())+" ")])],1):e._e()],1)},i=[]},fe7b:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("8f71"),n("bf0f"),n("aa77");var a={props:{showPaymentOptions:{type:Boolean,default:!1},selectedAbaOption:{type:String,default:"abapay_khqr"}},data:function(){return{paymentOptions:[{value:"abapay_khqr",label:"ABA KHQR",des:"Scan to pay with any banking app",icon:"/static/pay_images/aba_options/ABAKHQR.png",iconBg:"#005E7B",enabled:!0},{value:"alipay",label:"Alipay",des:"Scan to pay with Alipay",icon:"/static/pay_images/aba_options/Alipay.png",iconBg:"#00A0E9",enabled:!1},{value:"wechat",label:"Wechat",des:"Scan to pay with WeChat",icon:"/static/pay_images/aba_options/Wechat.png",iconBg:"#00C800",enabled:!1}]}},watch:{showPaymentOptions:function(e){e&&this.handleAutoSelect()}},methods:{handleAutoSelect:function(){var e=this,t=this.paymentOptions.filter((function(e){return e.enabled}));if(1===t.length){var n=t[0];setTimeout((function(){e.selectPaymentOption(n)}),100)}},selectPaymentOption:function(e){this.$emit("update:selectedAbaOption",e.value),this.$emit("update:showPaymentOptions",!1)},getSelectedLabel:function(){var e=this,t=this.paymentOptions.find((function(t){return t.value===e.selectedAbaOption}));return t?t.label:"无"},closePopup:function(){this.$emit("update:showPaymentOptions",!1)}}};t.default=a}}]); |