| 1 |
- var ge=Object.defineProperty,ve=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var pe=(g,u,r)=>u in g?ge(g,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):g[u]=r,H=(g,u)=>{for(var r in u||(u={}))xe.call(u,r)&&pe(g,r,u[r]);if(ce)for(var r of ce(u))$e.call(u,r)&&pe(g,r,u[r]);return g},D=(g,u)=>ve(g,ye(u));var le=(g,u,r)=>new Promise((t,v)=>{var a=S=>{try{d(r.next(S))}catch(o){v(o)}},y=S=>{try{d(r.throw(S))}catch(o){v(o)}},d=S=>S.done?t(S.value):Promise.resolve(S.value).then(a,y);d((r=r.apply(g,u)).next())});import{_ as ke}from"./wd-img.CoBmSmPl.js";import{b as de,a as ae,c as R,d as Y,r as z,e as L,a6 as q,w as Se,f as h,o as f,g as l,h as i,J as O,j as X,n as P,a4 as N,L as $,M as k,_ as re,an as b,ak as fe,au as Ce,bm as be,q as Z,m as he,aq as we,ac as oe,aa as Le,ag as Pe,ao as I,ap as se,G as J,H as K,I as te,F as p,bv as Ne,k as ie,P as ue,a5 as Ve,t as Be,aM as Re,ba as Fe,af as Me,S as Ae,V as He,u as Ie,z as De,aF as Ee,ax as je,R as G,B as Q,D as W,Q as ee,l as Te}from"./index-q8TQmcfk.js";import{_ as Ue}from"./wd-divider.DhJJKBDM.js";import{j as Oe}from"./mine.DTvIVsqH.js";const Ge=D(H({},de),{percentage:ae(0),hideText:R(!1),color:{type:[String,Array]},duration:ae(30),status:String}),qe={name:"wd-progress",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"}},ze=Y(D(H({},qe),{props:Ge,setup(g){const u=g,r=z(""),t=z(0),v=z(0);let a=null;const y=L(()=>q({background:r.value,width:`${t.value}%`,"transition-duration":`${v.value*u.duration*.001}s`})),d=L(()=>u.status?`is-${u.status}`:""),S=L(()=>{let s="";switch(u.status){case"danger":s="close-outline";break;case"success":s="check-outline";break;case"warning":s="warn-bold";break}return s});Se(()=>[u.percentage,u.color,u.duration],()=>{u.percentage,B()},{immediate:!0});function o(s){}function M(s,c){return s.some((e,n)=>{if(t.value<e.percentage&&e.percentage<=c)return w(e.percentage,e.color),!0;n===s.length-1&&w(c,e.color)})}function E(s,c){return s.some(e=>{if(c<=e.percentage)return w(c,e.color),!0})}function B(){return le(this,null,function*(){const{percentage:s,color:c}=u;if(!b(c)||fe(c)&&c.length===0){v.value=Math.abs(s-t.value),yield Ce(),t.value=s;return}if(t.value===s)return;const e=fe(c)?c:[c];_(e);const n=V(e);t.value>s?E(n,s):M(n,s)})}function F(s){return s.every(c=>be(c)&&Object.prototype.hasOwnProperty.call(c,"color")&&Object.prototype.hasOwnProperty.call(c,"percentage"))}function A(s){return s.every(c=>typeof c=="string")}function _(s){const c=A(s),e=F(s);if(!c&&!e)throw Error("Color must be String or Object with color and percentage");if(e&&s.some(({percentage:n})=>Number.isNaN(n)))throw Error("All the percentage must can be formatted to Number")}function V(s){const c=100/s.length;return F(s)?s.sort((e,n)=>e.percentage-n.percentage):s.map((e,n)=>({color:e,percentage:(n+1)*c}))}function w(s,c){if(a)return;const{duration:e}=u;v.value=Math.abs(s-t.value),setTimeout(()=>{t.value=s,r.value=c,a=setTimeout(()=>{a&&clearTimeout(a),a=null,B()},v.value*e)},50)}return(s,c)=>{const e=X;return f(),h(e,{class:N(`wd-progress ${s.customClass}`),style:P(s.customStyle)},{default:l(()=>[i(e,{class:"wd-progress__outer"},{default:l(()=>[i(e,{class:N(`wd-progress__inner ${d.value}`),style:P(y.value)},null,8,["class","style"])]),_:1}),s.hideText?s.status?(f(),h(re,{key:1,"custom-class":`wd-progress__label wd-progress__icon ${d.value}`,name:S.value,color:typeof s.color=="string"?s.color:""},null,8,["custom-class","name","color"])):O("",!0):(f(),h(e,{key:0,class:"wd-progress__label"},{default:l(()=>[$(k(s.percentage)+"%",1)]),_:1}))]),_:1},8,["class","style"])}}})),Je=Z(ze,[["__scopeId","data-v-fc07731c"]]),Ke={prop:oe(String),label:oe(String),width:we(100),sortable:R(!1),fixed:R(!1),align:he("left")},Qe=D(H({},de),{data:oe(Array),border:R(!0),stripe:R(!0),height:Le,rowHeight:we(50),showHeader:R(!0),ellipsis:R(!0),index:{type:[Object,Boolean],default:!1},fixedHeader:R(!0)}),me=Symbol("wd-table"),We={name:"wd-table-col",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"}},Ye=Y(D(H({},We),{props:Ke,setup(g,{expose:u}){const r=g,{parent:t,index:v}=Pe(me),a=z(0),y=L(()=>b(t)?t.props.stripe:!1),d=L(()=>b(t)?t.props.border:!1),S=L(()=>b(t)?t.props.ellipsis:!1),o=L(()=>{let _=!1;return r.fixed&&b(t)&&(_=t.getIsLastFixed(r)),_}),M=L(()=>{let _={};return b(r.width)&&(_.width=I(r.width)),r.fixed&&b(t)&&se(t.getFixedStyle)&&(_=t.getFixedStyle(v.value,_)),_}),E=L(()=>{let _={};const V=b(t)&&b(t.props)?t.props.rowHeight:50;return b(V)&&(_.height=I(V)),r.fixed&&b(t)&&se(t.getFixedStyle)&&(_=t.getFixedStyle(v.value,_)),q(_)}),B=L(()=>!b(t)||!b(t.props)||!b(t.props.data)||!Array.isArray(t.props.data)?[]:t.props.data.map(V=>V[r.prop]));function F(_){b(t)&&se(t.rowClick)&&t.rowClick(_)}function A(_){return!b(t)||!b(t.props)||!b(t.props.data)||!Array.isArray(t.props.data)?{}:t.props.data[_]||{}}return u({sortDirection:a}),(_,V)=>{const w=ue,s=X;return f(),h(s,{class:N(`wd-table-col ${_.fixed?"wd-table-col--fixed":""} ${o.value&&p(b)(p(t))&&p(t).state.scrollLeft?"is-shadow":""}`),style:P(M.value)},{default:l(()=>[(f(!0),J(K,null,te(B.value,(c,e)=>(f(),h(s,{class:N(`wd-table__cell ${y.value&&p(Ne)(e)?"is-stripe":""} ${d.value?"is-border":""} is-${_.align}`),key:e,style:P(E.value),onClick:n=>F(e)},{default:l(()=>[_.$slots.value?ie(_.$slots,"value",{key:0,row:A(e),index:e},void 0,!0):(f(),h(w,{key:1,class:N(`wd-table__value ${S.value?"is-ellipsis":""}`)},{default:l(()=>[$(k(c),1)]),_:2},1032,["class"]))]),_:2},1032,["class","style","onClick"]))),128))]),_:3},8,["class","style"])}}})),ne=Z(Ye,[["__scopeId","data-v-8a0ed096"]]),Xe=D(H({},de),{modelValue:ae(0),title:he(""),allowReset:R(!1),descFirst:R(!1),line:R(!0)}),Ze={name:"wd-sort-button",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"}},et=Y(D(H({},Ze),{props:Xe,emits:["change","update:modelValue"],setup(g,{emit:u}){const r=g,t=u;function v(){let{modelValue:a,allowReset:y,descFirst:d}=r;d?a===0?a=-1:a===-1?a=1:a===1&&(y?a=0:a=-1):a===0?a=1:a===1?a=-1:a===-1&&(y?a=0:a=1),t("update:modelValue",a),t("change",{value:a})}return(a,y)=>{const d=X;return f(),h(d,{class:N(`wd-sort-button ${a.line?"wd-sort-button--line":""} ${a.customClass}`),style:P(a.customStyle),onClick:v},{default:l(()=>[i(d,{class:"wd-sort-button__wrapper"},{default:l(()=>[i(d,{class:N(`wd-sort-button__left ${a.modelValue!==0?"is-active":""}`)},{default:l(()=>[$(k(a.title),1)]),_:1},8,["class"]),i(d,{class:N(`wd-sort-button__right ${a.modelValue!==0?"is-active":""}`)},{default:l(()=>[a.modelValue!==1?(f(),h(re,{key:0,name:"arrow-up","custom-class":"wd-sort-button__icon-up"})):O("",!0),a.modelValue!==-1?(f(),h(re,{key:1,name:"arrow-down","custom-class":"wd-sort-button__icon-down"})):O("",!0)]),_:1},8,["class"])]),_:1})]),_:1},8,["class","style"])}}})),_e=Z(et,[["__scopeId","data-v-7c32d28f"]]),tt={name:"wd-table",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"}},lt=Y(D(H({},tt),{props:Qe,emits:["sort-method","row-click"],setup(g,{emit:u}){const{translate:r}=Ve("tableCol"),t=g,v=u,a=Be({scrollLeft:0}),{linkChildren:y,children:d}=Re(me);y({props:t,state:a,rowClick:c,getIsLastFixed:A,getFixedStyle:V});const S=Fe(),o=z(H({prop:S,label:r("indexLabel"),width:"100rpx",sortable:!1,fixed:!1,align:"left"},be(t.index)?t.index:{})),M=Me(s,100,{leading:!1}),E=L(()=>{const e={};return b(t.height)&&(e["max-height"]=I(t.height)),`${q(e)}${t.customStyle}`}),B=L(()=>{const e={display:"flex"};let n="";return d.forEach(x=>{n=n?`${n} + ${I(x.width)}`:I(x.width)}),e.width=`calc(${n})`,q(e)}),F=L(()=>{const e={};return b(t.height)&&(e.height=b(t.rowHeight)?`calc(${t.data.length} * ${I(t.rowHeight)})`:`calc(${t.data.length} * 50px)`),`${q(e)}`});function A(e){let n=!1;if(e.fixed&&b(d)){const x=d.filter(C=>C.fixed);x.length&&x[x.length-1].prop===e.prop&&(n=!0)}return n}function _(e){let n={};return b(d[e].width)&&(n.width=I(d[e].width)),d[e].fixed&&(n=V(e,n)),q(n)}function V(e,n){if(e>0){let x="";d.forEach((C,j)=>{j<e&&(x=x?`${x} + ${I(C.width)}`:I(C.width))}),n.left=`calc(${x})`}else n.left=0;return n}function w(e,n){d[n].$.exposed.sortDirection.value=e,d.forEach((C,j)=>{n!=j&&(C.$.exposed.sortDirection.value=0)});const x={prop:d[n].prop,label:d[n].label,width:d[n].width,sortable:d[n].sortable,align:d[n].align,sortDirection:e,fixed:d[n].fixed};v("sort-method",x)}function s(e){a.scrollLeft=e.detail.scrollLeft}function c(e){v("row-click",{rowIndex:e})}return(e,n)=>{const x=ue,C=X,j=Ae;return f(),h(C,{class:N(`wd-table ${e.border?"is-border":""} ${e.customClass}`),style:P(E.value)},{default:l(()=>[e.fixedHeader?(f(),J(K,{key:0},[e.showHeader?(f(),h(j,{key:0,"enable-flex":!0,throttle:!1,scrollLeft:a.scrollLeft,"scroll-x":!0,class:"wd-table__header",onScroll:p(M)},{default:l(()=>[i(C,{id:"table-header",class:"wd-table__content wd-table__content--header",style:P(B.value)},{default:l(()=>[(f(!0),J(K,null,te(p(d),(m,T)=>(f(),h(C,{class:N(`wd-table__cell ${e.border?"is-border":""} ${m.fixed?"is-fixed":""} ${e.stripe?"is-stripe":""} is-${m.align} ${A(m)&&a.scrollLeft?"is-shadow":""}`),style:P(_(T)),key:T},{default:l(()=>[m.sortable?(f(),h(_e,{key:0,modelValue:m.$.exposed.sortDirection.value,"onUpdate:modelValue":U=>m.$.exposed.sortDirection.value=U,"allow-reset":"",line:!1,title:m.label,onChange:({value:U})=>w(U,T)},null,8,["modelValue","onUpdate:modelValue","title","onChange"])):(f(),h(x,{key:1,class:N(`wd-table__value ${e.ellipsis?"is-ellipsis":""}`)},{default:l(()=>[$(k(m.label),1)]),_:2},1032,["class"]))]),_:2},1032,["class","style"]))),128))]),_:1},8,["style"])]),_:1},8,["scrollLeft","onScroll"])):O("",!0),i(j,{class:"wd-table__body",style:P(F.value),"enable-flex":!0,throttle:!1,"scroll-x":!0,onScroll:p(M),scrollLeft:a.scrollLeft},{default:l(()=>[i(C,{id:"table-body",class:"wd-table__content",style:P(B.value)},{default:l(()=>[e.index!==!1?(f(),h(ne,{key:0,prop:o.value.prop,label:o.value.label,width:o.value.width,sortable:o.value.sortable,fixed:o.value.fixed,align:o.value.align},{value:l(({index:m})=>[i(x,null,{default:l(()=>[$(k(m+1),1)]),_:2},1024)]),_:1},8,["prop","label","width","sortable","fixed","align"])):O("",!0),ie(e.$slots,"default",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["style","onScroll","scrollLeft"])],64)):(f(),h(j,{key:1,class:"wd-table__wrapper","enable-flex":!0,throttle:!1,"scroll-x":!0,onScroll:p(M),scrollLeft:a.scrollLeft},{default:l(()=>[i(C,{class:"wd-table__inner",style:P(B.value)},{default:l(()=>[e.showHeader?(f(),h(C,{key:0,class:"wd-table__header-row"},{default:l(()=>[(f(!0),J(K,null,te(p(d),(m,T)=>(f(),h(C,{key:T,class:N(`wd-table__cell ${e.border?"is-border":""} ${m.fixed?"is-fixed":""} ${e.stripe?"is-stripe":""} is-${m.align} ${A(m)&&a.scrollLeft?"is-shadow":""}`),style:P(_(T))},{default:l(()=>[m.sortable?(f(),h(_e,{key:0,modelValue:m.$.exposed.sortDirection.value,"onUpdate:modelValue":U=>m.$.exposed.sortDirection.value=U,"allow-reset":"",line:!1,title:m.label,onChange:({value:U})=>w(U,T)},null,8,["modelValue","onUpdate:modelValue","title","onChange"])):(f(),h(x,{key:1,class:N(`wd-table__value ${e.ellipsis?"is-ellipsis":""}`)},{default:l(()=>[$(k(m.label),1)]),_:2},1032,["class"]))]),_:2},1032,["class","style"]))),128))]),_:1})):O("",!0),i(C,{class:"wd-table__content",style:P(F.value)},{default:l(()=>[e.index!==!1?(f(),h(ne,{key:0,prop:o.value.prop,label:o.value.label,width:o.value.width,sortable:o.value.sortable,fixed:o.value.fixed,align:o.value.align},{value:l(({index:m})=>[i(x,null,{default:l(()=>[$(k(m+1),1)]),_:2},1024)]),_:1},8,["prop","label","width","sortable","fixed","align"])):O("",!0),ie(e.$slots,"default",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["style"])]),_:3},8,["onScroll","scrollLeft"]))]),_:3},8,["class","style"])}}})),st=Z(lt,[["__scopeId","data-v-377b2ba4"]]),at=Y({name:"VipMembership",__name:"vipMembership",setup(g){const u=He(),r=L(()=>Ee()),t=L(()=>(je.global.locale,[{prop:"level",label:G("vipMembership.table.vipLevel"),fixed:!0,align:"center",width:"100rpx"},{prop:"invitedNo",label:G("vipMembership.table.invitedNo"),align:"center",width:"120rpx"},{prop:"directReferralReward",slot:!0,label:G("vipMembership.table.directReferralReward"),align:"center",width:"210rpx"},{prop:"indirectReferralReward",slot:!0,label:G("vipMembership.table.indirectReferralReward"),align:"center",width:"220rpx"},{prop:"joinedGroupsNo",label:G("vipMembership.table.joinedGroupsNo"),align:"center",width:"220rpx"}])),v=z([]);function a(){return le(this,null,function*(){const y=yield Oe();v.value=y.data})}return Ie(()=>{u.getUserInfo(),a()}),(y,d)=>{const S=Q(W("wd-img"),ke),o=X,M=Q(W("wd-progress"),Je),E=Te,B=Q(W("wd-divider"),Ue),F=Q(W("wd-table-col"),ne),A=ue,_=Q(W("wd-table"),st),V=De("layout-default-uni");return f(),h(V,null,{default:l(()=>[i(o,{class:"px-24rpx py-20rpx"},{default:l(()=>[i(o,{class:"relative mb-20rpx box-border min-h-302rpx bg-cover bg-center bg-no-repeat p-36rpx shadow-[0_48rpx_79rpx_13rpx_rgba(0,0,0,0.1)]",style:{"background-image":"url('/static/images/vip-info-bg.png')"}},{default:l(()=>[i(o,null,{default:l(()=>[i(S,{width:"100rpx",height:"100rpx","custom-class":"mb-18rpx",round:"",src:p(r).headPic},null,8,["src"]),i(o,{class:"text-32rpx text-white font-bold"},{default:l(()=>[$(k(p(r).name),1)]),_:1}),i(M,{duration:0,"custom-class":"w-85%!",color:"#E7BEA6",percentage:p(r).invitedNo/p(r).nextInvitedNo*100,"hide-text":""},null,8,["percentage"]),i(o,{class:"text-22rpx text-#714428 font-bold"},{default:l(()=>[$(k(p(G)("vipMembership.inviteProgress",[p(ee)(p(r).nextInvitedNo-p(r).invitedNo,0),p(r).level+1>=p(v).length?p(v).length:p(r).level+1])),1)]),_:1})]),_:1}),i(E,{src:`/static/icons/vip${p(r).level}.png`,class:"absolute right-48rpx top-0 h-162rpx w-126.5rpx"},null,8,["src"])]),_:1}),i(o,{class:"mb-28rpx rounded-16rpx bg-white py-24rpx text-center"},{default:l(()=>[i(o,{class:"flex items-center justify-between"},{default:l(()=>[i(o,{class:"flex-[33.33%]"},{default:l(()=>[i(o,{class:"mb-3px text-22rpx text-#5B5B5B"},{default:l(()=>[$(k(y.$t("vipMembership.invitedFriends")),1)]),_:1}),i(o,{class:"text-26rpx font-bold"},{default:l(()=>[$(k(p(ee)(p(r).invitedNo,0)),1)]),_:1})]),_:1}),i(B,{"custom-class":"h-40rpx!",color:"#A4A4A4",vertical:"",dashed:""}),i(o,{class:"flex-[33.33%]"},{default:l(()=>[i(o,{class:"mb-3px text-22rpx text-#5B5B5B"},{default:l(()=>[$(k(y.$t("vipMembership.teamMembers")),1)]),_:1}),i(o,{class:"text-26rpx font-bold"},{default:l(()=>[$(k(p(ee)(p(r).teamNo,0)),1)]),_:1})]),_:1}),i(B,{dashed:"","custom-class":"h-40rpx!",color:"#A4A4A4",vertical:""}),i(o,{class:"flex-[33.33%]"},{default:l(()=>[i(o,{class:"mb-3px text-22rpx text-#5B5B5B"},{default:l(()=>[$(k(y.$t("vipMembership.l7dEarnings")),1)]),_:1}),i(o,{class:"text-26rpx font-bold"},{default:l(()=>[$(k(p(ee)(p(r).l7DEarnings)),1)]),_:1})]),_:1})]),_:1})]),_:1}),i(o,null,{default:l(()=>[i(o,{class:"mb-28rpx text-32rpx"},{default:l(()=>[$(k(y.$t("vipMembership.benefitsTiers")),1)]),_:1}),i(o,{class:"rounded-16rpx bg-white p-24rpx"},{default:l(()=>[i(_,{data:p(v),border:!1,stripe:!1,"fixed-header":!1},{default:l(()=>[(f(!0),J(K,null,te(p(t),(w,s)=>(f(),J(K,{key:s},[w.slot?(f(),h(F,{key:1,prop:w.prop,label:w.label,fixed:w.fixed,align:w.align,width:w.width},{value:l(({row:c})=>[i(o,{class:"custom-class"},{default:l(()=>[i(A,null,{default:l(()=>[$(k(w.prop==="directReferralReward"?c.directReferralReward:c.indirectReferralReward)+"%",1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["prop","label","fixed","align","width"])):(f(),h(F,{key:0,prop:w.prop,label:w.label,fixed:w.fixed,align:w.align,width:w.width},null,8,["prop","label","fixed","align","width"]))],64))),128))]),_:1},8,["data"])]),_:1})]),_:1})]),_:1})]),_:1})}}}),ut=Z(at,[["__scopeId","data-v-741890b5"]]);export{ut as default};
|