| 12 |
- webpackJsonp([18],{GXPU:function(t,e){},UHrw:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("mvHQ"),n=s.n(i),a=s("mtWM"),o=s.n(a),l=(s("Au9i"),{name:"newsList",data:function(){return{newsList:[],shopListPage:1,from:!0}},created:function(){this.getList()},methods:{getList:function(t){var e=this,s=this;t&&(this.shopListPage=1),o()({method:"POST",url:"/api/user/msg",data:{page:this.shopListPage}}).then(function(i){"success"===i.data.code?(t&&(e.newsList=[]),e.newsList=e.newsList.concat(i.data.data.data),e.shopListPage+=1,e.from=i.data.data.from):"Token not provided"==i.data.message?e.$vux.alert.show({title:"提示",content:"请您先登录",onShow:function(){},onHide:function(){localStorage.removeItem("token"),s.$router.push({path:"/login"})}}):e.$vux.toast.text(i.data.message,"bottom"),t&&t()})},loadMore:function(){var t=this;null!=this.from?setTimeout(function(){t.getList()},1e3):this.$vux.toast.text("没有更多数据啦!","bottom")},goDetail:function(t){var e=n()(t);sessionStorage.setItem("newDateil",e),this.$router.push("/user/new_detail")}}}),r={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("pull-down",{staticStyle:{width:"100%",height:"100%","background-color":"#f0f0f0",padding:"0.21rem 0"},on:{refresh:t.getList}},[t.newsList.length>0?s("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.loadMore,expression:"loadMore"}],staticClass:"main_content",attrs:{"infinite-scroll-disabled":"loading","infinite-scroll-distance":"0","infinite-scroll-immediate-check":"true"}},t._l(t.newsList,function(e,i){return s("div",{key:i,staticClass:"newsList",on:{click:function(s){t.goDetail(e)}}},[s("div",{staticClass:"top_news clear"},[e.title.length>=7?s("p",{staticClass:"top_title"},[t._v(t._s(e.title.substring(0,6)+"..."))]):s("p",{staticClass:"top_title"},[t._v(t._s(e.title))]),t._v(" "),0==e.status?s("p",{staticClass:"top_state"},[t._v("未读")]):s("p",{staticClass:"top_state1"},[t._v("已读")])]),t._v(" "),s("div",{staticClass:"newsContent"},[t._v(t._s(e.content))]),t._v(" "),s("p",{staticClass:"top_right_time"},[t._v("日期:"+t._s(e.created_at))])])}),0):s("div",{staticClass:"nodata"},[t._v("\n 暂时没有数据\n ")])])},staticRenderFns:[]};var c=s("VU/8")(l,r,!1,function(t){s("kuVq"),s("GXPU")},null,null);e.default=c.exports},kuVq:function(t,e){}});
- //# sourceMappingURL=18.911033728069ae6317d1.js.map
|