import{o as e,c as a,w as t,a as s,b as n,t as r,u as c,i as o,d as l,F as i,r as p,v as u,e as d,f,g,h as m,j as _,k as h,l as y,n as b,m as L}from"./index-cdc712d1.js";import{c as x,o as k,s as w,r as T}from"./uni-app.es.7275f0c5.js";import{_ as C}from"./_plugin-vue_export-helper.1b428a4d.js";const I=C({__name:"mob-chat-org-bar",emits:["orgSelectClick"],setup(l,{emit:i}){const p=x.$store("user");function u(){console.log("点击了组织切换"),i("orgSelectClick")}return k((()=>{p.initUserInfo()})),(l,i)=>{const d=o;return e(),a(d,{class:"orgBarContainer",onClick:u},{default:t((()=>[s(d,{class:"orgText"},{default:t((()=>[n(r(c(p).orgName),1)])),_:1}),s(c(w),{class:"enterArrow"})])),_:1})}}},[["__scopeId","data-v-58f3bc68"]]),$=C({__name:"mob-chat-entrance-card",props:{title:{type:String,default:""},entranceList:{type:Array,default:[]}},setup:c=>(m,_)=>{const h=o,y=g;return e(),a(h,{class:"container"},{default:t((()=>[s(h,{class:"title"},{default:t((()=>[n(r(c.title),1)])),_:1}),s(h,{class:"entrance-panel"},{default:t((()=>[(e(!0),l(i,null,p(c.entranceList,(c=>(e(),a(h,null,{default:t((()=>[s(h,{class:"entrance",onClick:e=>async function(e){if(await u())if(f.appTypeThird==e.appType)x.$router.go(e.url);else{let a=e.url+"&orgId="+x.$store("user").orgId;window.open(a)}else d({url:"/pages/index/noPermission"})}(c)},{default:t((()=>[s(y,{class:"entrance-icon",src:c.imageUrl,mode:"aspectFill"},null,8,["src"]),s(h,{class:"entrance-name"},{default:t((()=>[n(r(c.appName),1)])),_:2},1024)])),_:2},1032,["onClick"])])),_:2},1024)))),256))])),_:1})])),_:1})}},[["__scopeId","data-v-13fc4646"]]),A=C({__name:"index",setup(n){const r=m({appEntranceList:_((()=>x.$store("user").appEntrance)),aiAppEntranceList:[],screenHeight:""});function c(){x.$router.go("/pages/baseData/orgSelect")}return k((()=>{let e=!1;try{let a=h(),t=a[a.length-1].options||a[a.length-1].$route.query;for(let s in t)if("ac"==s&&"logout"==t[s]){e=!0;break}}catch(a){console.log(a)}!async function(e){await x.$store("user").initAppInfo(e)}(e),y({success:function(e){r.screenHeight=e.windowHeight}}),r.aiAppEntranceList.push({appName:"GPT对话",imageUrl:f.baseUrl+"/icons/mobile/label/fpy_dxqp.png",url:"/pages/index/chat",appType:f.appTypeThird})})),(n,l)=>{const i=T(L("mob-chat-org-bar"),I),p=T(L("mob-chat-entrance-card"),$),u=o;return e(),a(u,{class:"home-page",style:b({height:r.screenHeight+"px"})},{default:t((()=>[s(i,{onClick:c}),s(p,{class:"entrance-card-one",title:"轻应用",entranceList:r.appEntranceList},null,8,["entranceList"]),s(p,{title:"智能应用",entranceList:r.aiAppEntranceList},null,8,["entranceList"])])),_:1},8,["style"])}}},[["__scopeId","data-v-82e90f9f"]]);export{A as default};
