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.
NewEduCoderBuild/p__Account__Binding__index....

1 line
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[26],{JMrj:function(t,e,n){"use strict";n.r(e);n("miYZ");var r,o=n("tsqr"),a=n("9og8"),i=(n("2qtc"),n("kLXV")),c=n("tJVT"),l=n("PpiC"),s=n("q1tI"),u=n.n(s),f=n("9kvl"),d=n("cPYB"),h=n.n(d),p=(n("+L6B"),n("2/Rp")),v=n("TJni"),m=n.n(v),g=n("m3rI"),y=function(t){var e=t.visible,n=t.onClose,r=void 0===n?function(){}:n;return u.a.createElement(i["a"],{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:m.a.modal,visible:e,title:null,width:"530px",footer:null},u.a.createElement("div",{className:m.a.wrap},u.a.createElement("iframe",{className:m.a.iframe,frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(g["a"].QQLoginCB,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,").concat(window.location.host,"#wechat_redirect")}),u.a.createElement("div",{className:"clearfix pagemancenter"},u.a.createElement(p["a"],{type:"link",onClick:r},"\u53d6\u6d88"))))},w=n("1vsH");function _(){_=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(k){l=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new j(o||[]);return r(i,"_invoke",{value:x(t,n,c)}),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(k){return{type:"throw",arg:k}}}t.wrap=s;var f={};function d(){}function h(){}function p(){}var v={};l(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(N([])));g&&g!==e&&n.call(g,a)&&(v=g);var y=p.prototype=d.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,a,i,c){var l=u(t[r],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return o("throw",t,i,c)}))}c(l.arg)}var a;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return q()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:q}}function q(){return{value:void 0,done:!0}}return h.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(b.prototype),l(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new b(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(y),l(y,c,"Generator"),l(y,a,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(function(t){t["Wechat"]="wechat",t["QQ"]="qq"})(r||(r={}));var b=function(t){var e=t.user,n=t.account,f=(t.globalSetting,t.loading,t.dispatch),d=(Object(l["a"])(t,["user","account","globalSetting","loading","dispatch"]),Object(s["useState"])({})),p=Object(c["a"])(d,2),v=p[0],m=p[1],b=Object(s["useState"])({}),x=Object(c["a"])(b,2),E=x[0],L=x[1],O=Object(s["useState"])(),j=Object(c["a"])(O,2),N=j[0],q=j[1];Object(s["useEffect"])((function(){var t,e,o=(null===(t=n.basicInfo)||void 0===t?void 0:t.open_users.find((function(t){return t.en_type===r.Wechat})))||{};m(o);var a=(null===(e=n.basicInfo)||void 0===e?void 0:e.open_users.find((function(t){return t.en_type===r.QQ})))||{};L(a)}),[n.basicInfo]);var k=function(){v.id?i["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u63d0\u793a",content:"\u662f\u5426\u786e\u5b9a\u89e3\u7ed1\u5fae\u4fe1\u8d26\u53f7\uff1f",className:h.a.modal,onOk:function(){var t=Object(a["a"])(_().mark((function t(){var r,a,i;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,f({type:"account/unbindAccount",payload:{basicInfoId:null===(r=n.basicInfo)||void 0===r?void 0:r.id,id:v.id}});case 2:a=t.sent,a&&(o["b"].info("\u89e3\u7ed1\u6210\u529f\uff01"),f({type:"account/getBasicInfo",payload:{login:null===(i=e.userInfo)||void 0===i?void 0:i.login}}));case 4:case"end":return t.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()}):q(!0)},I=function(){E.id?i["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u63d0\u793a",content:"\u662f\u5426\u786e\u5b9a\u89e3\u7ed1QQ\u8d26\u53f7\uff1f",className:h.a.modal,onOk:function(){var t=Object(a["a"])(_().mark((function t(){var r,a,i;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,f({type:"account/unbindAccount",payload:{basicInfoId:null===(r=n.basicInfo)||void 0===r?void 0:r.id,id:E.id}});case 2:a=t.sent,a&&(o["b"].info("\u89e3\u7ed1\u6210\u529f\uff01"),f({type:"account/getBasicInfo",payload:{login:null===(i=e.userInfo)||void 0===i?void 0:i.login}}));case 4:case"end":return t.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()}):S()},S=function(){var t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],e=navigator.userAgent,n=t.some((function(t){return e.includes(t)}));n?Object(w["C"])("https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(g["a"].QQLoginCB,"%2fotherloginqq&state=account,").concat(window.location.host,"&response_type=code")):window.location.href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(g["a"].QQLoginCB,"%2fotherloginqq&state=account,").concat(window.location.host,"&response_type=code")};return u.a.createElement("section",{className:h.a.wrap},u.a.createElement("div",{className:h.a.content},u.a.createElement("div",{className:"".concat(h.a.titleWrap," mt10")},u.a.createElement("div",{className:h.a.title},"\u7ed1\u5b9a\u767b\u5f55\u8d26\u53f7")),u.a.createElement("div",{className:h.a.bind},u.a.createElement("div",{className:h.a.flexRow},u.a.createElement("i",{className:"iconfont icon-weixin2 mr10 ".concat(h.a.wechatLogo)}),"\u5fae\u4fe1"),u.a.createElement("span",{className:"".concat(h.a.action," current"),onClick:k},v.id?"\u89e3\u7ed1":"\u7ed1\u5b9a")),u.a.createElement("div",{className:h.a.bind},u.a.createElement("div",{className:h.a.flexRow},u.a.createElement("i",{className:"iconfont icon-QQ mr10 ".concat(h.a.qqLogo)}),"QQ"),u.a.createElement("span",{className:"".concat(h.a.action," current"),onClick:I},E.id?"\u89e3\u7ed1":"\u7ed1\u5b9a"))),u.a.createElement("div",{className:"".concat(h.a.hint," font14")},"* \u6211\u4eec\u786e\u4fdd\u4f60\u6240\u63d0\u4f9b\u7684\u4fe1\u606f\u5747\u5904\u4e8e\u4e25\u683c\u4fdd\u5bc6\u72b6\u6001\uff0c\u4e0d\u4f1a\u6cc4\u9732"),u.a.createElement(y,{visible:N,onClose:function(){return q(!1)}}))};e["default"]=Object(f["a"])((function(t){var e=t.user,n=t.account,r=t.loading,o=t.globalSetting;return{user:e,account:n,globalSetting:o,loading:r.models.index}}))(b)},TJni:function(t,e,n){t.exports={wrap:"wrap___1CFIP",iframe:"iframe___3dd3K"}},cPYB:function(t,e,n){t.exports={wrap:"wrap___3WotC",content:"content___3MMcY",hint:"hint___CtVJ2",titleWrap:"titleWrap___2iFn9",title:"title___1U3LO",bind:"bind___2rafm",flexRow:"flexRow___2LUKT",wechatLogo:"wechatLogo___3WUMY",qqLogo:"qqLogo___3jjYt",action:"action___1tqKS",modal:"modal___MVq7X"}}}]);