liujie
2026-08-21 a7c8a8f6055e1a03414f2227d12ff2e87ec52d41
1
"use strict";const t=require("../../common/vendor.js"),a={components:{GuideNavBar:()=>"../../components/guide-nav-bar/guide-nav-bar.js"},data:()=>({loading:!1,availableAmount:0,records:[],total:0,isLeaving:!1}),computed:{availableText(){return this.formatMoney(this.availableAmount)}},onShow(){this.loadData()},methods:{goBack(){this.isLeaving||(this.isLeaving=!0,setTimeout(()=>{t.backOrHome("/pages/earnings/index")},280))},startWithdrawal(){t.getOnboardingStatus().then(a=>{const e=a&&a.status||"unsubmitted";"approved"!==e?"pending"!==e&&"rejected"!==e?t.routeTo("/pages/onboarding/index"):t.routeTo("/pages/onboarding-pending/index"):t.routeTo("/pages/withdrawal-detail/index")}).catch(a=>{t.index.showToast({title:a&&a.message||"进件状态查询失败",icon:"none"})})},loadData(){this.loading=!0,Promise.all([t.getWithdrawalSummary(),t.getWithdrawals()]).then(([t,a])=>{this.availableAmount=Number(t&&t.availableAmount||0),this.records=a&&a.records||[],this.total=Number(a&&a.total||0)}).catch(a=>{t.index.showToast({title:a.message||"提现记录加载失败",icon:"none"})}).finally(()=>{this.loading=!1})},formatMoney:(t=0)=>Number(t||0).toFixed(2),formatTime:t=>t?String(t).replace("T"," ").slice(0,19):"",displayTime(t){return"APPROVED"===t.status&&t.processedAt?"到账 "+this.formatTime(t.processedAt):this.formatTime(t.appliedAt)},statusText:t=>"APPROVED"===t?"已到账":"REJECTED"===t?"已驳回":"PROCESSING"===t?"到账处理中":"待审核",statusClass:t=>"APPROVED"===t?"paid":"REJECTED"===t?"rejected":"pending"}};if(!Array){t.resolveComponent("guide-nav-bar")()}Math;const e=t._export_sfc(a,[["render",function(a,e,s,o,i,n){return t.e({a:t.o(n.goBack,"c5"),b:t.p({title:"导游提现"}),c:t.t(n.availableText),d:t.o((...t)=>n.startWithdrawal&&n.startWithdrawal(...t),"1e"),e:t.t(i.total),f:i.loading},(i.loading||i.records.length,{}),{g:!i.records.length,h:t.f(i.records,(a,e,s)=>t.e({a:t.t(n.formatMoney(a.amount)),b:t.t(n.displayTime(a)),c:t.t(a.cardMasked||""),d:t.t(n.statusText(a.status)),e:t.n("status "+n.statusClass(a.status)),f:a.reason},a.reason?{g:t.t(a.reason)}:{},{h:a.id})),i:i.isLeaving?1:""})}],["__scopeId","data-v-88232326"]]);wx.createPage(e);