1 |
- import{c as a,s as e,v as s,o as t,e as r,f as l,w as c,ax as o,l as n,j as u,p as i,t as d,u as p,y as g,k as f,r as m,F as _,B as y,i as b,D as h,m as x,z as v,g as w,C as k}from"./index-9880b451.js";import{g as P,_ as j}from"./s-layout.dfc5b0b5.js";import{f as C}from"./useGoods.bdd1c2ea.js";import{_ as L}from"./_plugin-vue_export-helper.1b428a4d.js";import"./index.df38848e.js";const $=L({__name:"recharge",setup(L){y((a=>({"9f0d4548":p(G)})));const $=a((()=>e.$store("user").userWallet)),B=2*e.$platform.device.statusBarHeight,G=e.$url.css("/static/img/shop/user/withdraw_bg.png"),I=s({recharge_money:"",packageList:[]});async function T(){var a;const{code:s,data:t}=await o.createWalletRecharge({packageId:null==(a=I.packageList.find((a=>C(a.payPrice)===I.recharge_money)))?void 0:a.id,payPrice:100*I.recharge_money});0===s&&e.$router.go("/pages/pay/index",{id:t.payOrderId,orderType:"recharge"})}return t((()=>{!async function(){const{code:a,data:e}=await o.getWalletRechargePackageList();0===a&&(I.packageList=e)}()})),(a,s)=>{const t=b,o=h,y=n(x("uni-easyinput"),P),L=k,G=n(x("s-layout"),j);return r(),l(G,{title:"充值",class:"withdraw-wrap",navbar:"inner"},{default:c((()=>[u(t,{class:"wallet-num-box ss-flex ss-col-center ss-row-between",style:g([{marginTop:"-"+Number(B+88)+"rpx",paddingTop:Number(B+108)+"rpx"}])},{default:c((()=>[u(t,{class:""},{default:c((()=>[u(t,{class:"num-title"},{default:c((()=>[i("当前余额(元)")])),_:1}),u(t,{class:"wallet-num"},{default:c((()=>[i(d(p(C)(p($).balance)),1)])),_:1})])),_:1}),u(o,{class:"ss-reset-button log-btn",onClick:s[0]||(s[0]=a=>p(e).$router.go("/pages/pay/recharge-log"))},{default:c((()=>[i(" 充值记录 ")])),_:1})])),_:1},8,["style"]),u(t,{class:"recharge-box"},{default:c((()=>[u(t,{class:"recharge-card-box"},{default:c((()=>[u(t,{class:"input-label ss-m-b-50"},{default:c((()=>[i("充值金额")])),_:1}),u(t,{class:"input-box ss-flex border-bottom ss-p-b-20"},{default:c((()=>[u(t,{class:"unit"},{default:c((()=>[i("¥")])),_:1}),u(y,{modelValue:I.recharge_money,"onUpdate:modelValue":s[1]||(s[1]=a=>I.recharge_money=a),type:"digit",placeholder:"请输入充值金额",inputBorder:!1},null,8,["modelValue"])])),_:1}),u(t,{class:"face-value-box ss-flex ss-flex-wrap ss-m-y-40"},{default:c((()=>[(r(!0),f(_,null,m(I.packageList,(a=>(r(),l(o,{class:v(["ss-reset-button face-value-btn",[{"btn-active":I.recharge_money===p(C)(a.payPrice)}]]),key:a.money,onClick:e=>{return s=a.payPrice,void(I.recharge_money=C(s));var s}},{default:c((()=>[u(L,{class:"face-value-title"},{default:c((()=>[i(d(p(C)(a.payPrice)),1)])),_:2},1024),a.bonusPrice?(r(),l(t,{key:0,class:"face-value-tag"},{default:c((()=>[i(" 送 "+d(p(C)(a.bonusPrice))+" 元 ",1)])),_:2},1024)):w("",!0)])),_:2},1032,["class","onClick"])))),128))])),_:1}),u(o,{class:"ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main",onClick:T},{default:c((()=>[i(" 确认充值 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-c4254246"]]);export{$ as default};
|