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

2 lines
3.4 KiB
JavaScript

import{_ as w,k as b,r as d,I as k,o as B,c as r,l as y,q as s,b as e,F,x as P,t as o,J as S,K as $,L as G,j as n,G as I,m as p,v as u}from"./index-CIAVq8iD-1776148658686.js";import{G as N}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{i as T}from"./itemCenter-DveKthYv-1776148658686.js";import{G as L}from"./GradientBorder-CfwSeIMB-1776148658686.js";const U={class:"platform-policy"},j={class:"content"},q={key:0,style:{display:"flex","flex-direction":"column",gap:"16px"}},C={style:{padding:"16px 20vw 16px 16px",display:"flex","flex-direction":"column","justify-content":"space-between",gap:"5px",position:"relative"}},D={style:{color:"#fff","font-weight":"400","font-size":"1.5em"}},R={style:{display:"grid","grid-template-columns":"repeat(3, 1fr)",gap:"5px"}},V={style:{width:"max-content",display:"flex","flex-direction":"column","align-items":"center",gap:"5px"}},K={style:{"font-weight":"600"}},M={style:{"font-weight":"500"}},z={style:{display:"flex","flex-direction":"column","align-items":"center",gap:"5px"}},E={style:{"font-weight":"600"}},H={style:{"font-weight":"500"}},J={style:{display:"flex","justify-content":"flex-end"}},A={style:{width:"max-content",display:"flex","flex-direction":"column","align-items":"center",gap:"5px"}},O={style:{"font-weight":"600"}},Q={style:{"font-weight":"500"}},W={key:0,style:{width:"max-content",display:"flex","flex-direction":"column","align-items":"center",gap:"5px"}},X={style:{"font-weight":"600"}},Y={style:{"font-weight":"500"}},Z={key:1,style:{display:"flex","flex-direction":"column","align-items":"center",gap:"5px"}},ee={style:{"font-weight":"600"}},te={style:{"font-weight":"500"}},oe={key:1,class:"empty-state"},se={__name:"PlatformPolicy",setup(ie){const{t:i,locale:_}=b(),v=S(),f=d(v.query.from=="agencycenter"),g=new URL("/assets/levelBg--Rsqxs_B-1776148661447.png",import.meta.url).href;_.value&&k(_.value);const m=d(!1),c=d([]),h=async()=>{try{m.value=!0;const l=$(),t=await G(`/team/release/policy?id=${l}`);t.status&&t.body&&t.body.policy?c.value=t.body.policy||[]:c.value=[]}catch(l){console.error("Failed to fetch team policy:",l),c.value=[]}finally{m.value=!1}},x=l=>{if(!l)return"0";const t=parseFloat(l);return isNaN(t)?l:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()};return B(()=>{h()}),(l,t)=>(n(),r("div",U,[y(N,{title:s(i)("platform_policy"),color:"black"},null,8,["title"]),e("div",j,[c.value.length>0?(n(),r("div",q,[(n(!0),r(F,null,P(c.value,a=>(n(),I(L,{style:{"margin-bottom":"12px"},key:a.level},{default:p(()=>[e("div",C,[y(T,{style:{width:"11vw",position:"absolute",right:"2vw",top:"-1vw"},imgUrl:s(g),contentStyle:""},{default:p(()=>[e("div",D," Lv."+o(a.level),1)]),_:2},1032,["imgUrl"]),e("div",R,[e("div",V,[e("div",K,o(s(i)("time"))+" ("+o(s(i)("hours"))+")",1),e("div",M,o(a.onlineTime||0),1)]),e("div",z,[e("div",E,o(s(i)("target")),1),e("div",H,o(x(a.target)),1)]),e("div",J,[e("div",A,[e("div",O,o(s(i)("host_salary")),1),e("div",Q,"$"+o(a.memberSalary||0),1)])]),f.value?(n(),r("div",W,[e("div",X,o(s(i)("agent_salary")),1),e("div",Y,"$"+o(a.ownSalary||0),1)])):u("",!0),f.value?(n(),r("div",Z,[e("div",ee,o(s(i)("total_salary")),1),e("div",te,"$"+o(a.totalSalary||0),1)])):u("",!0)])])]),_:2},1024))),128))])):(n(),r("div",oe,[t[0]||(t[0]=e("div",{class:"empty-icon"},"📋",-1)),e("p",null,o(s(i)("no_policy_data_available")),1)]))])]))}},ce=w(se,[["__scopeId","data-v-a973ab5f"]]);export{ce as default};