1 |
- import{c as a,s as e,z as s,o as t,f as r,g as l,w as c,a1 as o,m as n,k as u,u as i,v as d,x as p,B as f,l as g,r as m,F as _,H as y,j as b,J as h,n as v,E as x,i as w,I as k}from"./index-ba48620e.js";import{a as P}from"./phone-international-input.dd3ca29e.js";import{_ as j}from"./s-layout.04b95866.js";import{f as L}from"./useGoods.edb8879f.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";const B=$({__name:"recharge",setup($){y((a=>({"9f0d4548":p(I)})));const B=a((()=>e.$store("user").userWallet)),C=2*e.$platform.device.statusBarHeight,I=e.$url.css("/static/img/shop/user/withdraw_bg.png"),G=s({recharge_money:"",packageList:[]});async function T(){var a;const{code:s,data:t}=await o.createWalletRecharge({packageId:null==(a=G.packageList.find((a=>L(a.payPrice)===G.recharge_money)))?void 0:a.id,payPrice:100*G.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&&(G.packageList=e)}()})),(a,s)=>{const t=b,o=h,y=n(v("uni-easyinput"),P),$=k,I=n(v("s-layout"),j);return r(),l(I,{title:"充值",class:"withdraw-wrap",navbar:"inner"},{default:c((()=>[u(t,{class:"wallet-num-box ss-flex ss-col-center ss-row-between",style:f([{marginTop:"-"+Number(C+88)+"rpx",paddingTop:Number(C+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(L)(B.value.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:G.recharge_money,"onUpdate:modelValue":s[1]||(s[1]=a=>G.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),g(_,null,m(G.packageList,(a=>(r(),l(o,{class:x(["ss-reset-button face-value-btn",[{"btn-active":G.recharge_money===p(L)(a.payPrice)}]]),key:a.money,onClick:e=>{return s=a.payPrice,void(G.recharge_money=L(s));var s}},{default:c((()=>[u($,{class:"face-value-title"},{default:c((()=>[i(d(p(L)(a.payPrice)),1)])),_:2},1024),a.bonusPrice?(r(),l(t,{key:0,class:"face-value-tag"},{default:c((()=>[i(" 送 "+d(p(L)(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{B as default};
|