Files
vben-app/web/dist/js/account-bind-BiKd6GbM.js
T
2026-10-01 17:05:05 +08:00

2 lines
3.3 KiB
JavaScript

var u=(w,h,l)=>new Promise((m,r)=>{var i=e=>{try{t(l.next(e))}catch(o){r(o)}},d=e=>{try{t(l.throw(e))}catch(o){r(o)}},t=e=>e.done?m(e.value):Promise.resolve(e.value).then(i,d);t((l=l.apply(w,h)).next())});import{t as N,a7 as L,a8 as T,a9 as z,F as V,aa as $,H as A,r as F,ab as Q,ac as U,_ as q}from"./bootstrap-Dvp__AlY.js";import{a as D,h as M}from"./oauth-common-aTeJY-lH.js";import{a7 as R,T as S,J as j,aq as p,X as H,a9 as I,ar as g,aw as _,x as s,ax as n,aO as c,aR as f,F as J,ay as K,aN as v,at as O,aQ as P,aK as X,au as x}from"../jse/index-index-D97IFaZ_.js";import"./index-CxpPjm1h.js";import"./index-jihHkv57.js";import"./index-DUhZmPwr.js";function G(){return N.get("/sys/social/list")}const W={class:"flex flex-col gap-[16px]"},Y=["src"],Z={class:"pb-3"},tt={class:"flex w-full items-center gap-4"},et={class:"flex flex-1 items-center justify-between"},at={class:"flex flex-col"},st={class:"mb-[4px] text-[14px] text-black/85 dark:text-white/85"},ot={class:"text-black/45 dark:text-white/45"},lt=R({__name:"account-bind",setup(w){function h(t){return t.bound?"已绑定":"绑定"}const l=S([]),m=j(()=>{const t=[...D];return t.forEach(e=>{e.bound=!!p(l).includes(e.source.toUpperCase())}),t});function r(t){Q.confirm(`确定解绑[${t.source}]平台的[${t.userName}]账号吗?`,"提示",{type:"warning"}).then(()=>u(null,null,function*(){yield U(t.id),yield d()})).catch(()=>{})}const i=H({list:[]});I(()=>u(null,null,function*(){yield d()}));const d=()=>u(null,null,function*(){l.value=[],i.list=yield G();for(const t of i.list)l.value.push(t.source);console.log(l.value)});return(t,e)=>{const o=L,y=T,k=z,C=$,E=V,B=A;return _(),g("div",W,[s(k,{data:p(i).list,style:{width:"100%",height:"100%","font-size":"14px"}},{default:c(()=>[s(o,{label:"序号",width:"80",type:"index"}),s(o,{label:"绑定账号平台",width:"140",align:"center",prop:"source","show-overflow-tooltip":""}),s(o,{label:"头像",width:"70",align:"center",prop:"avatar"},{default:c(a=>[n("img",{src:a.row.avatar,style:{width:"45px",height:"45px"}},null,8,Y)]),_:1}),s(o,{label:"系统账号",align:"center",prop:"userName","show-overflow-tooltip":!0}),s(o,{label:"绑定时间",width:"180",align:"center",prop:"createTime"}),s(o,{label:"操作",width:"80",align:"center","class-name":"small-padding fixed-width"},{default:c(a=>[s(y,{size:"small",type:"text",onClick:b=>r(a.row)},{default:c(()=>[...e[0]||(e[0]=[f("解绑",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"]),n("div",Z,[s(B,{gutter:20},{default:c(()=>[(_(!0),g(J,null,K(m.value,a=>(_(),v(E,{span:8,key:a.title},{default:c(()=>[s(C,{style:{"margin-bottom":"10px"}},{default:c(()=>{var b;return[n("div",tt,[a.avatar?(_(),v(P(a.avatar),{key:0,style:X((b=a==null?void 0:a.style)!=null?b:{}),class:"size-[40px]"},null,8,["style"])):O("",!0),n("div",et,[n("div",at,[n("h4",st,x(a.title),1),n("span",ot,x(a.description),1)]),s(y,{disabled:a.bound,size:"small",link:"",onClick:nt=>p(M)(a.source),style:{color:"#5353d5"}},{default:c(()=>[f(x(h(a)),1)]),_:2},1032,["disabled","onClick"])])])]}),_:2},1024)]),_:2},1024))),128))]),_:1}),s(p(F),{title:"说明",type:"success",closable:!1},{default:c(()=>[...e[1]||(e[1]=[n("p",null,[f(" 需要添加第三方账号在 "),n("span",{class:"font-bold"}," apps\\web-antd\\src\\views\\_core\\oauth-common.ts "),f(" 中accountBindList按模板添加 ")],-1)])]),_:1})])])}}}),ft=q(lt,[["__scopeId","data-v-d602432d"]]);export{ft as default};