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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[89076],{77922:function(n,e,o){o.r(e),o.d(e,{default:function(){return P}});var c=o(7557),i=o.n(c),t=o(41498),a=o.n(t),s=o(79800),r=o.n(s),l=o(39647),d=o.n(l),u=o(59301),p=o(49389),f=o(43418),_=o(8591),h="wrap___xodza",m="content___ICbbC",g="hint___MLn02",v="titleWrap___Q3Ucy",x="title___nN0C7",w="bind___xQW3D",b="flexRow___pyjLx",y="wechatLogo___MOBmR",j="qqLogo___JZOYi",N="action___V1O9k",Q="modal___q6F2P",q=o(3113),k={wrap:"wrap___yM1g7",iframe:"iframe___rOQlC"},C=o(91689),I=o(37712),Z=function(n){var e=n.visible,o=n.onClose,c=void 0===o?function(){}:o;return(0,I.jsx)(f.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:k.modal,open:e,title:null,width:"530px",footer:null,children:(0,I.jsxs)("div",{className:k.wrap,children:[(0,I.jsx)("iframe",{className:k.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(C.Z.QQLoginCB,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,").concat(window.location.host,"#wechat_redirect")}),(0,I.jsx)("div",{className:"clearfix pagemancenter",children:(0,I.jsx)(q.ZP,{type:"link",onClick:c,children:"取消"})})]})})},S=o(83287),L=["user","account","globalSetting","loading","dispatch"],O=function(n){return n.Wechat="wechat",n.QQ="qq",n}(O||{}),P=(0,p.connect)((function(n){var e=n.user,o=n.account,c=n.loading;return{user:e,account:o,globalSetting:n.globalSetting,loading:c.models.index}}))((function(n){var e=n.user,o=n.account,c=(n.globalSetting,n.loading,n.dispatch),t=(d()(n,L),(0,u.useState)({})),s=r()(t,2),l=s[0],p=s[1],q=(0,u.useState)({}),k=r()(q,2),P=k[0],B=k[1],A=(0,u.useState)(),W=r()(A,2),T=W[0],F=W[1];(0,u.useEffect)((function(){var n,e,c=(null===(n=o.basicInfo)||void 0===n?void 0:n.open_users.find((function(n){return n.en_type===O.Wechat})))||{};p(c);var i=(null===(e=o.basicInfo)||void 0===e?void 0:e.open_users.find((function(n){return n.en_type===O.QQ})))||{};B(i)}),[o.basicInfo]);var M=function(){var n=navigator.userAgent;["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"].some((function(e){return n.includes(e)}))?(0,S.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=".concat(C.Z.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(C.Z.QQLoginCB,"%2fotherloginqq&state=account,").concat(window.location.host,"&response_type=code")};return(0,I.jsxs)("section",{className:h,children:[(0,I.jsxs)("div",{className:m,children:[(0,I.jsx)("div",{className:"".concat(v," mt10"),children:(0,I.jsx)("div",{className:x,children:"绑定登录账号"})}),(0,I.jsxs)("div",{className:w,children:[(0,I.jsxs)("div",{className:b,children:[(0,I.jsx)("i",{className:"iconfont icon-weixin2 mr10 ".concat(y)}),"微信"]}),(0,I.jsx)("span",{className:"".concat(N," current"),onClick:function(){var n;l.id?f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"是否确定解绑微信账号?",className:Q,onOk:(n=a()(i()().mark((function n(){var t,a;return i()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c({type:"account/unbindAccount",payload:{basicInfoId:null===(t=o.basicInfo)||void 0===t?void 0:t.id,id:l.id}});case 2:n.sent&&(_.ZP.info("解绑成功!"),c({type:"account/getBasicInfo",payload:{login:null===(a=e.userInfo)||void 0===a?void 0:a.login}}));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})}):F(!0)},children:l.id?"解绑":"绑定"})]}),(0,I.jsxs)("div",{className:w,children:[(0,I.jsxs)("div",{className:b,children:[(0,I.jsx)("i",{className:"iconfont icon-QQ mr10 ".concat(j)}),"QQ"]}),(0,I.jsx)("span",{className:"".concat(N," current"),onClick:function(){var n;P.id?f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"是否确定解绑QQ账号",className:Q,onOk:(n=a()(i()().mark((function n(){var t,a;return i()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c({type:"account/unbindAccount",payload:{basicInfoId:null===(t=o.basicInfo)||void 0===t?void 0:t.id,id:P.id}});case 2:n.sent&&(_.ZP.info("解绑成功!"),c({type:"account/getBasicInfo",payload:{login:null===(a=e.userInfo)||void 0===a?void 0:a.login}}));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})}):M()},children:P.id?"解绑":"绑定"})]})]}),(0,I.jsx)("div",{className:"".concat(g," font14"),children:"* 我们确保你所提供的信息均处于严格保密状态,不会泄露"}),(0,I.jsx)(Z,{visible:T,onClose:function(){return F(!1)}})]})}))}}]);