"use strict";const e=require("../../common/vendor.js"),o=require("../../components/TimeFormatting.js"),t=require("../../components/goEasyTool/tool.js"),n={data:()=>({Conversationobj:{conversations:[]},DeleteSession:{},triggered:!1}),onLoad(){t.getConversationList(this.$goeasy).then((e=>{console.log(e),this.Conversationobj=e})),this.$goeasy.im.on(e.jo.IM_EVENT.CONVERSATIONS_UPDATED,this.onConversationsUpdated)},methods:{onRefresherRefresh(){this.triggered=!0,t.getConversationList(this.$goeasy).then((e=>{this.Conversationobj=e,this.triggered=!1}))},operation(){t.conversationDelete(this.$goeasy,this.DeleteSession).then((o=>{e.index.showToast({title:"删除成功",icon:"none"}),this.$refs.Refusepopup.close()}))},RefuseHintcloseHint(){this.$refs.Refusepopup.close(),this.DeleteSession={}},deleteConversation(e){this.DeleteSession=e,this.$refs.Refusepopup.open("center")},goTop(o,n){t.conversationTop(this.$goeasy,o,n).then((o=>{e.index.showToast({title:n?"置顶成功":"取消置顶成功",icon:"none"})}))},onConversationsUpdated(e){this.Conversationobj=e},TimeFormatting:o.TimeFormatting,goChat(o,t,n){e.wx$1.navigateTo({url:`/pages/index/chat/chat?userId=${o}&nickname=${t}&avatar=${n}`})}},components:{tabBar:()=>"../../components/tabBar/tabBar.js"}};if(!Array){(e.resolveComponent("uni-swipe-action-item")+e.resolveComponent("uni-swipe-action")+e.resolveComponent("tabBar")+e.resolveComponent("uni-popup"))()}Math||((()=>"../../uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.js")+(()=>"../../uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.js")+(()=>"../../components/tabBar/tabBar.js")+(()=>"../../uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const s=e._export_sfc(n,[["render",function(o,t,n,s,i,a){return e.e({a:i.Conversationobj.conversations.length>0},i.Conversationobj.conversations.length>0?{b:e.f(i.Conversationobj.conversations,((o,t,n)=>e.e({a:o.data.avatar,b:o.unread>0},o.unread>0?{c:e.t(o.unread>99?"99+":o.unread)}:{},{d:e.t(o.data.nickname),e:e.t(a.TimeFormatting(o.lastMessage.timestamp)),f:e.t(o.lastMessage.payload.text),g:e.o((e=>a.goChat(o.userId,o.data.nickname,o.data.avatar)),o.userId),h:!o.top},o.top?{}:{i:e.o((e=>a.goTop(o,!0)),o.userId)},{j:o.top},o.top?{k:e.o((e=>a.goTop(o,!1)),o.userId)}:{},{l:e.o((e=>a.deleteConversation(o)),o.userId),m:"8c37f1d5-1-"+n+",8c37f1d5-0-"+n,n:"8c37f1d5-0-"+n,o:o.userId}))),c:e.o(((...e)=>a.onRefresherRefresh&&a.onRefresherRefresh(...e))),d:i.triggered}:{},{e:0==i.Conversationobj.conversations.length},(i.Conversationobj.conversations.length,{}),{f:e.p({tabIndex:3}),g:e.o((e=>a.operation())),h:e.o((e=>a.RefuseHintcloseHint())),i:e.sr("Refusepopup","8c37f1d5-3"),j:e.p({type:"center","border-radius":"10px 10px 0 0"})})}],["__scopeId","data-v-8c37f1d5"]]);wx.createPage(s);
