main.js 12.4 KB
webpackJsonp([6],{1122:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendSms=t.getBaseData=void 0;var o=n(9),i=r(o),u=n(5),s=r(u),a=n(1123);t.getBaseData=function(e){var t={method:"POST",url:"/api/sms/base/getBaseData",params:(0,s.default)({},e)};return i.default.callApi(t).then(a.catchApiError)},t.sendSms=function(e){var t={method:"POST",url:"/api/sms/base/sendSms",params:(0,s.default)({},e)};return i.default.callApi(t).then(a.catchApiError)}},1123: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(72),i=r(o),u=n(73),s=r(u),a=n(9),l=r(a),c=l.default.getLabel,f={catchApiError:function(e){return new s.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},1124:function(e,t,n){"use strict";n(1125),n(1126),n(1127),n(1128),n(1129),n(1130)},1125:function(e,t){},1126:function(e,t){},1127:function(e,t){},1128:function(e,t){},1129:function(e,t){},1130:function(e,t){},722:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(347),i=r(o),u=n(8),s=r(u),a=n(1),l=r(a),c=n(4),f=r(c),d=n(2),p=r(d),m=n(3),h=r(m),y=n(9),b=r(y),v=n(0),C=r(v),g=n(17),w=r(g),S=n(11),_=n(10),x=n(776),O=n(777),R=r(O);n(1124);var z=(b.default.getLabel,{Sms:(0,x.asyncComponent)({resolve:function(){return n.e(4).then(n.bind(null,1256))}})}),E=function(e){function t(){var e,n,r,o;(0,l.default)(this,t);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return n=r=(0,p.default)(this,(e=t.__proto__||(0,s.default)(t)).call.apply(e,[this].concat(u))),r.getLocaleLabel=b.default.getLocaleLabel,o=n,(0,p.default)(r,o)}return(0,h.default)(t,e),(0,f.default)(t,[{key:"onHomePageClick",value:function(){window.location.href="/#/"}},{key:"render",value:function(){var e=this;return C.default.createElement(_.Provider,R.default,C.default.createElement(S.HashRouter,null,C.default.createElement(i.default,{onClick:function(){return e.onHomePageClick()}},C.default.createElement(S.Route,{name:"home",path:"/",render:function(){return C.default.createElement(S.Switch,null,C.default.createElement(S.Route,{name:"sms",breadcrumbName:"\u77ed\u4fe1",path:"/sendSms",component:z.Sms}))}}))))}}]),t}(C.default.Component);b.default.getLocaleLabel("sms_mobile",function(){w.default.render(C.default.createElement(E,null),document.getElementById("root"))})},776: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,h=e.serverMode,y=void 0===h?"resolve":h,v=e.LoadingComponent,C=e.ErrorComponent;if(-1===b.indexOf(y))throw new Error("Invalid serverMode provided to asyncComponent");var g=["node","browser"].indexOf(e.env)>-1?e.env:"undefined"===typeof window?"node":"browser",w={id:null,module:null,error:null,resolver:null,resolving:!1,asyncComponents:null,asyncComponentsAncestor:null},S=function(){return null==w.module&&null==w.error&&!w.resolving&&"undefined"!==typeof window},_=function(e){return f&&null!=e&&("function"===typeof e||"object"===("undefined"===typeof e?"undefined":a(e)))&&e.default?e.default:e},x=function(){if(null==w.resolver){w.resolving=!0;try{w.resolver=Promise.resolve(o())}catch(e){w.resolver=Promise.reject(e)}}return w.resolver};return n=t=function(e){function t(){return l(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),c(t,[{key:"getChildContext",value:function(){return{asyncComponentsAncestor:null==w.asyncComponents?null:{isBoundary:"boundary"===y}}}},{key:"componentWillMount",value:function(){null!=this.context.asyncComponents&&(w.asyncComponents=this.context.asyncComponents,w.asyncComponentsAncestor=this.context.asyncComponentsAncestor,w.id||(w.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"===g){var n=w.asyncComponents,r=n.shouldRehydrate,o=n.getError,i=o(w.id);return i?(w.error=i,!1):!!r(w.id)&&t()}var u=null!=w.asyncComponentsAncestor&&w.asyncComponentsAncestor.isBoundary;return"defer"!==y&&!u&&t()}},{key:"componentDidMount",value:function(){S()&&this.resolveModule()}},{key:"resolveModule",value:function(){var e=this;return x().then(function(e){return null!=w.asyncComponents&&w.asyncComponents.resolved(w.id),w.module=e,w.error=null,w.resolving=!1,e}).catch(function(e){var t=e.message,n=e.stack,r={message:t,stack:n};null!=w.asyncComponents&&w.asyncComponents.failed(w.id,r),w.error=r,w.resolving=!1,C||console.error(r)}).then(function(t){if(!e.unmounted)return e.context.reactAsyncBootstrapperRunning||"browser"!==g||e.forceUpdate(),t})}},{key:"componentWillUnmount",value:function(){this.unmounted=!0}},{key:"render",value:function(){var e=w.module,t=w.error;if(t)return C?u.createElement(C,d({},this.props,{error:t})):null;var n=_(e);return n?u.createElement(n,this.props):v?u.createElement(v,this.props):null}}]),t}(u.Component),t.displayName=r||"AsyncComponent",t.contextTypes={asyncComponentsAncestor:s.shape({isBoundary:s.bool}),asyncComponents:s.shape({getNextId:s.func.isRequired,resolved:s.func.isRequired,shouldRehydrate:s.func.isRequired})},t.childContextTypes={asyncComponentsAncestor:s.shape({isBoundary:s.bool})},n}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),u=r(i),s=r(n(16)),a="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)},m=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},h=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}}}},y=function(e){function t(){return l(this,t),m(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),c(t,[{key:"componentWillMount",value:function(){this.asyncContext=this.props.asyncContext||h(),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 u.Children.only(this.props.children)}}]),t}(i.Component);y.propTypes={children:s.node.isRequired,asyncContext:s.shape({getNextId:s.func.isRequired,resolved:s.func.isRequired,failed:s.func.isRequired,getState:s.func.isRequired}),rehydrateState:s.shape({resolved:s.object})},y.defaultProps={asyncContext:void 0,rehydrateState:{resolved:{}}},y.childContextTypes={asyncComponents:s.shape({getNextId:s.func.isRequired,resolved:s.func.isRequired,failed:s.func.isRequired,shouldRehydrate:s.func.isRequired,getError:s.func.isRequired}).isRequired};var b=["resolve","defer","boundary"];t.AsyncComponentProvider=y,t.createAsyncContext=h,t.asyncComponent=o},777:function(e,t,n){"use strict";var r=n(778),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i={smsStore:new o.default};e.exports=i},778:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){n&&(0,O.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 u,s,a,l,c,f,d,p,m,h,y,b,v,C,g,w,S,_,x=n(20),O=r(x),R=n(28),z=r(R),E=n(46),P=r(E),j=n(47),A=r(j),k=n(1),M=r(k),q=n(13),H=n(1122),B=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}(H),I=(u=function e(){var t=this;(0,M.default)(this,e),o(this,"browserHrm",s,this),o(this,"browserHrmValue",a,this),o(this,"browserClient",l,this),o(this,"browserClientValue",c,this),o(this,"hrmids",f,this),o(this,"crmids",d,this),o(this,"telArr",p,this),o(this,"smsContent",m,this),o(this,"successflag",h,this),o(this,"loading",y,this),o(this,"canSend",b,this),o(this,"isGov",v,this),o(this,"sendCrm",C,this),o(this,"showCusSign",g,this),o(this,"showReply",w,this),o(this,"listArr",S,this),o(this,"setParams",_,this),this.sendSms=function(e,n){B.sendSms(e).then(function(e){t.successflag=e.successflag,e.successflag&&t.setParams({browserHrmValue:[],browserClientValue:[],listArr:[],smsContent:"",hrmids:[],crmids:[]}),"function"===typeof n&&n()})},this.getBaseData=function(e){B.getBaseData(e).then(function(e){t.loading=!1,t.canSend=e.canSend,t.isGov=e.isGov,t.sendCrm=e.sendCrm,t.browserHrmValue=e.sendHrm,t.smsContent=e.msg,e.sendHrm&&e.sendHrm.map(function(e){return t.hrmids.push(e.id),""}),t.browserClientValue=e.sendCrm,e.sendCrm&&e.sendCrm.map(function(e){return t.crmids.push(e.id),""}),t.showCusSign=e.showCusSign,t.showReply=e.showReply})}},s=i(u.prototype,"browserHrm",[q.observable],{enumerable:!0,initializer:function(){return new A.default.Store({route:"/sendSms",id:"receivehrm"})}}),a=i(u.prototype,"browserHrmValue",[q.observable],{enumerable:!0,initializer:function(){return[]}}),l=i(u.prototype,"browserClient",[q.observable],{enumerable:!0,initializer:function(){return new P.default.Store({route:"/sendSms",id:"clienthrm"})}}),c=i(u.prototype,"browserClientValue",[q.observable],{enumerable:!0,initializer:function(){return[]}}),f=i(u.prototype,"hrmids",[q.observable],{enumerable:!0,initializer:function(){return[]}}),d=i(u.prototype,"crmids",[q.observable],{enumerable:!0,initializer:function(){return[]}}),p=i(u.prototype,"telArr",[q.observable],{enumerable:!0,initializer:function(){return""}}),m=i(u.prototype,"smsContent",[q.observable],{enumerable:!0,initializer:function(){return""}}),h=i(u.prototype,"successflag",[q.observable],{enumerable:!0,initializer:function(){return!1}}),y=i(u.prototype,"loading",[q.observable],{enumerable:!0,initializer:function(){return!0}}),b=i(u.prototype,"canSend",[q.observable],{enumerable:!0,initializer:function(){return!0}}),v=i(u.prototype,"isGov",[q.observable],{enumerable:!0,initializer:function(){return!0}}),C=i(u.prototype,"sendCrm",[q.observable],{enumerable:!0,initializer:function(){return[]}}),g=i(u.prototype,"showCusSign",[q.observable],{enumerable:!0,initializer:function(){return!0}}),w=i(u.prototype,"showReply",[q.observable],{enumerable:!0,initializer:function(){return!0}}),S=i(u.prototype,"listArr",[q.observable],{enumerable:!0,initializer:function(){return[]}}),_=i(u.prototype,"setParams",[q.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]})}}}),u);t.default=I}},[722]);
//# sourceMappingURL=main.js.map?v=2d6d2404