chunk-ee0820be.348a48c2.js 8.1 KB

123456
  1. /*!
  2. * build: Hopaheal
  3. * copyright: Mead
  4. * time: 2022-6-7 11:38:49
  5. */
  6. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ee0820be"],{"2ba0":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],staticClass:"new-container"},[n("nav",{staticClass:"nav"},[n("ul",{staticClass:"nav_ul"},[n("li",{class:[t.flag1?"nav_checked":"default"],on:{click:function(e){return t.check_tuijian()}}},[t._v(" 全部 ")]),t._l(t.navArr,(function(e,i){return n("li",{key:i,class:[t.isChecked==i?"nav_checked":"default"],on:{click:function(n){return t.checked(i,e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2),n("nav",[!t.flag1&&t.nav_child_arr?n("ul",{staticClass:"child_nav_ul"},[n("li",{class:[-1==t.isChild_checked?"nav_child":"default"],on:{click:t.check_all}},[t._v(" 全部 ")]),t._l(t.nav_child_arr,(function(e,i){return n("li",{key:i,class:[e.id==t.child_id?"nav_child":"default"],on:{click:function(n){return t.childs_checked(i,e)}}},[t._v(" "+t._s(e.name)+" ")])}))],2):t._e()])]),n("div",{staticClass:"content"},[n("div",{staticClass:"containt"},[n("div",{staticClass:"type"},[n("ul",t._l(t.type_arr,(function(e,i){return n("li",{key:i,class:[t.type_checked==i?"typeChecked":""],on:{click:function(n){return t.type_click(i,e)}}},[t._v(" "+t._s(e)+" ")])})),0)]),n("div",{staticClass:"news_wrap"},[0==t.news_list.length?n("el-empty",{attrs:{description:"空空如也~","image-size":100}}):t._e(),t._l(t.news_list,(function(e,i){return n("div",{key:i,staticClass:"new_item",on:{click:function(n){return t.to_detail(e)}}},[n("div",{staticClass:"meta_content"},[n("div",{staticClass:"author"},[t._v(t._s(e.category_name))]),n("div",{staticClass:"line"}),n("div",{staticClass:"time"},[t._v(t._s(e.created_at))]),n("div",{staticClass:"line"}),n("div",{staticClass:"tag_list"},t._l(e.tags,(function(i,a){return n("div",{key:a,staticClass:"tag_wrap"},[n("div",{staticClass:"tag"},[t._v(t._s(i))]),a!=e.tags.length-1?n("i"):t._e()])})),0)]),n("div",{staticClass:"content_wrap"},[n("div",{staticClass:"content_left"},[n("div",{staticClass:"title"},[t._v(" "+t._s(e.title)+" ")]),n("div",{staticClass:"abstract"},[t._v(t._s(e.short_description))]),n("ul",[n("li",[n("vab-icon",{attrs:{icon:"eye-line"}}),n("span",[t._v(t._s(e.view_count))])],1),n("li",{staticClass:"good",on:{click:function(n){return n.stopPropagation(),t.dianzan(e)}}},[n("vab-icon",{attrs:{icon:"thumb-up-line"}}),n("span",[t._v(t._s(e.good_count))])],1),n("li",{staticClass:"author"},[n("vab-icon",{attrs:{icon:"user-star-line"}}),n("span",[t._v(t._s(e.admin_name))])],1)])]),n("img",{attrs:{alt:"",src:e.cover_resource?e.cover_resource.url:""}})])])}))],2)])]),n("el-pagination",{attrs:{background:"","current-page":t.queryForm.page,layout:t.layout,"page-size":t.queryForm.per_page,"page-sizes":[15,20,30,40,50,100],total:t.total},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)},a=[],r=n("1da1"),s=n("5530"),c=(n("96cf"),n("6a1d")),o=n("2f62"),l={name:"SortManage",data:function(){return{queryForm:{page:1,per_page:15},total:0,listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",child_id:"",isChecked:-1,navArr:[],nav_child_arr:[],isChild_checked:-1,type_checked:-1,flag1:!0,type_arr:["热门","最新","好评"],news:[],news_list:[],all_id:"",fullscreenLoading:!1,zan:""}},computed:Object(s["a"])({},Object(o["c"])({is_test:"user/is_test"})),created:function(){this.getList(),this.getContent()},methods:{handleSizeChange:function(t){console.log(t,"handleSizeChange"),this.queryForm.per_page=t,this.getContent()},handleCurrentChange:function(t){console.log(t,"handleCurrentChange"),this.queryForm.page=t,this.getContent()},check_tuijian:function(){this.flag1=!0,this.isChecked=-1,this.type_checked=-1,this.queryForm={page:1,per_page:15},this.getContent()},checked:function(t,e){console.log(e,"一级目录触发事件"),this.child_id="",this.isChecked=t,this.nav_child_arr=this.navArr[t].children,this.isChild_checked=-1,this.flag1=!1,this.all_id=e.id,this.queryForm.category_id=e.id,this.queryForm.page=1,this.getContent()},childs_checked:function(t,e){console.log(t),this.all_id=e.id,this.flag1=!1,this.isChild_checked=t,this.child_id=e.id,this.queryForm.category_id=this.child_id,this.queryForm.page=1,this.getContent()},check_all:function(){this.child_id="",this.isChild_checked=-1,this.queryForm.category_id=this.all_id,this.queryForm.page=1,this.getContent()},type_click:function(t,e){if(this.type_checked=t,this.flag1)switch(this.queryForm={page:1,per_page:15},e){case"热门":this.queryForm.tag="hot",this.getContent();break;case"最新":this.queryForm.tag="new",this.getContent();break;case"好评":this.queryForm.tag="good",this.getContent();break}else switch(this.queryForm.page=1,this.queryForm.category_id=this.all_id,e){case"热门":this.queryForm.tag="hot",this.getContent();break;case"最新":this.queryForm.tag="new",this.getContent();break;case"好评":this.queryForm.tag="good",this.getContent();break}},to_detail:function(t){this.$router.push({path:"/new/new_detail",query:{id:t.id}}),console.log(t,"新闻详情")},dianzan:function(t){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(console.log(t,"item"),e.is_test){n.next=7;break}return n.next=4,e.good({id:t.id});case 4:e.getContent(),n.next=8;break;case 7:e.$message.warning("游客模式,暂无权限!");case 8:case"end":return n.stop()}}),n)})))()},getList:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.fullscreenLoading=!0,e.next=3,Object(c["getList"])();case 3:n=e.sent,i=n.data,t.navArr=i,console.log(i,"表格信息"),console.log(t.list,"this.list"),t.fullscreenLoading=!1;case 9:case"end":return e.stop()}}),e)})))()},getContent:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.fullscreenLoading=!0,t.queryForm.check_status=1,e.next=4,Object(c["getContent"])(t.queryForm);case 4:n=e.sent,i=n.data,t.news_list=i.list,console.log(t.news_list,"YYYYYYYYY"),t.total=i.meta.pagination.total,t.fullscreenLoading=!1;case 10:case"end":return e.stop()}}),e)})))()},good:function(t){return Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["good"])(t);case 2:case"end":return e.stop()}}),e)})))()}}},u=l,d=(n("f708"),n("2877")),h=Object(d["a"])(u,i,a,!1,null,"69eefc38",null);e["default"]=h.exports},"6a1d":function(t,e,n){"use strict";n.r(e),n.d(e,"getList",(function(){return a})),n.d(e,"getContent",(function(){return r})),n.d(e,"good",(function(){return s})),n.d(e,"getSign",(function(){return c})),n.d(e,"sign_up",(function(){return o})),n.d(e,"del_sign_up",(function(){return l})),n.d(e,"getPinglun",(function(){return u})),n.d(e,"save_pinglun",(function(){return d})),n.d(e,"delete_ping",(function(){return h}));var i=n("b775");function a(t){return Object(i["default"])({url:"/inform/category-tree",method:"get",params:t})}function r(t){return Object(i["default"])({url:"/inform/information",method:"get",params:t})}function s(t){return Object(i["default"])({url:"/inform/information-good",method:"post",params:t})}function c(t){return Object(i["default"])({url:"/inform/information-activity",method:"get",params:t})}function o(t){return Object(i["default"])({url:"/inform/information-sign-up",method:"post",params:t})}function l(t){return Object(i["default"])({url:"/inform/information-cancel-sign-up",method:"post",params:t})}function u(t){return Object(i["default"])({url:"/inform/comment",method:"get",params:t})}function d(t){return Object(i["default"])({url:"/inform/comment",method:"post",params:t})}function h(t){return Object(i["default"])({url:"/inform/comment/"+t,method:"delete"})}},ac56:function(t,e,n){},f708:function(t,e,n){"use strict";n("ac56")}}]);