require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/message_center/index"],{"0985":function(e,t,n){"use strict";n.r(t);var i=n("3d7d"),s=n("c229");for(var a in s)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(a);n("305f");var o=n("828b"),c=Object(o["a"])(s["default"],i["b"],i["c"],!1,null,"6e55759c",null,!1,i["a"],void 0);t["default"]=c.exports},"305f":function(e,t,n){"use strict";var i=n("3a15"),s=n.n(i);s.a},"3a15":function(e,t,n){},"3d7d":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.community.id?e._f("typeFilter")(e.community.type):null),i=e.__map(e.list,(function(t,n){var i=e.__get_orig(t),s=[1,2].includes(t.message_type),a=s?null:e._f("messageType")(t.message_type);return{$orig:i,g0:s,f1:a}})),s=0==e.list.length&&!e.system.id&&!e.community.id;e.$mp.data=Object.assign({},{$root:{f0:n,l0:i,g1:s}})},s=[]},4248:function(e,t,n){"use strict";(function(e){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=n("92f9"),a=(i(n("89cc")),n("4d38")),o={data:function(){return{list:[],system:{},community:{},page:1,type:0,limit:20,loading:!1,finished:!1,imgHost:a.HTTP_REQUEST_URL}},components:{tuiSwipeAction:function(){n.e("components/tui-swipe-action/index").then(function(){return resolve(n("337d"))}.bind(null,n)).catch(n.oe)},emptyPage:function(){n.e("components/emptyPage").then(function(){return resolve(n("398a"))}.bind(null,n)).catch(n.oe)}},filters:{messageType:function(e){return{3:"[图片]",4:"[语音]",5:"[商品]",6:"[订单]"}[e]},typeFilter:function(e){return{1:"点赞",2:"评论",3:"关注"}[e]}},onShow:function(){this.page=1,this.list=[],this.finished=!1,this.getList()},onReachBottom:function(){this.getList()},onPullDownRefresh:function(){this.page=1,this.list=[],this.finished=!1,this.getList()},methods:{getList:function(){var t=this;this.loading||this.finished||(this.loading=!0,e.showLoading({title:"加载中"}),(0,s.serviceRecord)({page:this.page,limit:this.limit}).then((function(n){e.hideLoading(),e.stopPullDownRefresh();var i=n.data.service;t.system=n.data.system,t.community=n.data.community,t.loading=!1,i.forEach((function(e){[1,2].includes(e.message_type)&&(e.message=t.replace_em(e.message))})),t.list=t.list.concat(i),t.finished=i.length<t.limit,t.page+=1})).catch((function(t){e.showToast({title:t.msg,icon:"none"})})))},replace_em:function(e){return e=e.replace(/\[em-([a-z_]*)\]/g,"<span class='em em-$1'/></span>"),e},goChat:function(t){e.navigateTo({url:"/pages/extension/customer_list/chat?to_uid="+t+"&type=1"})},goDetail:function(t){0==t?e.navigateTo({url:"/pages/users/message_center/messageDetail"}):e.navigateTo({url:"/pages/discover/discoverMessage/index"})},deleteMsg:function(e){this.list.splice(e,1)}}};t.default=o}).call(this,n("df3c")["default"])},a02b:function(e,t,n){"use strict";(function(e,t){var i=n("47a9");n("f076");i(n("3240"));var s=i(n("0985"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(s.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},c229:function(e,t,n){"use strict";n.r(t);var i=n("4248"),s=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=s.a}},[["a02b","common/runtime","common/vendor"]]]);