message.js 3.0 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/message/message"],{"03fa":function(t,n,e){"use strict";var i=e("6e88"),o=e.n(i);o.a},"24be":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;e("2313");var i=e("03d5"),o={data:function(){return{chatList:[],option:{tip:"暂无会话"},systemCount:0,systemDate:""}},onLoad:function(){t.$on("changeChatList",this.countNumber)},onShow:function(){t.getStorageSync("token")?(this.option={tip:"暂无会话"},this.$chat.listenerList(),this.init()):(this.chatList=[],this.option={tip:"暂未登录",btnText:"点击登录"})},methods:{init:function(){var t=this;this.$chat.getConversationList((function(n){t.countNumber(n.data)}))},countNumber:function(t){var n=this;this.chatList=t.filter((function(t){return"system"!==t.conversationId})),(0,i.getMessageTest)(this.$store.getters.user.userId).then((function(t){if(200==t.code){for(var e=0,i=0;i<t.data.length;i++)e+=t.data[i].count;n.systemCount=e,n.unread()}}))},linkTo:function(t){this.$chat.clearConversationUnread(t.conversationId),this.$navigateTo("/pages/chat/chat?userId="+t.conversationId+"&userName="+t.userInfo.nickname)},unread:function(){for(var n=this.systemCount,e=this.chatList,i=0;i<e.length;i++)n+=e[i].unread;n?t.setTabBarBadge({index:1,text:String(n)}):t.removeTabBarBadge({index:1})}}};n.default=o}).call(this,e("df3c")["default"])},5366:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return i}));var i={uniBadge:function(){return e.e("uni_modules/uni-badge/components/uni-badge/uni-badge").then(e.bind(null,"4e94"))},uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(e.bind(null,"3d33"))},mescrollEmpty:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty")]).then(e.bind(null,"ec72"))},uniDateformat:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat")]).then(e.bind(null,"2a9e"))}},o=function(){var t=this.$createElement,n=(this._self._c,this.chatList.length);this.$mp.data=Object.assign({},{$root:{g0:n}})},a=[]},"6c9e":function(t,n,e){"use strict";e.r(n);var i=e("5366"),o=e("787c");for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);e("03fa");var u=e("828b"),s=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=s.exports},"6e88":function(t,n,e){},"787c":function(t,n,e){"use strict";e.r(n);var i=e("24be"),o=e.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);n["default"]=o.a},fd60:function(t,n,e){"use strict";(function(t,n){var i=e("47a9");e("7748");i(e("3240"));var o=i(e("6c9e"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(o.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])}},[["fd60","common/runtime","common/vendor"]]]);