Auto Submit

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

@ -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),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)}}]);

@ -1 +0,0 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7333],{76904:function(P,i,a){a.r(i);var s=a(59301),d=a(25690),v=a(62957),w=a(458),D=a(38986),f=a(59301),F=(m,c,u)=>new Promise((l,t)=>{var r=e=>{try{n(u.next(e))}catch(o){t(o)}},h=e=>{try{n(u.throw(e))}catch(o){t(o)}},n=e=>e.done?l(e.value):Promise.resolve(e.value).then(r,h);n((u=u.apply(m,c)).next())});i.default=()=>{const m=(0,d.useLocation)(),[c]=(0,d.useSearchParams)(),u=c.get("code"),l=c.get("state"),t=(0,s.useRef)();return(0,s.useEffect)(()=>(t.current=document.createElement("meta"),t.current.name="viewport",t.current.content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",document.head.appendChild(t.current),()=>{document.head.removeChild(t.current)}),[]),(0,s.useEffect)(()=>{const[r,h,n]=l.split(",");function e(){return F(this,null,function*(){const o=navigator.userAgent.toLowerCase(),{status:E,new_user:g}=yield(0,D.U2)(`auth/wechat/${o.match(/MicroMessenger/i)=="micromessenger"?"web_callback":"callback"}.json`,{code:u,signedState:n});if(E===0){let C=localStorage.getItem("addinfo"),B=localStorage.getItem("classromeurl");g?window.location.href="/otherlogin?type=wechat":C==="1"?(window.location.href=B,window.location.reload(),localStorage.removeItem("addinfo"),localStorage.removeItem("classromeurl")):window.location.href=r==="account"?"/account/binding":"/"}else E===-3&&v.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="/"}})})}e()},[u,l]),f.createElement("div",{className:"other-login",style:{height:"100vh",background:"#fff"}},f.createElement(w.Z,null))}}}]);

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