main.js
13.4 KB
webpackJsonp([7],{1126:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.showSubmit=t.submitResult=t.doSearch=t.getBaseData=void 0;var o=n(9),i=r(o),a=n(5),u=r(a),s=n(1127);t.getBaseData=function(e){var t={method:"POST",url:"/api/fullsearch/base/getBaseData",params:(0,u.default)({},e,{ismobile:1,sourceType:"MOBILE"})};return i.default.callApi(t).then(s.catchApiError)},t.doSearch=function(e){var t={method:"POST",url:"/api/fullsearch/mobile/search",params:(0,u.default)({},e,{ismobile:1})};return i.default.callApi(t).then(s.catchApiError)},t.submitResult=function(e){var t={method:"POST",url:"/api/fullsearch/serveset/submitResult",params:(0,u.default)({},e,{ismobile:1})};return i.default.callApi(t).then(s.catchApiError)},t.showSubmit=function(e){var t={method:"POST",url:"/api/fullsearch/serveset/showSubmit",params:(0,u.default)({},e,{ismobile:1})};return i.default.callApi(t).then(s.catchApiError)}},1127:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(60),i=r(o),a=n(73),u=r(a),s=n(9),l=r(s),c=l.default.getLabel,f={catchApiError:function(e){return new u.default(function(t,n){if(!e.api_status)return i.default.fail(e.msg||c(30651,"\u64cd\u4f5c\u5931\u8d25")),void n(e);t(e)})}};t.default=f},1128:function(e,t){},1129:function(e,t){},1130:function(e,t){},1131:function(e,t){},1132:function(e,t){},1133:function(e,t){},483:function(e,t,n){"use strict";n(1128),n(1129),n(1130),n(1131),n(1132),n(1133)},724:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(9),i=r(o),a=n(8),u=r(a),s=n(1),l=r(s),c=n(4),f=r(c),d=n(2),p=r(d),h=n(3),y=r(h),b=n(0),m=r(b),v=n(17),g=r(v),S=n(11),C=n(10),w=n(775),_=n(776),R=r(_);n(483);var x={eSearch:(0,w.asyncComponent)({resolve:function(){return n.e(4).then(n.bind(null,1257))}}),searchList:(0,w.asyncComponent)({resolve:function(){return n.e(5).then(n.bind(null,1253))}})},O=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,y.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){return m.default.createElement(C.Provider,R.default,m.default.createElement(S.HashRouter,null,m.default.createElement(S.Route,{name:"home",path:"/",render:function(){return m.default.createElement(S.Switch,null,m.default.createElement(S.Route,{name:"esearch",breadcrumbName:"\u5fae\u641c",path:"/esearch",component:x.eSearch}),m.default.createElement(S.Route,{name:"searchlist",breadcrumbName:"\u5fae\u641c",path:"/searchlist",component:x.searchList}))}})))}}]),t}(m.default.Component);i.default.getLocaleLabel("esearch_mobile",function(){g.default.render(m.default.createElement(O,null),document.getElementById("root"))})},775:function(e,t,n){"use strict";function r(e){return e&&"object"===typeof e&&"default"in e?e.default:e}function o(e){var t,n,r=e.name,o=e.resolve,i=e.autoResolveES2015Default,f=void 0===i||i,y=e.serverMode,b=void 0===y?"resolve":y,v=e.LoadingComponent,g=e.ErrorComponent;if(-1===m.indexOf(b))throw new Error("Invalid serverMode provided to asyncComponent");var S=["node","browser"].indexOf(e.env)>-1?e.env:"undefined"===typeof window?"node":"browser",C={id:null,module:null,error:null,resolver:null,resolving:!1,asyncComponents:null,asyncComponentsAncestor:null},w=function(){return null==C.module&&null==C.error&&!C.resolving&&"undefined"!==typeof window},_=function(e){return f&&null!=e&&("function"===typeof e||"object"===("undefined"===typeof e?"undefined":s(e)))&&e.default?e.default:e},R=function(){if(null==C.resolver){C.resolving=!0;try{C.resolver=Promise.resolve(o())}catch(e){C.resolver=Promise.reject(e)}}return C.resolver};return n=t=function(e){function t(){return l(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),c(t,[{key:"getChildContext",value:function(){return{asyncComponentsAncestor:null==C.asyncComponents?null:{isBoundary:"boundary"===b}}}},{key:"componentWillMount",value:function(){null!=this.context.asyncComponents&&(C.asyncComponents=this.context.asyncComponents,C.asyncComponentsAncestor=this.context.asyncComponentsAncestor,C.id||(C.id=this.context.asyncComponents.getNextId()))}},{key:"bootstrap",value:function(){var e=this,t=function(){return e.resolveModule().then(function(e){return void 0!==e&&void 0})};if("browser"===S){var n=C.asyncComponents,r=n.shouldRehydrate,o=n.getError,i=o(C.id);return i?(C.error=i,!1):!!r(C.id)&&t()}var a=null!=C.asyncComponentsAncestor&&C.asyncComponentsAncestor.isBoundary;return"defer"!==b&&!a&&t()}},{key:"componentDidMount",value:function(){w()&&this.resolveModule()}},{key:"resolveModule",value:function(){var e=this;return R().then(function(e){return null!=C.asyncComponents&&C.asyncComponents.resolved(C.id),C.module=e,C.error=null,C.resolving=!1,e}).catch(function(e){var t=e.message,n=e.stack,r={message:t,stack:n};null!=C.asyncComponents&&C.asyncComponents.failed(C.id,r),C.error=r,C.resolving=!1,g||console.error(r)}).then(function(t){if(!e.unmounted)return e.context.reactAsyncBootstrapperRunning||"browser"!==S||e.forceUpdate(),t})}},{key:"componentWillUnmount",value:function(){this.unmounted=!0}},{key:"render",value:function(){var e=C.module,t=C.error;if(t)return g?a.createElement(g,d({},this.props,{error:t})):null;var n=_(e);return n?a.createElement(n,this.props):v?a.createElement(v,this.props):null}}]),t}(a.Component),t.displayName=r||"AsyncComponent",t.contextTypes={asyncComponentsAncestor:u.shape({isBoundary:u.bool}),asyncComponents:u.shape({getNextId:u.func.isRequired,resolved:u.func.isRequired,shouldRehydrate:u.func.isRequired})},t.childContextTypes={asyncComponentsAncestor:u.shape({isBoundary:u.bool})},n}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=r(i),u=r(n(16)),s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},y=function(){var e=0,t={},n={};return{getNextId:function(){return e+=1},resolved:function(e){t[e]=!0},failed:function(e,t){n[e]=t},getState:function(){return{resolved:Object.keys(t).reduce(function(e,t){return Object.assign(e,f({},t,!0))},{}),errors:n}}}},b=function(e){function t(){return l(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),c(t,[{key:"componentWillMount",value:function(){this.asyncContext=this.props.asyncContext||y(),this.rehydrateState=this.props.rehydrateState}},{key:"getChildContext",value:function(){var e=this;return{asyncComponents:{getNextId:this.asyncContext.getNextId,resolved:this.asyncContext.resolved,failed:this.asyncContext.failed,shouldRehydrate:function(t){var n=e.rehydrateState.resolved[t];return delete e.rehydrateState.resolved[t],n},getError:function(t){return e.rehydrateState.errors&&e.rehydrateState.errors[t]}}}}},{key:"render",value:function(){return a.Children.only(this.props.children)}}]),t}(i.Component);b.propTypes={children:u.node.isRequired,asyncContext:u.shape({getNextId:u.func.isRequired,resolved:u.func.isRequired,failed:u.func.isRequired,getState:u.func.isRequired}),rehydrateState:u.shape({resolved:u.object})},b.defaultProps={asyncContext:void 0,rehydrateState:{resolved:{}}},b.childContextTypes={asyncComponents:u.shape({getNextId:u.func.isRequired,resolved:u.func.isRequired,failed:u.func.isRequired,shouldRehydrate:u.func.isRequired,getError:u.func.isRequired}).isRequired};var m=["resolve","defer","boundary"];t.AsyncComponentProvider=b,t.createAsyncContext=y,t.asyncComponent=o},776:function(e,t,n){"use strict";var r=n(777),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i={esearchStore:new o.default};e.exports=i},777:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){n&&(0,P.default)(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function i(e,t,n,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,u,s,l,c,f,d,p,h,y,b,m,v,g,S,C,w,_,R,x,O=n(21),P=r(O),E=n(29),z=r(E),A=n(20),M=r(A),k=n(372),j=r(k),T=n(60),q=r(T),B=n(5),L=r(B),I=n(1),N=r(I),D=n(9),H=r(D),K=n(13),W=n(1126),U=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(W),J=H.default.getLabel,F=(a=function e(){var t=this;(0,N.default)(this,e),o(this,"showCheck",u,this),o(this,"listAd",s,this),o(this,"layout",l,this),o(this,"layoutSearch",c,this),o(this,"contentType",f,this),o(this,"perHot",d,this),o(this,"sysHot",p,this),o(this,"searchList",h,this),o(this,"urlMapping",y,this),o(this,"searchResult",b,this),o(this,"pageCount",m,this),o(this,"pageindex",v,this),o(this,"loading",g,this),o(this,"btnShow",S,this),o(this,"isSearchStart",C,this),o(this,"searchStatus",w,this),o(this,"skipSearchParams",_,this),o(this,"baseDatas",R,this),o(this,"setParams",x,this),this.getBaseData=function(){U.getBaseData().then(function(e){e&&(e.contentType&&(t.contentType=e.contentType),e.hotKey&&(t.perHot=e.hotKey.per,t.sysHot=e.hotKey.sys,t.urlMapping=e.urlMapping),t.baseDatas=e)})},this.doSearch=function(e){var n=(0,L.default)({},e,{sourceType:"MOBILE"});t.isSearchStart=!1,t.loading=!0,n=(0,L.default)({},n,t.skipSearchParams),t.skipSearchParams.currentPage=e.pageIndex,U.doSearch(n).then(function(e){t.loading=!1,t.searchStatus=e.status,e&&e.api_status&&(t.skipSearchParams.lastRealNumber=e.lastRealNumber||-1,Array.isArray(e.list)&&(t.searchList=t.searchList.concat(e.list)),t.searchResult=e.result,t.pageCount=e.pagecount,t.pageindex=e.pageindex,t.isSearchStart=!0),e&&"-1"===e.status&&q.default.offline(J("131448","\u67e5\u8be2\u8d85\u65f6\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002"),2)})},this.submitResult=function(e){var t=(0,L.default)({},e,{sourceType:"MOBILE"});U.submitResult(t).then()},this.showSubmit=function(e){U.showSubmit(e).then(function(e){t.btnShow=e.ret})}},u=i(a.prototype,"showCheck",[K.observable],{enumerable:!0,initializer:function(){return!1}}),s=i(a.prototype,"listAd",[K.observable],{enumerable:!0,initializer:function(){return new j.default.Store({route:"/esearch",id:"search"})}}),l=i(a.prototype,"layout",[K.observable],{enumerable:!0,initializer:function(){return new M.default.Store({route:"/esearch",id:"list"})}}),c=i(a.prototype,"layoutSearch",[K.observable],{enumerable:!0,initializer:function(){return new M.default.Store({route:"/esearch",id:"search"})}}),f=i(a.prototype,"contentType",[K.observable],{enumerable:!0,initializer:function(){return[]}}),d=i(a.prototype,"perHot",[K.observable],{enumerable:!0,initializer:function(){return[]}}),p=i(a.prototype,"sysHot",[K.observable],{enumerable:!0,initializer:function(){return[]}}),h=i(a.prototype,"searchList",[K.observable],{enumerable:!0,initializer:function(){return[]}}),y=i(a.prototype,"urlMapping",[K.observable],{enumerable:!0,initializer:function(){return[]}}),b=i(a.prototype,"searchResult",[K.observable],{enumerable:!0,initializer:function(){return""}}),m=i(a.prototype,"pageCount",[K.observable],{enumerable:!0,initializer:function(){return""}}),v=i(a.prototype,"pageindex",[K.observable],{enumerable:!0,initializer:function(){return""}}),g=i(a.prototype,"loading",[K.observable],{enumerable:!0,initializer:function(){return!1}}),S=i(a.prototype,"btnShow",[K.observable],{enumerable:!0,initializer:function(){return!1}}),C=i(a.prototype,"isSearchStart",[K.observable],{enumerable:!0,initializer:function(){return!0}}),w=i(a.prototype,"searchStatus",[K.observable],{enumerable:!0,initializer:function(){return""}}),_=i(a.prototype,"skipSearchParams",[K.observable],{enumerable:!0,initializer:function(){return{currentPage:0,lastRealNumber:0}}}),R=i(a.prototype,"baseDatas",[K.observable],{enumerable:!0,initializer:function(){return{}}}),x=i(a.prototype,"setParams",[K.action],{enumerable:!0,initializer:function(){var e=this;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,z.default)(t).forEach(function(n){e[n]=t[n]})}}}),a);t.default=F}},[724]);
//# sourceMappingURL=main.js.map?v=edcac4e5