Auto Submit

pull/1/head
autosubmit 8 months ago
parent f937cd8584
commit f64723b908

@ -1 +0,0 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7333],{76904:function(S,f,o){o.r(f);var s=o(59301),i=o(25690),w=o(62957),O=o(458),_=o(38986),h=o(59301),m=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,P=(e,u)=>{var a={};for(var t in e)p.call(e,t)&&u.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&m)for(var t of m(e))u.indexOf(t)<0&&y.call(e,t)&&(a[t]=e[t]);return a},D=(e,u,a)=>new Promise((t,d)=>{var v=n=>{try{r(a.next(n))}catch(l){d(l)}},E=n=>{try{r(a.throw(n))}catch(l){d(l)}},r=n=>n.done?t(n.value):Promise.resolve(n.value).then(v,E);r((a=a.apply(e,u)).next())});const F=e=>{var u=e,{dispatch:a,match:t,user:d}=u,v=P(u,["dispatch","match","user"]);const E=(0,i.useLocation)(),[r]=(0,i.useSearchParams)(),n=r.get("code"),l=r.get("state"),c=(0,s.useRef)();return(0,s.useEffect)(()=>(c.current=document.createElement("meta"),c.current.name="viewport",c.current.content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",document.head.appendChild(c.current),()=>{document.head.removeChild(c.current)}),[]),(0,s.useEffect)(()=>{const[C,U,B]=l.split(",");function b(){return D(this,null,function*(){const I=navigator.userAgent.toLowerCase(),{status:g,new_user:M}=yield(0,_.U2)(`auth/wechat/${I.match(/MicroMessenger/i)=="micromessenger"?"web_callback":"callback"}.json`,{code:n,signedState:B});if(g===0){yield a({type:"user/getUserInfo",payload:{}});let R=localStorage.getItem("addinfo"),L=localStorage.getItem("classromeurl");M?window.location.href="/otherlogin?type=wechat":R==="1"?(window.location.href=L,window.location.reload(),localStorage.removeItem("addinfo"),localStorage.removeItem("classromeurl")):window.location.href=C==="account"?"/account/binding":"/"}else g===-3&&w.default.info({title:"\u767B\u5F55\u5F02\u5E38",centered:!0,keyboard:!1,maskClosable:!1,closable:!1,content:"\u5F53\u524D\u6709\u5F00\u542F\u9650\u5236\u767B\u5F55\u7684\u8003\u8BD5\u6B63\u5728\u8FDB\u884C\uFF0C\u8BF7\u4F7F\u7528\u8D26\u53F7\u5BC6\u7801\u767B\u5F55\u5934\u6B4C\u5E73\u53F0",okText:"\u8FD4\u56DE\u9996\u9875",onOk:()=>{window.location.href="/"}})})}b()},[n,l]),h.createElement("div",{className:"other-login",style:{height:"100vh",background:"#fff"}},h.createElement(O.Z,null))};f.default=(0,i.connect)(({user:e})=>({user:e}))(F)}}]);

@ -0,0 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7333],{76904:function(S,f,o){o.r(f);var s=o(59301),i=o(25690),O=o(62957),_=o(458),p=o(38986),h=o(59301),m=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,P=(e,u)=>{var a={};for(var t in e)y.call(e,t)&&u.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&m)for(var t of m(e))u.indexOf(t)<0&&w.call(e,t)&&(a[t]=e[t]);return a},D=(e,u,a)=>new Promise((t,d)=>{var v=n=>{try{r(a.next(n))}catch(l){d(l)}},E=n=>{try{r(a.throw(n))}catch(l){d(l)}},r=n=>n.done?t(n.value):Promise.resolve(n.value).then(v,E);r((a=a.apply(e,u)).next())});const F=e=>{var u=e,{dispatch:a,match:t,user:d}=u,v=P(u,["dispatch","match","user"]);const E=(0,i.useLocation)(),[r]=(0,i.useSearchParams)(),n=r.get("code"),l=r.get("state"),c=(0,s.useRef)();return(0,s.useEffect)(()=>(c.current=document.createElement("meta"),c.current.name="viewport",c.current.content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",document.head.appendChild(c.current),()=>{document.head.removeChild(c.current)}),[]),(0,s.useEffect)(()=>{const[C,U,B]=l.split(",");function b(){return D(this,null,function*(){const I=navigator.userAgent.toLowerCase(),{status:g,new_user:M}=yield(0,p.U2)(`auth/wechat/${I.match(/MicroMessenger/i)=="micromessenger"?"web_callback":"callback"}.json`,{code:n,signedState:B});if(g===0){yield a({type:"user/getUserInfo",payload:{}});let R=localStorage.getItem("addinfo"),L=localStorage.getItem("classromeurl");M?window.location.href="/otherlogin?type=wechat":R==="1"?(window.location.href=L,localStorage.removeItem("addinfo"),localStorage.removeItem("classromeurl")):window.location.href=C==="account"?"/account/binding":"/"}else g===-3&&O.default.info({title:"\u767B\u5F55\u5F02\u5E38",centered:!0,keyboard:!1,maskClosable:!1,closable:!1,content:"\u5F53\u524D\u6709\u5F00\u542F\u9650\u5236\u767B\u5F55\u7684\u8003\u8BD5\u6B63\u5728\u8FDB\u884C\uFF0C\u8BF7\u4F7F\u7528\u8D26\u53F7\u5BC6\u7801\u767B\u5F55\u5934\u6B4C\u5E73\u53F0",okText:"\u8FD4\u56DE\u9996\u9875",onOk:()=>{window.location.href="/"}})})}b()},[n,l]),h.createElement("div",{className:"other-login",style:{height:"100vh",background:"#fff"}},h.createElement(_.Z,null))};f.default=(0,i.connect)(({user:e})=>({user:e}))(F)}}]);

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save