Xiaoshu-CXOVEnOD.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import{u as w,r as a,m as B,o,g as i,w as y,d as A,F as L,h as u,j as c,ag as l,L as s}from"./index-B0B44rbN.js";import"./Header.vue_vue_type_style_index_0_scoped_28cad075_lang-Dik1zE-F.js";import{u as C}from"./use-current-user-C2yDNUUS.js";/* empty css */import U from"./ContentContainer-DsTwScxa.js";const N={__name:"Xiaoshu",props:{},setup(p){const d=w(),{bus:_}=l,m=p,e=a(!1),n=a([]),f=s("XIAOSHU_URL"),h=s("WEBSOCKET_BASE_URL"),x=s("ASSETS_BASE_URL"),b={padding:0};return B(()=>{const t=C(),r=t.token,S={userName:t.username,token:r},g=JSON.stringify(S),k=`
  2. window.WEBSOCKET_BASE_URL = '${h}';
  3. window.ASSETS_BASE_URL = '${x}';
  4. localStorage.setItem('xintongxiaoshu', '${g}');
  5. `,E=`
  6. const box = document.querySelector('.xiaoshu-aside-left-menus-container');
  7. if(box){
  8. const btn = document.createElement('div');
  9. box.appendChild(btn);
  10. btn.innerHTML = '<span class="xiaoshu-aside-left-back-btn">返回</span>';
  11. btn.addEventListener('click', () => {
  12. window.$wujie?.bus.$emit("xiaoshuAsideBack");
  13. });
  14. }
  15. `,v=`
  16. .xiaoshu-aside-left-back-btn{
  17. width: 100%;
  18. height: 40px;
  19. line-height: 40px;
  20. text-align: center;
  21. background-color: #165dff;
  22. color: #fff;
  23. display: inline-block;
  24. cursor: pointer;
  25. }
  26. .xiaoshu-aside-left-menus-pop-container {}
  27. .xiaoshu-aside-left-menus-actions-container{
  28. display: none;
  29. }
  30. .user-popover.xiaoshu-aside-left-menus-pop-container>div.item{
  31. display: none;
  32. }
  33. .user-popover.xiaoshu-aside-left-menus-pop-container>header{
  34. padding-bottom: 0;
  35. border-bottom: none;
  36. }
  37. `;_.$on("xiaoshuAsideBack",function(){d.push("/")}),n.value=[{jsBeforeLoaders:[{content:k}]},{jsAfterLoaders:[{content:E}]},{cssAfterLoaders:[{content:v}]}],e.value=!0}),(t,r)=>(o(),i(U,{containerStyle:b},{default:y(()=>[e.value?u("",!0):(o(),A(L,{key:0},[],64)),e.value?(o(),i(c(l),{key:1,width:"100%",height:"100%",name:"xiaoshu",url:c(f),sync:!1,props:m,plugins:n.value},null,8,["url","props","plugins"])):u("",!0)]),_:1}))}};export{N as default};