| 1 |
- var z=(k,f,i)=>new Promise((x,p)=>{var $=c=>{try{w(i.next(c))}catch(_){p(_)}},m=c=>{try{w(i.throw(c))}catch(_){p(_)}},w=c=>c.done?x(c.value):Promise.resolve(c.value).then($,m);w((i=i.apply(k,f)).next())});import{d as M,r as g,v as Q,f as V,g as t,a3 as S,z as Z,R as T,B as y,_ as q,D as b,Y as G,o as j,h as e,E,F as n,j as H,L as r,M as o,Q as C,K as D,P as K,G as J,H as X,I as ee,a4 as te,aZ as ae,q as le}from"./index-BvrJT4vV.js";import{_ as oe,a as se}from"./wd-radio-group.D6obaD68.js";import{_ as ne}from"./wd-text.AZJSz_b6.js";import{_ as re}from"./z-paging.0LfmZNmx.js";import{u as ue}from"./useZPaging.DPl6Aqd5.js";import{a as de,u as ce,b as ie}from"./wallet.BD-uL1iI.js";import{D as pe}from"./DialogBox.DhzDYVjp.js";import{D as fe}from"./utils.CY6F74uO.js";const me=M({__name:"myWallet",setup(k){const f=g(null);ue(f);const i=g({}),x=g(1),p=g({});function $(){return z(this,null,function*(){const a=yield de();p.value=a==null?void 0:a.data})}const m=g([]);function w(a,u){return z(this,null,function*(){const l={page:a,size:u,type:x.value};try{const d=yield ie(l);f.value.complete(d.data.list)}catch(d){f.value.complete(!1)}})}function c(){Object.assign(i.value,fe.info(T("wallet.unpaidOrderDialog.title"),{showCancel:!0,confirmText:T("wallet.unpaidOrderDialog.confirm"),cancelText:T("wallet.unpaidOrderDialog.cancel")}))}function _(){i.value.show=!1}function L(){_(),D({url:"/pages/wallet/rechargeRecord"})}function A(){return z(this,null,function*(){try{const a=yield ce();a.code==="200"&&a.data&&c()}catch(a){}})}const B=g([]);function I(){return z(this,null,function*(){const a=yield S({id:1});B.value=a.data})}return Q(()=>{I(),$(),A(),f.value.reload()}),(a,u)=>{const l=H,d=K,h=y(b("wd-icon"),q),N=y(b("wd-button"),G),v=y(b("wd-radio"),oe),R=y(b("wd-radio-group"),se),U=y(b("wd-text"),ne),W=y(b("z-paging"),re),F=Z("layout-default-uni");return j(),V(F,null,{default:t(()=>[e(W,{ref_key:"paging",ref:f,modelValue:n(m),"onUpdate:modelValue":u[5]||(u[5]=s=>E(m)?m.value=s:null),"use-page-scroll":"",onOnRefresh:$,onQuery:w},{default:t(()=>[e(l,{class:"px-24rpx pt-20rpx"},{default:t(()=>[e(l,{class:"mb-20rpx flex items-center justify-around rounded-12rpx bg-[rgba(var(--wot-color-theme-rgb),0.1)] px-16rpx py-22rpx"},{default:t(()=>[e(l,{class:"text-center"},{default:t(()=>[e(l,{class:"text-22rpx text-#595959"},{default:t(()=>[r(o(a.$t("wallet.balance")),1)]),_:1}),e(l,{class:"mb-22rpx text-44rpx text-[var(--wot-color-theme)] font-bold"},{default:t(()=>[r(o(n(C)(n(p).balance)),1)]),_:1}),e(l,{class:"flex items-center justify-between gap-4"},{default:t(()=>[e(l,{onClick:u[0]||(u[0]=s=>n(D)({url:"/pages/wallet/frozenRecord"}))},{default:t(()=>[e(l,{class:"flex items-center text-22rpx text-#595959"},{default:t(()=>[e(d,{class:"mr-1"},{default:t(()=>[r(o(a.$t("wallet.frozenBalance")),1)]),_:1}),e(h,{name:"help-circle",size:"20rpx"})]),_:1}),e(l,{class:"flex items-center justify-center text-26rpx font-bold"},{default:t(()=>[e(d,{class:"mr-1"},{default:t(()=>[r(o(n(C)(n(p).freezeAmount)),1)]),_:1}),e(h,{name:"arrow-right",size:"20rpx"})]),_:1})]),_:1}),e(l,null,{default:t(()=>[e(l,{class:"flex items-center text-22rpx text-#595959"},{default:t(()=>[e(d,null,{default:t(()=>[r(o(a.$t("wallet.availableAmount")),1)]),_:1})]),_:1}),e(l,{class:"text-26rpx font-bold"},{default:t(()=>[r(o(n(C)(n(p).availableAmount)),1)]),_:1})]),_:1})]),_:1})]),_:1}),e(l,{class:"flex flex-col items-end"},{default:t(()=>[e(N,{size:"small",onClick:u[1]||(u[1]=s=>n(D)({url:"/pages/wallet/recharge"}))},{default:t(()=>[r(o(a.$t("wallet.recharge")),1)]),_:1})]),_:1})]),_:1}),e(l,{class:"mb-20rpx flex justify-center"},{default:t(()=>[e(l,{class:"flex items-center justify-center",onClick:u[2]||(u[2]=s=>n(D)({url:"/pages/wallet/withdraw",params:{balance:n(p).availableAmount,type:1}}))},{default:t(()=>[e(d,{class:"mr-8rpx"},{default:t(()=>[r(o(a.$t("wallet.withdrawNow")),1)]),_:1}),e(h,{name:"arrow-right",size:"28rpx"})]),_:1})]),_:1}),e(l,null,{default:t(()=>[e(l,{class:"mb-20rpx text-32rpx"},{default:t(()=>[r(o(a.$t("wallet.record")),1)]),_:1}),e(l,{class:"mb-20rpx"},{default:t(()=>[e(R,{modelValue:n(x),"onUpdate:modelValue":u[3]||(u[3]=s=>E(x)?x.value=s:null),shape:"button",onChange:u[4]||(u[4]=()=>w(1,20))},{default:t(()=>[e(v,{value:1},{default:t(()=>[r(o(a.$t("wallet.record.type.DT")),1)]),_:1}),e(v,{value:2},{default:t(()=>[r(o(a.$t("wallet.record.type.YT")),1)]),_:1}),e(v,{value:3},{default:t(()=>[r(o(a.$t("wallet.record.type.L7D")),1)]),_:1}),e(v,{value:4},{default:t(()=>[r(o(a.$t("wallet.record.type.MTD")),1)]),_:1}),e(v,{value:5},{default:t(()=>[r(o(a.$t("wallet.record.type.YTD")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(l,{class:"rounded-16rpx bg-white px-20rpx"},{default:t(()=>[(j(!0),J(X,null,ee(n(m),(s,P)=>(j(),V(l,{key:s.id,class:te(["py-20rpx",{"border-b-1 border-b-solid border-b-#e8e8e8":P!==n(m).length-1}])},{default:t(()=>[e(l,{class:"mb-8rpx flex items-center justify-between text-24rpx"},{default:t(()=>[e(d,{class:"truncate"},{default:t(()=>[r(o(a.$t("myOrders.order.id"))+":"+o(s.bizNo),1)]),_:2},1024),e(d,{class:"flex-shrink-0 pl-16rpx"},{default:t(()=>[r(o(s.type===1?"-":"+")+"৳"+o(n(C)(s.amount)),1)]),_:2},1024)]),_:2},1024),e(l,{class:"flex items-center justify-between text-22rpx"},{default:t(()=>{var O;return[e(d,{class:"text-#5B5B5B"},{default:t(()=>[r(o(s.createTime),1)]),_:2},1024),e(U,{type:s.bizType===8001||s.bizType===9001?"primary":"success",text:s.bizType===8001||s.bizType===9001?(O=n(B).find(Y=>Y.code===s.bizType))==null?void 0:O.name:"Completed"},null,8,["type","text"])]}),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1})]),_:1}),e(pe,ae(n(i),{onConfirm:L,onCancel:_,onClose:_}),null,16)]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),Ce=le(me,[["__scopeId","data-v-6e157ff7"]]);export{Ce as default};
|