index-legacy.9ed69433.js 3.4 KB

12
  1. !function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%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 r(t,e,n,r,i,a,c){try{var o=t[a](c),s=o.value}catch(u){return void n(u)}o.done?e(s):Promise.resolve(s).then(r,i)}System.register(["./index-legacy.48c8d62c.js","./index-legacy.87ef53c1.js","./index-legacy.8cf5f94f.js","./index.module-legacy.5aed3da1.js","./index-legacy.04f465c8.js","./index-legacy.087e0425.js","./index-legacy.55fe5b03.js","./use-tab-status-legacy.6949b1de.js"],(function(t){"use strict";var n,i,a,c,o,s,u,l,f,p,d,h,y,g,b;return{setters:[function(t){n=t.d,i=t.aV,a=t.ag,c=t.r,o=t.$,s=t.c,u=t.ai,l=t.ak,f=t.m,p=t.f},function(t){d=t.O},function(t){h=t.O},function(t){y=t.s},function(t){g=t.L},function(t){b=t.C},function(){},function(){}],execute:function(){t("default",n({name:"help-center",setup:function(){var t=i(),n=a(),m=c({isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,status:!0,page:1,rows:20}}),S=function(){var t,n=(t=regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!m.isClick){t.next=3;break}return t.abrupt("return");case 3:return m.isClick=!0,t.next=6,f.post(p.platformApi+"/helpCenterContent/page",{data:e(e({},m.params),{},{catalogType:p.platformType})});case 6:if(n=t.sent,m.listState.loading=!1,r=n.data||{},!(m.list.length>0&&1===r.current)){t.next=11;break}return t.abrupt("return");case 11:m.list=m.list.concat(r.rows||[]),m.listState.finished=r.current>=r.pages,m.params.page=r.current+1,m.listState.dataShow=m.list.length>0,m.isClick=!1,t.next=23;break;case 18:t.prev=18,t.t0=t.catch(0),m.listState.dataShow=!1,m.listState.finished=!0,m.isClick=!1;case 23:case"end":return t.stop()}}),t,null,[[0,18]])})),function(){var e=this,n=arguments;return new Promise((function(i,a){var c=t.apply(e,n);function o(t){r(c,i,a,o,s,"next",t)}function s(t){r(c,i,a,o,s,"throw",t)}o(void 0)}))});return function(){return n.apply(this,arguments)}}(),j=function(t){m.params.keyword=t,m.params.page=1,m.list=[],m.listState.dataShow=!0,m.listState.loading=!1,m.listState.finished=!1,S()};return o((function(){S()})),function(){var e,r;return s("div",{class:[y.helpCenter,!m.listState.dataShow&&"emptyRootContainer"]},[s(h,{position:"top"},{default:function(){return[s(d,{onSearch:j},null)]}}),m.listState.dataShow?s(g,{finished:m.listState.finished,finishedText:" ",class:y.container,onLoad:S,immediateCheck:!1},(r=e=m.list.map((function(e){return s(b,{titleClass:[y.title,"van-ellipsis"],title:e.title,isLink:!0,onClick:function(){n.push({path:"help-detail",query:{id:e.id,source:t.query.source}})}},null)})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!l(r)?e:{default:function(){return[e]}})):s(u,{btnStatus:!1,tips:"暂无数据"},null)])}}}))}}}))}();