HHSLinkSLink/HSLink-app/unpackage/dist/build/mp-weixin/pages/tabbar/message/message.js
2020-12-19 12:13:27 +08:00

1 line
4.5 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabbar/message/message"],{"0412":function(t,e,n){"use strict";var a=n("3e47"),r=n.n(a);r.a},"0658":function(t,e,n){"use strict";(function(t){n("481f");a(n("66fd"));var e=a(n("c215"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"0821":function(t,e,n){},"0c0f":function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.userName.slice(0,1));t.$mp.data=Object.assign({},{$root:{g0:n}})},o=[]},"21b3":function(t,e,n){"use strict";n.r(e);var a=n("0c0f"),r=n("9d02");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("0412");var u,i=n("f0c5"),c=Object(i["a"])(r["default"],a["b"],a["c"],!1,null,"79e5d186",null,!1,a["a"],u);e["default"]=c.exports},"2ccd":function(t,e,n){"use strict";n.r(e);var a=n("7169"),r=n.n(a);for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=r.a},"3e47":function(t,e,n){},7169:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=o(n("1da1")),r=o(n("21b3"));function o(t){return t&&t.__esModule?t:{default:t}}var u=function(){Promise.all([n.e("common/vendor"),n.e("components/noData/noData")]).then(function(){return resolve(n("c48a"))}.bind(null,n)).catch(n.oe)},i={components:{avatar:r.default,noData:u},data:function(){return{modalName:null,message:[],noData:!1}},onShow:function(){this.getPersonalPrivateLetter(),this.getTabBarNumber()},onPullDownRefresh:function(){this.getPersonalPrivateLetter(),this.getTabBarNumber(),t.startPullDownRefresh()},methods:{getTabBarNumber:function(){a.default.post("/hs/getTabBarNumber",{userId:t.getStorageSync("userInfo").user_id}).then((function(e){console.log("获取tabBar数字",e),e.data.unreadNumber>0?t.setTabBarBadge({index:3,text:e.data.unreadNumber.toString()}):t.removeTabBarBadge({index:3})}),(function(t){console.log("err",t)}))},goToMessage:function(e){t.setStorageSync("otherInfo",e.userInfo),t.navigateTo({url:"/pages/tabbar/message/chat-page"})},deleteMessage:function(){t.showToast({icon:"loading",title:"不能删除哦"})},getPersonalPrivateLetter:function(){var e=this;a.default.post("/hs/getPersonalPrivateLetterApp",{userId:t.getStorageSync("userInfo").user_id}).then((function(n){e.message=n.data,e.noData=!(n.data.length>0),e.message.forEach((function(e,n){var a=0;e.letterList.forEach((function(e){"0"===e.already_read&&e.receive_id===t.getStorageSync("userInfo").user_id&&a++})),e.unreadNumber=a})),e.message.forEach((function(n,a){n.userInfo.user_id===t.getStorageSync("userInfo").user_id&&e.message.splice(a,1)})),console.log("私信",n)}),(function(t){console.log("err",t)}))},ListTouchStart:function(t){this.listTouchStart=t.touches[0].pageX},ListTouchMove:function(t){this.listTouchDirection=t.touches[0].pageX-this.listTouchStart>0?"right":"left"},ListTouchEnd:function(t){"left"==this.listTouchDirection?this.modalName=t.currentTarget.dataset.target:this.modalName=null,this.listTouchDirection=null}}};e.default=i}).call(this,n("543d")["default"])},"9d02":function(t,e,n){"use strict";n.r(e);var a=n("d9f9"),r=n.n(a);for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=r.a},a05f:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var a={noData:function(){return Promise.all([n.e("common/vendor"),n.e("components/noData/noData")]).then(n.bind(null,"c48a"))}},r=function(){var t=this,e=t.$createElement;t._self._c},o=[]},a653:function(t,e,n){"use strict";var a=n("0821"),r=n.n(a);r.a},c215:function(t,e,n){"use strict";n.r(e);var a=n("a05f"),r=n("2ccd");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("a653");var u,i=n("f0c5"),c=Object(i["a"])(r["default"],a["b"],a["c"],!1,null,"4f292851",null,!1,a["a"],u);e["default"]=c.exports},d9f9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={props:{size:{type:String,default:"90"},userId:{type:String,default:""},userName:{type:String,default:"H"}},computed:{photoStyle:function(){return"font-size: ".concat(this.size,"rpx; width: ").concat(2*this.size,"rpx; height: ").concat(2*this.size,"rpx; line-height: ").concat(2*this.size,"rpx;")}},data:function(){return{}},methods:{}};e.default=a}},[["0658","common/runtime","common/vendor"]]]);