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
5.0 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9076],{11769:function(j,y,u){u.r(y),u.d(y,{default:function(){return $}});var e=u(67294),B=u(35973),p=u(14446),F=u(2453),a={wrap:"wrap___xodza",content:"content___ICbbC",hint:"hint___MLn02",titleWrap:"titleWrap___Q3Ucy",title:"title___nN0C7",bind:"bind___xQW3D",flexRow:"flexRow___pyjLx",wechatLogo:"wechatLogo___MOBmR",qqLogo:"qqLogo___JZOYi",action:"action___V1O9k",modal:"modal___q6F2P"},Q=u(71577),h={wrap:"wrap___yM1g7",iframe:"iframe___rOQlC"},v=u(11320);const C=({visible:t,onClose:i=()=>{}})=>e.createElement(p.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:h.modal,open:t,title:null,width:"530px",footer:null},e.createElement("div",{className:h.wrap},e.createElement("iframe",{className:h.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=${v.Z.QQLoginCB}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,${window.location.host}#wechat_redirect`}),e.createElement("div",{className:"clearfix pagemancenter"},e.createElement(Q.ZP,{type:"link",onClick:i},"\u53D6\u6D88"))));var N=u(28706),b=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,I=(t,i)=>{var o={};for(var n in t)A.call(t,n)&&i.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&b)for(var n of b(t))i.indexOf(n)<0&&O.call(t,n)&&(o[n]=t[n]);return o},D=(t,i,o)=>new Promise((n,E)=>{var q=c=>{try{m(o.next(c))}catch(d){E(d)}},r=c=>{try{m(o.throw(c))}catch(d){E(d)}},m=c=>c.done?n(c.value):Promise.resolve(c.value).then(q,r);m((o=o.apply(t,i)).next())}),P=(t=>(t.Wechat="wechat",t.QQ="qq",t))(P||{});const L=t=>{var i=t,{user:o,account:n,globalSetting:E,loading:q,dispatch:r}=i,m=I(i,["user","account","globalSetting","loading","dispatch"]);const[c,d]=(0,e.useState)({}),[g,W]=(0,e.useState)({}),[S,x]=(0,e.useState)();(0,e.useEffect)(()=>{var l,s;const f=((l=n.basicInfo)==null?void 0:l.open_users.find(w=>w.en_type==="wechat"))||{};d(f);const _=((s=n.basicInfo)==null?void 0:s.open_users.find(w=>w.en_type==="qq"))||{};W(_)},[n.basicInfo]);const k=()=>{if(c.id){p.default.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:a.modal,onOk:()=>D(void 0,null,function*(){var l,s;(yield r({type:"account/unbindAccount",payload:{basicInfoId:(l=n.basicInfo)==null?void 0:l.id,id:c.id}}))&&(F.ZP.info("\u89E3\u7ED1\u6210\u529F\uFF01"),r({type:"account/getBasicInfo",payload:{login:(s=o.userInfo)==null?void 0:s.login}}))})});return}x(!0)},Z=()=>{if(g.id){p.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u5B9A\u89E3\u7ED1QQ\u8D26\u53F7\uFF1F",className:a.modal,onOk:()=>D(void 0,null,function*(){var l,s;(yield r({type:"account/unbindAccount",payload:{basicInfoId:(l=n.basicInfo)==null?void 0:l.id,id:g.id}}))&&(F.ZP.info("\u89E3\u7ED1\u6210\u529F\uFF01"),r({type:"account/getBasicInfo",payload:{login:(s=o.userInfo)==null?void 0:s.login}}))})});return}R()},R=()=>{const l=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];var s=navigator.userAgent;l.some(_=>s.includes(_))?(0,N.xg)(`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=${v.Z.QQLoginCB}%2fotherloginqq&state=account,${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=${v.Z.QQLoginCB}%2fotherloginqq&state=account,${window.location.host}&response_type=code`};return e.createElement("section",{className:a.wrap},e.createElement("div",{className:a.content},e.createElement("div",{className:`${a.titleWrap} mt10`},e.createElement("div",{className:a.title},"\u7ED1\u5B9A\u767B\u5F55\u8D26\u53F7")),e.createElement("div",{className:a.bind},e.createElement("div",{className:a.flexRow},e.createElement("i",{className:`iconfont icon-weixin2 mr10 ${a.wechatLogo}`}),"\u5FAE\u4FE1"),e.createElement("span",{className:`${a.action} current`,onClick:k},c.id?"\u89E3\u7ED1":"\u7ED1\u5B9A")),e.createElement("div",{className:a.bind},e.createElement("div",{className:a.flexRow},e.createElement("i",{className:`iconfont icon-QQ mr10 ${a.qqLogo}`}),"QQ"),e.createElement("span",{className:`${a.action} current`,onClick:Z},g.id?"\u89E3\u7ED1":"\u7ED1\u5B9A"))),e.createElement("div",{className:`${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"),e.createElement(C,{visible:S,onClose:()=>x(!1)}))};var $=(0,B.connect)(({user:t,account:i,loading:o,globalSetting:n})=>({user:t,account:i,globalSetting:n,loading:o.models.index}))(L)}}]);