help-center-legacy.30cb48ed.js 3.6 KB

1
  1. !function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function e(e){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e,n,a,i,r,o){try{var s=t[r](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,i)}System.register(["./index-legacy.f8641610.js","./index-legacy.fc510843.js","./index-legacy.13f535d5.js","./index-legacy.4ddb0119.js","./index-legacy.e8dcdcc8.js","./hooks-legacy.1d4168e3.js","./use-tab-status-legacy.5d29085f.js","./index-legacy.8a3dede6.js","./use-id-legacy.30c2e9af.js"],(function(t){"use strict";var n,i,r,o,s,c,u,l,f,d,p;return{setters:[function(t){n=t.d,i=t.s,r=t.e,o=t.i,s=t.C,c=t.$},function(t){u=t.C},function(t){l=t.L},function(t){f=t.S},function(t){d=t.C},function(t){p=t.u},function(){},function(){},function(){}],execute:function(){t("default",n({name:"help-center",data:function(){var t=this.$route.query,e="2"==t.catalogType?"公告列表":"帮助中心";return document.title=e,"accompany"===t.mode&&(t.platformType="ANALYSIS"),{list:[],dataShow:!0,dataLoading:!1,loading:!1,finished:!1,params:{catalogIds:t.catalogType||1,title:"",status:1,catalogType:t.platformType||i.platformType,page:1,rows:20}}},mounted:function(){p("帮助中心")},methods:{getList:function(){var t,n=this;return(t=regeneratorRuntime.mark((function t(){var a,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!n.dataLoading){t.next=3;break}return t.abrupt("return");case 3:return n.dataLoading=!0,a=n.params,t.next=7,r.post("/api-cms/helpCenterContent/list",{data:e({},a)});case 7:if(i=t.sent,n.dataLoading=!1,n.loading=!1,o=i.data||{},!(n.list.length>0&&1===o.pageNo)){t.next=13;break}return t.abrupt("return");case 13:n.list=n.list.concat(o.rows||[]),n.finished=o.pageNo>=o.totalPage,n.params.page=o.pageNo+1,n.dataShow=n.list.length>0,t.next=23;break;case 19:t.prev=19,t.t0=t.catch(0),n.dataShow=!1,n.finished=!0;case 23:case"end":return t.stop()}}),t,null,[[0,19]])})),function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){a(o,i,r,s,c,"next",t)}function c(t){a(o,i,r,s,c,"throw",t)}s(void 0)}))})()},onSearch:function(t){this.params.title=t,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail:function(t){this.$router.push({path:"helpCenterDetail",query:{id:t.id,catalogType:this.params.catalogType}})}},render:function(){var t,e,n=this;return o("div",null,[o(f,{offsetTop:0,position:"top",class:"mb12"},{default:function(){return[o(d,{onSearch:n.onSearch},null)]}}),this.dataShow?o(l,{loading:this.loading,"onUpdate:loading":function(t){return n.loading=t},finished:this.finished,finishedText:"没有更多了",onLoad:this.getList},(e=t=this.list.map((function(t){return o(u,{title:t.title,titleClass:"van-ellipsis",isLink:!0,onClick:function(){n.onDetail(t)}},null)})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!c(e)?t:{default:function(){return[t]}})):o(s,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无内容"},null)])}}))}}}))}();