Auto Submit

pull/1/head
autosubmit 8 months ago
parent 738442a412
commit 377ad30bbe

@ -0,0 +1 @@
"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),D=a(458),F=a(38986),f=a(59301),g=(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 g(this,null,function*(){const o=navigator.userAgent.toLowerCase(),{status:E,new_user:C}=yield(0,F.U2)(`auth/wechat/${o.match(/MicroMessenger/i)=="micromessenger"?"web_callback":"callback"}.json`,{code:u,signedState:n});if(E===0){let w=localStorage.getItem("addinfo"),B=localStorage.getItem("classromeurl");C?window.location.href="/otherlogin?type=wechat":w==="1"?(window.location.href=B,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(D.Z,null))}}}]);

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

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