You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.8 KiB

5 years ago
webpackJsonp([25],{738:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(69),r=(n.n(o),n(70)),a=n.n(r),i=n(0),c=n.n(i),l=(n(45),n(12)),u=n.n(l),p=function(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t};function s(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var f=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(h,i.Component),p(h,[{key:"componentDidMount",value:function(){var t=this.props.location.search;if(""!=t){var e=t.split("?code=")[1].split("&state="),n=e[1].split(",");u.a.get("/auth/wechat/callback.json",{params:{code:e[0]}}).then(function(t){t&&0===t.data.status&&(!0===t.data.new_user?window.location.href="https://"+n[1]+"/otherlogin?type=wechat":"account"===n[0]?window.location.href="https://"+n[1]+"/account/binding":window.location.href="https://"+n[1])}).catch(function(t){})}}},{key:"render",value:function(){return c.a.createElement("div",{className:"App",style:{minHeight:"800px",width:"100%"}},c.a.createElement("style",null,"\n\t\t\t\t\t\t .margintop{\n\t\t\t\t\t\t margin-top:20%;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t"),c.a.createElement(a.a,{size:"large",className:"margintop"}))}}]),h);function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}e.default=f}});