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....

2 lines
12 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{JMrj:function(Q,W,c){"use strict";c.r(W);var lt=c("miYZ"),z=c("tsqr"),H=c("9og8"),dt=c("2qtc"),k=c("kLXV"),$=c("tJVT"),nt=c("PpiC"),S=c("q1tI"),l=c.n(S),ot=c("9kvl"),rt=c("cPYB"),f=c.n(rt),ft=c("+L6B"),at=c("2/Rp"),it=c("TJni"),Y=c.n(it),J=c("m3rI"),ct=function(p){var m=p.visible,v=p.onClose,N=v===void 0?function(){}:v;return l.a.createElement(k.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Y.a.modal,visible:m,title:null,width:"530px",footer:null},l.a.createElement("div",{className:Y.a.wrap},l.a.createElement("iframe",{className:Y.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(J.a.QQLoginCB,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,").concat(window.location.host,"#wechat_redirect")}),l.a.createElement("div",{className:"clearfix pagemancenter"},l.a.createElement(at.a,{type:"link",onClick:N},"\u53D6\u6D88"))))},st=c("1vsH");function I(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */I=function(){return s};var s={},p=Object.prototype,m=p.hasOwnProperty,v=typeof Symbol=="function"?Symbol:{},N=v.iterator||"@@iterator",Z=v.asyncIterator||"@@asyncIterator",U=v.toStringTag||"@@toStringTag";function E(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{E({},"")}catch(e){E=function(n,o,a){return n[o]=a}}function X(e,t,n,o){var a=t&&t.prototype instanceof C?t:C,r=Object.create(a.prototype),u=new _(o||[]);return r._invoke=function(y,L,i){var d="suspendedStart";return function(O,tt){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(O==="throw")throw tt;return b()}for(i.method=O,i.arg=tt;;){var et=i.delegate;if(et){var K=G(et,i);if(K){if(K===h)continue;return K}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var B=T(y,L,i);if(B.type==="normal"){if(d=i.done?"completed":"suspendedYield",B.arg===h)continue;return{value:B.arg,done:i.done}}B.type==="throw"&&(d="completed",i.method="throw",i.arg=B.arg)}}}(e,n,u),r}function T(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(o){return{type:"throw",arg:o}}}s.wrap=X;var h={};function C(){}function j(){}function w(){}var P={};E(P,N,function(){return this});var M=Object.getPrototypeOf,D=M&&M(M(g([])));D&&D!==p&&m.call(D,N)&&(P=D);var R=w.prototype=C.prototype=Object.create(P);function q(e){["next","throw","return"].forEach(function(t){E(e,t,function(n){return this._invoke(t,n)})})}function A(e,t){function n(a,r,u,y){var L=T(e[a],e,r);if(L.type!=="throw"){var i=L.arg,d=i.value;return d&&typeof d=="object"&&m.call(d,"__await")?t.resolve(d.__await).then(function(O){n("next",O,u,y)},function(O){n("throw",O,u,y)}):t.resolve(d).then(function(O){i.value=O,u(i)},function(O){return n("throw",O,u,y)})}y(L.arg)}var o;this._invoke=function(a,r){function u(){return new t(function(y,L){n(a,r,y,L)})}return o=o?o.then(u,u):u()}}function G(e,t){var n=e.iterator[t.method];if(n===void 0){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=void 0,G(e,t),t.method==="throw"))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=T(n,e.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function V(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function g(e){if(e){var t=e[N];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,o=function a(){for(;++n<e.length;)if(m.call(e,n))return a.value=e[n],a.done=!1,a;return a.value=void 0,a.done=!0,a};return o.next=o}}return{next:b}}function b(){return{value:void 0,done:!0}}return j.prototype=w,E(R,"constructor",w),E(w,"constructor",j),j.displayName=E(w,U,"GeneratorFunction"),s.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===j||(t.displayName||t.name)==="GeneratorFunction")},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,E(e,U,"GeneratorFunction")),e.prototype=Object.create(R),e},s.awrap=function(e){return{__await:e}},q(A.prototype),E(A.prototype,Z,function(){return this}),s.AsyncIterator=A,s.async=function(e,t,n,o,a){a===void 0&&(a=Promise);var r=new A(X(e,t,n,o),a);return s.isGeneratorFunction(t)?r:r.next().then(function(u){return u.done?u.value:r.next()})},q(R),E(R,U,"Generator"),E(R,N,function(){return this}),E(R,"toString",function(){return"[object Generator]"}),s.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function o(){for(;t.length;){var a=t.pop();if(a in e)return o.value=a,o.done=!1,o}return o.done=!0,o}},s.values=g,_.prototype={constructor:_,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(x),!t)for(var n in this)n.charAt(0)==="t"&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(i,d){return u.type="throw",u.arg=t,n.next=i,d&&(n.method="next",n.arg=void 0),!!d}for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],u=r.completion;if(r.tryLoc==="root")return o("end");if(r.tryLoc<=this.prev){var y=m.call(r,"catchLoc"),L=m.call(r,"finallyLoc");if(y&&L){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(y){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!L)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(t,n){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&m.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}}r&&(t==="break"||t==="continue")&&r.tryLoc<=n&&n<=r.finallyLoc&&(r=null);var u=r?r.completion:{};return u.type=t,u.arg=n,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(u)},complete:function(t,n){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),x(o),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc===t){var a=o.completion;if(a.type==="throw"){var r=a.arg;x(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:g(t),resultName:n,nextLoc:o},this.method==="next"&&(this.arg=void 0),h}},s}var F;(function(s){s.Wechat="wechat",s.QQ="qq"})(F||(F={}));var ut=function(p){var m=p.user,v=p.account,N=p.globalSetting,Z=p.loading,U=p.dispatch,E=Object(nt.a)(p,["user","account","globalSetting","loading","dispatch"]),X=Object(S.useState)({}),T=Object($.a)(X,2),h=T[0],C=T[1],j=Object(S.useState)({}),w=Object($.a)(j,2),P=w[0],M=w[1],D=Object(S.useState)(),R=Object($.a)(D,2),q=R[0],A=R[1];Object(S.useEffect)(function(){var _,g,b=((_=v.basicInfo)===null||_===void 0?void 0:_.open_users.find(function(t){return t.en_type===F.Wechat}))||{};C(b);var e=((g=v.basicInfo)===null||g===void 0?void 0:g.open_users.find(function(t){return t.en_type===F.QQ}))||{};M(e)},[v.basicInfo]);var G=function(){if(h.id){k.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:f.a.modal,onOk:function(){var g=Object(H.a)(I().mark(function e(){var t,n,o;return I().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,U({type:"account/unbindAccount",payload:{basicInfoId:(t=v.basicInfo)===null||t===void 0?void 0:t.id,id:h.id}});case 2:n=r.sent,n&&(z.b.info("\u89E3\u7ED1\u6210\u529F\uFF01"),U({type:"account/getBasicInfo",payload:{login:(o=m.userInfo)===null||o===void 0?void 0:o.login}}));case 4:case"end":return r.stop()}},e)}));function b(){return g.apply(this,arguments)}return b}()});return}A(!0)},V=function(){if(P.id){k.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u5B9A\u89E3\u7ED1QQ\u8D26\u53F7\uFF1F",className:f.a.modal,onOk:function(){var g=Object(H.a)(I().mark(function e(){var t,n,o;return I().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,U({type:"account/unbindAccount",payload:{basicInfoId:(t=v.basicInfo)===null||t===void 0?void 0:t.id,id:P.id}});case 2:n=r.sent,n&&(z.b.info("\u89E3\u7ED1\u6210\u529F\uFF01"),U({type:"account/getBasicInfo",payload:{login:(o=m.userInfo)===null||o===void 0?void 0:o.login}}));case 4:case"end":return r.stop()}},e)}));function b(){return g.apply(this,arguments)}return b}()});return}x()},x=function(){var g=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],b=navigator.userAgent,e=g.some(function(t){return b.includes(t)});e?Object(st.I)("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(J.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(J.a.QQLoginCB,"%2fotherloginqq&state=account,").concat(window.location.host,"&response_type=code")};return l.a.createElement("section",{className:f.a.wrap},l.a.createElement("div",{className:f.a.content},l.a.createElement("div",{className:"".concat(f.a.titleWrap," mt10")},l.a.createElement("div",{className:f.a.title},"\u7ED1\u5B9A\u767B\u5F55\u8D26\u53F7")),l.a.createElement("div",{className:f.a.bind},l.a.createElement("div",{className:f.a.flexRow},l.a.createElement("i",{className:"iconfont icon-weixin2 mr10 ".concat(f.a.wechatLogo)}),"\u5FAE\u4FE1"),l.a.createElement("span",{className:"".concat(f.a.action," current"),onClick:G},h.id?"\u89E3\u7ED1":"\u7ED1\u5B9A")),l.a.createElement("div",{className:f.a.bind},l.a.createElement("div",{className:f.a.flexRow},l.a.createElement("i",{className:"iconfont icon-QQ mr10 ".concat(f.a.qqLogo)}),"QQ"),l.a.createElement("span",{className:"".concat(f.a.action," current"),onClick:V},P.id?"\u89E3\u7ED1":"\u7ED1\u5B9A"))),l.a.createElement("div",{className:"".concat(f.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"),l.a.createElement(ct,{visible:q,onClose:function(){return A(!1)}}))},ht=W.default=Object(ot.a)(function(s){var p=s.user,m=s.account,v=s.loading,N=s.globalSetting;return{user:p,account:m,globalSetting:N,loading:v.models.index}})(ut)},TJni:function(Q,W,c){Q.exports={wrap:"wrap___1CFIP",iframe:"iframe___3dd3K"}},cPYB:function(Q,W,c){Q.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"}}}]);