"use strict";const e=require("../../common/vendor.js"),t=require("../VerifyLogin.js"),a=require("../goEasyTool/tool.js");Math||o();const o=()=>"../../pages/NewAddedPk/NewAddedPk2.js",s={__name:"tabBar",props:{tabIndex:Number},setup(o){const s=e.getCurrentInstance().appContext.config.globalProperties.$goeasy,n=e.ref(0);var c=s.im;function i(e){console.log("监听会话列表",e),n.value=e.unreadTotal}let l=e.ref(!1),d=e.reactive([{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Pk.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/PKClick.png",text:"PK",pagePath:"/pages/Home/Home",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forum.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forumclick.png",text:"站内信",pagePath:"/pages/Forum/Forum",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",text:"",pagePath:"/pages/c/c",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Message.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Messageclick.png",text:"消息",pagePath:"/pages/index/index",middleClass:""},{iconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mine.png",selectedIconPath:"https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mineclick.png",text:"我的",pagePath:"/pages/Mine/Mine",middleClass:""}]);e.onMounted((()=>{!function(){let e=d.length;if(e%2){l.value=!0;let t=Math.floor(e/2);d[t].middleClass="mid-button"}}(),setTimeout((()=>{a.getConversationList(s).then((e=>{n.value=e.unreadTotal})),c.on(e.jo.IM_EVENT.CONVERSATIONS_UPDATED,i)}),1e3)})),e.index.getSystemInfo({success:function(e){e.safeArea.top}});const h=e.ref();const u=()=>!1;function p(a,o){2===o?t.VerifyLogin().then((e=>{e&&h.value.open()})):4===o?t.VerifyLogin().then((t=>{t&&e.index.switchTab({url:"/pages/Mine/Mine",animationType:"none"})})):e.index.switchTab({url:a.pagePath})}return(t,a)=>({a:e.f(e.unref(d),((t,a,s)=>e.e({a:o.tabIndex==a?t.selectedIconPath:t.iconPath,b:3===a&&n.value>0},3===a&&n.value>0?{c:e.t(n.value>99?"99+":n.value)}:{},{d:e.t(t.text),e:o.tabIndex==a?"#1DD2F9":"#A7A3A3",f:e.n("list-item flex flex-column flex-middle "+t.middleClass),g:e.o((e=>p(t,a)),a),h:a}))),b:e.n(!0===e.unref(l)?"tab-list-middle":"tab-list-default"),c:e.o(u),d:e.sr(h,"99121d5c-0",{k:"createModule"}),e:e.o(t.publishSuccesss)})}},n=e._export_sfc(s,[["__scopeId","data-v-99121d5c"]]);wx.createComponent(n);
