(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/message"],{"0710":function(t,e,n){},"1cdb":function(t,e,n){"use strict";(function(t){n("02cf");o(n("66fd"));var e=o(n("2e1e"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"2e1e":function(t,e,n){"use strict";n.r(e);var o=n("b497"),i=n("88ec");for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("44a8");var a,u=n("f0c5"),r=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"53609fa2",null,!1,o["a"],a);e["default"]=r.exports},"44a8":function(t,e,n){"use strict";var o=n("0710"),i=n.n(o);i.a},"88ec":function(t,e,n){"use strict";n.r(e);var o=n("e8b7"),i=n.n(o);for(var s in o)"default"!==s&&function(t){n.d(e,t,(function(){return o[t]}))}(s);e["default"]=i.a},b497:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return o}));var o={uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"f728"))},uEmpty:function(){return n.e("uview-ui/components/u-empty/u-empty").then(n.bind(null,"5fcb"))},uNoNetwork:function(){return n.e("uview-ui/components/u-no-network/u-no-network").then(n.bind(null,"36dd"))}},i=function(){var t=this,e=t.$createElement;t._self._c},s=[]},e8b7:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("a34a"));function i(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n,o,i,s,a){try{var u=t[s](a),r=u.value}catch(c){return void n(c)}u.done?e(r):Promise.resolve(r).then(o,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){s(a,o,i,u,r,"next",t)}function r(t){s(a,o,i,u,r,"throw",t)}u(void 0)}))}}var u={onLoad:function(t){},onShow:function(){var e=this;this.getMessage(),this.imService=getApp().globalData.imService,this.imService.onConversationsUpdate=function(t){e.conversations=t};var n=this.imService.latestConversations();n.then((function(n){e.conversations=n.content,console.log("conversations load successfully"),console.log(e.conversations),t.hideLoading()})).catch((function(t){console.log(t)}))},mounted:function(){},data:function(){return{messageList:[],pageindex:1,show:!1,conversations:{unreadTotal:0,conversations:[]},imService:null}},onReachBottom:function(){this.getMessage()},methods:{getMessage:function(){var e=a(o.default.mark((function e(){var n,i=this;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$request.post("/api/v1/user/userMessageList",{page:this.pageindex});case 2:n=e.sent,console.log(n),0==n.status&&(this.pageindex>n.data.last_page?t.showToast({title:"没有更多了",icon:"none"}):(this.messageList=this.messageList.concat(n.data.data),this.pageindex++)),0==this.messageList.length?this.show=!0:this.show=!1,this.conversations.conversations.reverse(),this.conversations.conversations.forEach((function(t){var e={type:99,content:"text"==t.lastMessage.type?t.lastMessage.payload.text:"audio"==t.lastMessage.type?"[语音消息]":"[图片消息]",unread:t.unread,docter_id:t.userId.split("_")[1]};i.messageList.unshift(e)}));case 8:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}(),gotoliaotian:function(e){1==e.type||4==e.type?t.navigateTo({url:"../common_tools/my_consulting/consultingInfo?id="+e.relation_id}):2==e.type&&1==e.product_type||2==e.type&&2==e.product_type?t.navigateTo({url:"../common_tools/my_consulting/opinionInfo?id="+e.relation_id}):5!=e.type&&6!=e.type||t.navigateTo({url:"../service_box/box_details"})}}};e.default=u}).call(this,n("543d")["default"])}},[["1cdb","common/runtime","common/vendor"]]]);