chatapp-h5/h5/js/index-CN7d9oZS-1776148658686.js
2026-04-14 17:58:21 +08:00

5 lines
12 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{L as Z,W as ee,_ as te,k as se,I as oe,o as ie,c as y,l as f,q as o,b as e,t as i,m as u,ai as ae,aj as ne,ak as le,S as P,r as l,u as re,j as g,v as b,y as E,U as de,al as ce,K as pe,a9 as fe}from"./index-CIAVq8iD-1776148658686.js";import{_ as ye,b as ue,a as ge}from"./database-export-CGwyHyM--1776148658686.js";import{_ as m}from"./arrow-Cf0JWzXk-1776148658686.js";import{_ as me,a as ve}from"./database-dollar-DDq4bT-e-1776148658686.js";import{u as he}from"./pageConfig-BUpLPO7w-1776148658686.js";import{c as _e}from"./payeeStore-BUBSCe8t-1776148658686.js";import{h as N}from"./imageHandler-DstQGL3Z-1776148658686.js";import{u as we}from"./identity-TzakE_vG-1776148658686.js";import{a as C}from"./toast-aIWCznBB-1776148658686.js";import{b as be}from"./teamBill-BWXvrc1S-1776148658686.js";import{G as xe}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{m as ke}from"./MaskLayer-CMaJd7Gb-1776148658686.js";import{G as x}from"./GradientBorder-CfwSeIMB-1776148658686.js";const Ie=async()=>{try{return await Z("/team/team-own/profile")}catch(r){throw console.error("Failed to fetch get my agency:",r),console.error("error:"+r.response.errorMsg),r}},Ce=async r=>{try{return await ee("/team/user/apply",r)}catch(a){throw console.error("Failed to fetch leave agency:",a),console.error("error:"+a.response.errorMsg),a}},Te={class:"host-center"},je={style:{padding:"16px",position:"relative","z-index":"2"}},Se={style:{display:"flex","flex-direction":"column",gap:"2vw"}},Le={style:{display:"flex","align-items":"center"}},Me={style:{"font-size":"1.4em","font-weight":"600"}},ze={style:{padding:"16px",display:"flex","align-items":"center"}},Pe={class:"avatar"},Ee=["src","alt"],Ne={class:"user-info"},We={style:{margin:"0 0 4px 0","font-weight":"600",color:"#333","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},De={style:{margin:"0","font-size":"0.9em",color:"#666"}},Ae={style:{color:"#ff9500"}},Ue={style:{padding:"16px",display:"flex","flex-direction":"column","justify-content":"space-between",gap:"2vw"}},Be={style:{display:"flex","justify-content":"space-between"}},Ge={style:{"font-size":"1.1em","font-weight":"600"}},He={style:{"font-size":"1.2em","font-weight":"500"}},Oe={style:{padding:"16px",display:"flex","flex-direction":"column",gap:"3vw"}},Fe={style:{display:"flex","justify-content":"space-between"}},Re={style:{"font-size":"1.1em","font-weight":"600"}},Ve={style:{display:"flex","justify-content":"space-between"}},$e={class:"task-item"},qe={class:"task-label"},Je={class:"task-value"},Ke={class:"task-item"},Qe={class:"task-label"},Ye={class:"task-value"},Xe={class:"task-item"},Ze={class:"task-label"},et={class:"task-value"},tt={style:{padding:"16px",display:"flex","flex-direction":"column","justify-content":"space-between",gap:"4vw"}},st={style:{flex:"1","min-width":"0",display:"flex","align-items":"center",gap:"1vw"}},ot={style:{"font-size":"1em","font-weight":"600"}},it={style:{flex:"1","min-width":"0",display:"flex","align-items":"center",gap:"1vw"}},at={style:{"font-size":"1em","font-weight":"600"}},nt={style:{flex:"1","min-width":"0",display:"flex","align-items":"center",gap:"1vw"}},lt={style:{"font-size":"1em","font-weight":"600"}},rt={key:0,style:{"border-bottom":"1px solid #e6e6e6"}},dt={style:{flex:"1","min-width":"0",display:"flex","align-items":"center",gap:"1vw"}},ct={style:{"font-size":"1em","font-weight":"600"}},pt={style:{flex:"1","min-width":"0",display:"flex","align-items":"center",gap:"1vw"}},ft={style:{"font-size":"1em","font-weight":"600"}},yt={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"700","font-size":"1.2em"}},ut={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"600"}},gt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em"}},mt={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"700","font-size":"1.2em"}},vt={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"600"}},ht={style:{width:"80%",display:"flex","justify-content":"space-between","align-items":"center"}},_t={__name:"index",setup(r){const{t:a,locale:T}=se(),d=re(),W=we();T.value&&oe(T.value);const c=l({}),j=fe({value:!1}),D=l(0),S=l([]),k=l(null),L=l(null),A=P(()=>L.value==null||k.value==null),I=l(!1),v=l(!1),h=l(!1),U=P(()=>v.value||h.value),M=s=>{switch(p(),s){case"infoMissing":v.value=!0;break;case"leave":h.value=!0;break}},p=()=>{v.value=!1,h.value=!1},B=()=>{d.push("/history-salary")},G=()=>{d.push("/platform-policy?from=hostcenter")},H=()=>{d.push("/host-setting")},O=()=>{d.push("/exchange-gold-coins")},F=()=>{d.push("/transfer")},R=()=>{if(A.value){M("infoMissing");return}d.push("/cash-withdraw")},V=()=>{d.push("/host-setting")},$=async()=>{const s=await Ie();s.status&&s.body&&(c.value=s.body)},q=async()=>{try{j.value=!0;const s=de();if(!s){console.warn("No user ID available");return}const t=await be(s);if(t&&t.status&&t.body){const n=t.body;if(D.value=n.historySalary,n.targets&&n.targets.length>0){const w=n.targets[0],wt=z=>({SETTLED:"Completed",UNPAID:"In Progress",HANG_UP:"Out of account",PAY_OUT:"Completed"})[z]||z,bt=w.target?.settlementResult?.level||w.target?.level||"",xt=await ce()}else console.warn("No targets data available")}else console.warn("No member work data available")}catch(s){console.error("Failed to fetch member work data:",s)}finally{j.value=!1}},J=async()=>{try{const s=await ae();if(console.log("银行卡列表:",s),s.status&&s.body){S.value=s.body;const t=S.value.find(n=>n.use);t?k.value=t:k.value=null}}catch(s){console.error("获取银行卡列表失败:",s)}},K=async()=>{try{const s=await ne();if(console.log("提现信息列表:",s),s.status&&s.body?.length>0){let n=JSON.parse(s.body[0].passportFrontUrl).map(w=>w);L.value={previewUrls:n,...s.body[0]}}}catch(s){console.error("获取提现信息列表失败:",s),C(s.response?.errorMsg)}},Q=async()=>{try{const s=await le();s.status&&(I.value=s.body)}catch(s){console.error("获取提现信息列表失败:",s),C(s.response?.errorMsg)}},Y=async()=>{console.log("确定离开");try{await Ce({reason:"QUIT",teamId:pe()})}catch(s){C(s.errorMsg)}finally{p()}},{salaryInfo:X,taskInfo:_}=he("HOST_CENTER",{needsTeamInfo:!0,forceRefresh:!0,onDataLoaded:()=>{q()}});return ie(()=>{W.setIdentity("HOST"),$(),_e(),J(),K(),Q()}),(s,t)=>(g(),y("div",Te,[f(xe,{showLanguageList:!0,isHomePage:!0,title:o(a)("host_center"),color:"black",style:{}},null,8,["title"]),e("div",je,[e("div",Se,[e("div",Le,[e("div",Me,i(o(a)("my_agency")),1)]),f(x,{radius:"20px",style:{margin:"0 1%","margin-bottom":"12px"}},{default:u(()=>[e("div",ze,[e("div",Pe,[e("img",{src:c.value.userAvatar||"",alt:c.value.name,style:{width:"100%",height:"100%","object-fit":"cover","border-radius":"25px"},onError:t[0]||(t[0]=(...n)=>o(N)&&o(N)(...n))},null,40,Ee)]),e("div",Ne,[e("div",We,i(c.value.userNickname||c.value.name),1),e("div",De,i(o(a)("user_id_prefix"))+" "+i(c.value?.ownSpecialId?.account||c.value.account),1)]),e("button",{style:{"min-width":"0","border-radius":"16px",border:"1px solid #ff9500",background:"none",padding:"4px 12px",display:"flex","justify-content":"center","align-items":"center"},onClick:t[1]||(t[1]=n=>M("leave"))},[e("div",Ae,i(o(a)("leave")),1)])])]),_:1})]),f(x,{radius:"20px",style:{margin:"0 1%","margin-bottom":"12px"}},{default:u(()=>[e("div",Ue,[e("div",Be,[e("div",Ge,i(o(a)("my_available_salary")),1),e("button",{style:{"font-weight":"500",color:"rgba(0, 0, 0, 0.4)",border:"0","background-color":"transparent",cursor:"pointer"},onClick:B},i(o(a)("my_salary_details")),1)]),e("div",He,"$"+i(o(X).currentSalary),1)])]),_:1}),f(x,{radius:"20px",style:{margin:"0 1%","margin-bottom":"12px"}},{default:u(()=>[e("div",Oe,[e("div",Fe,[e("div",Re,i(o(a)("todays_task")),1)]),e("div",Ve,[e("div",$e,[e("div",qe,i(o(a)("anchor_type")),1),e("div",Je,i(o(_).anchorType),1)]),e("div",Ke,[e("div",Qe,i(o(a)("minutes")),1),e("div",Ye,i(o(_).minutesProgress)+"/"+i(o(_).minutesTotal),1)]),e("div",Xe,[e("div",Ze,i(o(a)("gift_task")),1),e("div",et,i(o(_).giftTask),1)])])])]),_:1}),f(x,{radius:"20px",style:{margin:"0 1%","margin-bottom":"12px"}},{default:u(()=>[e("div",tt,[e("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:G},[e("div",st,[t[4]||(t[4]=e("img",{src:ye,alt:"",style:{display:"block",width:"1.6em"}},null,-1)),e("div",ot,i(o(a)("platform_policy")),1)]),t[5]||(t[5]=e("img",{src:m,alt:"",style:{display:"block",width:"1.5em"},class:"flipImg"},null,-1))]),t[14]||(t[14]=e("div",{style:{"border-bottom":"1px solid #e6e6e6"}},null,-1)),e("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:O},[e("div",it,[t[6]||(t[6]=e("img",{src:me,alt:"",style:{display:"block",width:"1.6em"}},null,-1)),e("div",at,i(o(a)("exchange_coins")),1)]),t[7]||(t[7]=e("img",{src:m,alt:"",style:{display:"block",width:"1.5em"},class:"flipImg"},null,-1))]),t[15]||(t[15]=e("div",{style:{"border-bottom":"1px solid #e6e6e6"}},null,-1)),e("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:F},[e("div",nt,[t[8]||(t[8]=e("img",{src:ue,alt:"",style:{display:"block",width:"1.6em"}},null,-1)),e("div",lt,i(o(a)("transfer")),1)]),t[9]||(t[9]=e("img",{src:m,alt:"",style:{display:"block",width:"1.5em"},class:"flipImg"},null,-1))]),I.value?(g(),y("div",rt)):b("",!0),I.value?(g(),y("div",{key:1,style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:R},[e("div",dt,[t[10]||(t[10]=e("img",{src:ve,alt:"",style:{display:"block",width:"1.6em"}},null,-1)),e("div",ct,i(o(a)("cash_withdraw")),1)]),t[11]||(t[11]=e("img",{src:m,alt:"",style:{display:"block",width:"1.5em"},class:"flipImg"},null,-1))])):b("",!0),t[16]||(t[16]=e("div",{style:{"border-bottom":"1px solid #e6e6e6"}},null,-1)),e("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:H},[e("div",pt,[t[12]||(t[12]=e("img",{src:ge,alt:"",style:{display:"block",width:"1.6em"}},null,-1)),e("div",ft,i(o(a)("bank_accounts")),1)]),t[13]||(t[13]=e("img",{src:m,alt:"",style:{display:"block",width:"1.5em"},class:"flipImg"},null,-1))])])]),_:1})]),f(ke,{maskLayerShow:U.value,onClick:p},{default:u(()=>[v.value?(g(),y("div",{key:0,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:p},[e("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"2vw"},onClick:t[2]||(t[2]=E(()=>{},["stop"]))},[e("div",yt,i(o(a)("prompt")),1),e("div",ut,i(o(a)("fill_info_tips")),1),e("div",gt,i(o(a)("card_issue_tips")),1),e("div",{style:{display:"flex","justify-content":"center","align-items":"center","border-radius":"999999px",background:"linear-gradient(269deg, #feb219 7.04%, #ff9326 96.78%)","box-shadow":`-1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
-3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset,
1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset`,color:"#fff","font-weight":"800",padding:"8px 12px",width:"50%"},onClick:V},i(o(a)("to_improve")),1)])])):b("",!0),h.value?(g(),y("div",{key:1,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:p},[e("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"2vw"},onClick:t[3]||(t[3]=E(()=>{},["stop"]))},[e("div",mt,i(o(a)("tips")),1),e("div",vt,i(o(a)("leave_agent_tips")),1),e("div",ht,[e("div",{style:{display:"flex","justify-content":"center","align-items":"center",background:"#fff","border-radius":"70px",border:"1px solid #ffb805",color:"#ff9500","font-weight":"800",padding:"8px 12px",width:"45%"},onClick:p},i(o(a)("cancel")),1),e("div",{style:{display:"flex","justify-content":"center","align-items":"center","border-radius":"70px",background:"linear-gradient(269deg, #feb219 7.04%, #ff9326 96.78%)",color:"#fff","font-weight":"800",padding:"8px 12px",width:"45%"},onClick:Y},i(o(a)("confirm")),1)])])])):b("",!0)]),_:1},8,["maskLayerShow"])]))}},At=te(_t,[["__scopeId","data-v-27839b2a"]]);export{At as default};