HHSLinkSLink/HSLink-wx/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"],{4699:function(t,n,e){},4828:function(t,n,e){"use strict";e.r(n);var o=e("c991"),a=e("fdb2");for(var c in a)"default"!==c&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("eed0");var i,r=e("f0c5"),u=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"1f558bb6",null,!1,o["a"],i);n["default"]=u.exports},c991:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return o}));var o={noData:function(){return Promise.all([e.e("common/vendor"),e.e("components/noData/noData")]).then(e.bind(null,"2c8c"))}},a=function(){var t=this,n=t.$createElement;t._self._c},c=[]},d450:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=c(e("7cc2")),a=e("ccb8");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("46ed"))}.bind(null,e)).catch(e.oe)},r=function(){Promise.all([e.e("common/vendor"),e.e("components/noData/noData")]).then(function(){return resolve(e("2c8c"))}.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;o.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,a.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"])},eed0:function(t,n,e){"use strict";var o=e("4699"),a=e.n(o);a.a},fa3d:function(t,n,e){"use strict";(function(t){e("813a");o(e("66fd"));var n=o(e("4828"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},fdb2:function(t,n,e){"use strict";e.r(n);var o=e("d450"),a=e.n(o);for(var c in o)"default"!==c&&function(t){e.d(n,t,(function(){return o[t]}))}(c);n["default"]=a.a}},[["fa3d","common/runtime","common/vendor"]]]);