HHSLinkSLink/HSLink-app/unpackage/dist/build/mp-weixin/pages/tabbar/homepage/homepage.js

1 line
3.0 KiB
JavaScript
Raw Normal View History

2020-12-19 12:13:27 +08:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabbar/homepage/homepage"],{"0388":function(t,n,e){"use strict";e.r(n);var a=e("da20"),o=e("fd2f");for(var c in o)"default"!==c&&function(t){e.d(n,t,(function(){return o[t]}))}(c);e("da5d");var i,r=e("f0c5"),u=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"7e333a67",null,!1,a["a"],i);n["default"]=u.exports},"5acc":function(t,n,e){"use strict";(function(t){e("481f");a(e("66fd"));var n=a(e("0388"));function a(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},d4c5:function(t,n,e){},da20:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a}));var a={noData:function(){return Promise.all([e.e("common/vendor"),e.e("components/noData/noData")]).then(e.bind(null,"c48a"))}},o=function(){var t=this,n=t.$createElement;t._self._c},c=[]},da5d:function(t,n,e){"use strict";var a=e("d4c5"),o=e.n(a);o.a},daaa:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(e("1da1")),o=e("7960");function c(t){return t&&t.__esModule?t:{default:t}}var i=function(){e.e("components/mehaotian-search/mehaotian-search").then(function(){return resolve(e("7cee"))}.bind(null,e)).catch(e.oe)},r=function(){Promise.all([e.e("common/vendor"),e.e("components/noData/noData")]).then(function(){return resolve(e("c48a"))}.bind(null,e)).catch(e.oe)},u={components:{mSearch:i,noData:r},data:function(){return{noData:!1,searchStr:"",noticeList:[]}},computed:{noticeListQuery:function(){var t=this;return this.noticeList.filter((function(n){return-1!=n.title.indexOf(t.searchStr)||-1!=n.type.indexOf(t.searchStr)||-1!=n.real_name.indexOf(t.searchStr)}))}},onLoad:function(){},onShow:function(){this.getAllData()},onPullDownRefresh:function(){this.getAllData()},methods:{goToUserInfo:function(n){n.user_id===t.getStorageSync("userInfo").user_id?t.switchTab({url:"/pages/tabbar/my/my"}):t.navigateTo({url:"/pages/person-info-page/person-info-page?userId=".concat(n.user_id)})},goToDetails:function(n){t.navigateTo({url:"/pages/tabbar/homepage/data-details?noticeId="+n.id})},getAllData:function(){var n=this;a.default.post("/hs/getAllContent",{}).then((function(e){e.data.parentAdvice.forEach((function(t){n.$set(t,"type","家长建议")})),e.data.schoolNoticeList.forEach((function(t){n.$set(t,"type","校园通知")})),e.data.studentThinking.forEach((function(t){n.$set(t,"type","学生想法")})),n.noticeList=e.data.parentAdvice.concat(e.data.schoolNoticeList,e.data.studentThinking).sort((0,o.sortBy)("release_time",!1)),t.startPullDownRefresh(),n.noData=0===n.noticeList.length,console.log("首页数据",n.noticeList)}),(function(t){console.log("err",t)}))}}};n.default=u}).call(this,e("543d")["default"])},fd2f:function(t,n,e){"use strict";e.r(n);var a=e("daaa"),o=e.n(a);for(var c in a)"default"!==c&&function(t){e.d(n,t,(function(){return a[t]}))}(c);n["default"]=o.a}},[["5acc","common/runtime","common/vendor"]]]);