PageSourceSearch

https://vpn.cdutcm.edu.cn/assets/WechatEnPc-DDeSewxI.js

js cdutcm.edu.cn collected 2026-10-02 05:11:13 UTC 16,050 bytes, 3 lines download raw bytes

1import{s as Me,e as We}from"./auth-Crs8kf_D.js";import{u as ke}from"./user-V10Yxw5H.js";import{w as Ae,a as Le,Q as N}from"./qrcode-B5mAt0r-.js";import{r as qe,g as Oe}from"./util-DyruD4Ub.js";import{h as _}from"./const-BHerojsC.js";import{_ as E,d as R,c as S,o as v,e as y,b as J,k as je,h as B,C as Ee,i as T,j as U,a3 as Re,r as Q,a as F}from"./index-Cey6Kqla.js";import{h as Be,a as Te}from"./auth-Bvec_zE4.js";import"./request-B-CfM8d9.js";import"./user-cwdmpEuP.js";import"./urlConf-D5f8gSXt.js";import"./styleChecker-TFxV7Lzl.js";import"./index-DXhXwGTY.js";import"./initDefaultProps-_hAYIFu4.js";import"./fade-BdgfkLw7.js";import"./_commonjsHelpers-Dyg5QWG7.js";import"./authMethod-CtTsQ3_a.js";const Ue=R({name:"WechatEnScan",props:{authOptions:{type:Object,default:()=>null},externalId:{type:String,default:()=>""},authId:{type:String,default:()=>""}},setup(e){const t=ke(),r=je(),n=B({qrCodeUrl:null,timer:0,reFreshTimer:0,showRefreshCode:!1,scanCodeSuccess:!1,session:"",unbind:0}),a=()=>{clearInterval(n.reFreshTimer),n.showRefreshCode=!1},o=()=>{n.qrCodeUrl&&(n.qrCodeUrl.innerHTML=""),n.session="",a(),clearInterval(n.timer)},s=async()=>{var u;n.session=qe(8),(u=r.query)!=null&&u.unbind&&r.query.unbind=="1"?n.unbind=1:n.unbind=0;const l={externalId:e.externalId,session:n.session,deviceId:await Oe(),unbind:n.unbind};Re(async()=>{const d=`${window.location.origin}/buffer/wechat-en-pc?state=${btoa(JSON.stringify(l))}`;console.log("redirectUri",d),new N(n.qrCodeUrl,{text:d,width:200,height:200,colorDark:"#000000",colorLight:"#fff",correctLevel:N.CorrectLevel.L})._el.title="",n.reFreshTimer=setInterval(()=>{n.showRefreshCode=!0,clearInterval(n.timer)},3e5),n.unbind&&await Me({session:n.session}),n.timer=setInterval(async()=>{const{code:p,data:f}=await We({session:n.session});p===0&&f&&(f.status===_.UnScan?n.scanCodeSuccess=!1:f.status===_.ScanCodeSuccess?(n.scanCodeSuccess=!0,a()):(f.status===_.LoginSuccess||f.status===_.BindSuccess)&&(clearInterval(n.timer),a(),t.getUserInfo()))},2e3)})};return Ee(()=>{o()}),T(()=>e.authId,(l,u)=>{u===e.externalId&&o(),l===e.externalId&&s()},{immediate:!0,deep:!0}),{...U(n),wechatErrorImg:Le,wechatSuccessImg:Ae,refreshQrCode:()=>{o(),s()}}}}),Ne={class:"wechat-scan-container"},Je={ref:"qrCodeUrl",class:"qrcode"},Qe={key:0,class:"mask"},Fe=["src"],Ve={class:"refresh-container"},ze={key:1,class:"mask"},He=["src"],Ze=E(Ue,[["render",function(e,t,r,n,a,o){return v(),S("div",Ne,[y("div",Je,null,512),e.showRefreshCode?(v(),S("div",Qe,[y("img",{src:e.wechatErrorImg,alt:"",class:"error-img"},null,8,Fe),y("div",Ve,[t[1]||(t[1]=y("span",null,"二维码已过期",-1)),y("a",{class:"refresh",onClick:t[0]||(t[0]=(...s)=>e.refreshQrCode&&e.refreshQrCode(...s))},"刷新")])])):J("",!0),e.scanCodeSuccess?(v(),S("div",ze,[y("img",{src:e.wechatSuccessImg,alt:"",class:"success-img"},null,8,He),t[2]||(t[2]=y("div",{class:"refresh-container"},[y("span",null,"扫码成功")],-1))])):J("",!0)])}],["__scopeId","data-v-ebc086ed"]]);var V,z=typeof window<"u"?window:void 0,H=typeof document<"u"?document:void 0,b=typeof navigator<"u"?navigator:void 0,Z=typeof location<"u"?location:void 0,M=(b==null?void 0:b.userAgent)||"",$e=(b==null?void 0:b.platform)||"";(V=M==null?void 0:M.match(/wxwork\/([\d.]+)/i))==null||V[1];var $=function(){var e,t=(e=b==null?void 0:b.maxTouchPoints)!=null?e:1,r=/Mac/i.test($e);return r&&t>2?{isMac:!1,isIOS:!0}:{isMac:r,isIOS:/\b(iPhone|iPad|iPod)\b/i.test(M)}}();function G(e,t,r,n,a,o,s){try{var l=e[o](s),u=l.value}catch(d){return void r(d)}l.done?t(u):Promise.resolve(u).then(n,a)}function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W.apply(this,arguments)}function A(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pe(e,t){if(e){if(typeof e=="string")return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(r):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function k(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Pe(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}$.isIOS,$.isMac;for(var X,Ge=k(Object.keys({config:"preVerifyJsApi",onMenuShareTimeline:"menu:share:timeline",onMenu
2ShareAppMessage:"menu:share:appmessage",onMenuShareWechat:"menu:share:wechat",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress",getBrandWCPayRequest:"getBrandWCPayRequest"}));!(X=Ge()).done;)X.value;function Xe(e){return function(t){if(Array.isArray(t))return A(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Pe(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function De(e,t){if(typeof e=="function")try{return e(t)}catch(r){(function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];var s;(s=console).error.apply(s,["[wwsdk]"].concat(Xe(a)))})(r)}}Z==null||Z.href;var D,K,Y,ee,ne,te,re,ae,oe,ie,se,ce,le,ue,de,fe,pe,he,me,ge,ye,ve,we,be=!!(z!=null&&z.WeixinJSBridge);function C(e,t){return C=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},C(e,t)}function L(e,t,r){return L=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(n,a,o){var s=[null];s.push.apply(s,a);var l=new(Function.bind.apply(n,s));return o&&C(l,o.prototype),l},L.apply(null,arguments)}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},q(e)}function j(e){var t=typeof Map=="function"?new Map:void 0;return j=function(r){var n,a=function(){return L(r,arguments,q(this).constructor)};if(r===null||(n=r,Function.toString.call(n).indexOf("[native code]")===-1))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,a)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),C(a,r)},j(e)}function Ke(e,t,r){var n=document.createElement("iframe"),a=n.style;a.display="block",a.border="none",a.background="transparent",a.width=e,a.height=t,n.referrerPolicy="origin",n.setAttribute("frameborder","0"),n.setAttribute("allowtransparency","true");var o=function(s){return typeof s=="string"?document.querySelector(s):s}(r);return o&&o.appendChild(n),n}function Ye(e){return e&&typeof e=="object"?W({},e,{message:e.message,stack:e.stack}):e}function en(e,t){var r=new Map;function n(){var a;return a=function(o){var s,l,u,d,p,f,i,m,g,w,h;return u=this,d=function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),s={type:"ww-iframe-handle:response",uid:o.uid,kind:"resolve"},[4,t(o.args)];case 1:return e.apply(void 0,[(s.args=c.sent(),s)]),[3,3];case 2:throw l=c.sent(),e({type:"ww-iframe-handle:response",uid:o.uid,kind:"reject",args:Ye(l)}),l;case 3:return[2]}},g=function(c){return function(O){return w([c,O])}},w=function(c){if(p)throw new TypeError("Generator is already executing.");for(;m&&(m=0,c[0]&&(h=0)),h;)try{if(p=1,f&&(i=2&c[0]?f.return:c[0]?f.throw||((i=f.return)&&i.call(f),0):f.next)&&!(i=i.call(f,c[1])).done)return i;switch(f=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return h.label++,{value:c[1],done:!1};case 5:h.label++,f=c[1],c=[0];continue;case 7:c=h.ops.pop(),h.trys.pop();continue;default:if(!((i=(i=h.trys).length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){h=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){h.label=c[1];break}if(c[0]===6&&h.label<i[1]){h.label=i[1],i=c;break}if(i&&h.label<i[2]){h.label=i[2],h.ops.push(c);break}i[2]&&h.ops.pop(),h.trys.pop();continue}c=d.call(u,h)}catch(O){c=[6,O],f=0}finally{p=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}},h={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},m={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m},n=function(){var o=this,s=arguments;return new Promise(function(l,u){var d=a.apply(o,s);function p(i){G(d,l,u,p,f,"next",i)}function f(i){G(d,l,u,p,f,"throw",i)}p(void 0)})},n.apply(this,arguments)}return{invoke:function(a){return new Promise(function(o,s){var l,u=(l=Math.random().toString(36).slice(2),Date.now().toString(36)+"."+l);r.set(u,{resolve:o,reject:s}),e({type:"ww-iframe-handle:call",uid:u,args:a})})},handleCallMessage:function(a){return n.apply(this,arguments)},handleResponseMessage:function(a){var o=r.get(a.uid);o&&(o[a.kind](a.args),r.delete(a.uid))}}}Promise.resolve(),be||new Promise(function(e){H==null||H.addEventListener("WeixinJSBridgeReady",function(){be=!0,e()})}),j(Error),function(e){e.CLProximityUnknown="0",e.CLProximityImmediate="1",e.CLProximityNear="2",e.CLProximityFar="3"}(D||(D={})),function(e){e.wgs84="wgs84",e.gcj02="gcj02"}(K||(K={})),function(e){e.wifi="wifi",e.network2g="2g",e.network3g="3g",e.network4g="4g",e.none="none",e.unknown="unknown"}(Y||(Y={})),function(e){e.original="original",e.compressed="compressed"}(ee||(ee={})),function(e){e.album="album",e.camera="camera"}(ne||(ne={})),function(e){e.normal="normal",e.batch="batch",e.front="front",e.batch_front="batch_front"}(te||(te={})),function(e){e[e.common=0]="common",e[e.corp_training=1]="corp_training",e[e.edu_normal_class=2]="edu_normal_class",e[e.edu_small_class=3]="edu_small_class"}(re||(re={})),function(e){e[e.normal=0]="normal",e[e.scan=1]="scan"}(ae||(ae={}
3)),function(e){e[e.chat=0]="chat",e[e.qrcode=1]="qrcode"}(oe||(oe={})),function(e){e.contact_profile="contact_profile",e.single_chat_tools="single_chat_tools",e.group_chat_tools="group_chat_tools",e.chat_attachment="chat_attachment",e.single_kf_tools="single_kf_tools",e.chain_single_chat_tools="chain_single_chat_tools",e.chain_group_chat_tools="chain_group_chat_tools",e.normal="normal"}(ie||(ie={})),function(e){e.release="release",e.trial="trial",e.develop="develop"}(se||(se={})),function(e){e[e.internal=1]="internal",e[e.external=2]="external"}(ce||(ce={})),function(e){e[e.mediaid=1]="mediaid",e[e.url=2]="url",e[e.localId=4]="localId"}(le||(le={})),function(e){e.None="None",e.HWOpenTalk="HWOpenTalk",e.VoIP="VoIP",e.SystemCall="SystemCall"}(ue||(ue={})),function(e){e.qrCode="qrCode",e.barCode="barCode"}(de||(de={})),function(e){e.single="single",e.multi="multi"}(fe||(fe={})),function(e){e.department="department",e.user="user"}(pe||(pe={})),function(e){e.single="single",e.multi="multi"}(he||(he={})),function(e){e.department="department",e.user="user"}(me||(me={})),function(e){e[e.all=0]="all",e[e.unselected=1]="unselected"}(ge||(ge={})),function(e){e.single="single",e.multi="multi"}(ye||(ye={})),function(e){e.create_approval="10001",e.view_approval="10002"}(ve||(ve={})),function(e){e.link="link",e.text="text"}(we||(we={}));var Ie=!1,x=[];function nn(e){try{var t=JSON.parse(e.data);if(!t.type.startsWith("ww-iframe-handle:"))return;for(var r,n=k(x.slice());!(r=n()).done;)(0,r.value)(t,e)}catch{}}function tn(e,t,r){var n,a=function(i){(function(m,g,w){var h=typeof g=="string"?g:JSON.stringify(g);m==null||m.postMessage(h,w)})(e.contentWindow,i,t)},o=en(function(i){var m=JSON.stringify(i);p?a(m):d.push(m)},r),s=o.invoke,l=o.handleCallMessage,u=o.handleResponseMessage,d=[],p=!1,f=(n=function(i,m){if(m.origin===t&&e.contentWindow===m.source)switch(i.type){case"ww-iframe-handle:ready":return function(){if(!p){p=!0;for(var g,w=k(d);!(g=w()).done;){var h=g.value;a(h)}}}();case"ww-iframe-handle:call":return l(i);case"ww-iframe-handle:response":return u(i)}},Ie||(Ie=!0,window.addEventListener("message",nn)),x.push(n),function(){var i=x.indexOf(n);i>=0&&x.splice(i,1)});return e.addEventListener("load",function(){p||a({type:"ww-iframe-handle:init"})}),{el:e,invoke:s,dispose:f}}var Se,_e,xe,I,P;(function(e){e.serviceApp="ServiceApp",e.corpApp="CorpApp"})(Se||(Se={})),function(e){e.zh="zh",e.en="en"}(_e||(_e={})),function(e){e.top="top",e.callback="callback",e.self="self"}(xe||(xe={})),function(e){e.middle="middle",e.small="small"}(I||(I={}));var Ce=((P={})[I.middle]=["480px","416px"],P[I.small]=["320px","380px"],P);function rn(e){for(var t,r,n=function(d){d===void 0&&(d=I.middle);var p=Ce[d]||Ce[I.middle];return{width:p[0],height:p[1]}}((t=e.params)==null?void 0:t.panel_size),a=Ke(n.width,n.height,e.el),o=tn(a,"https://login.work.weixin.qq.com",function(d){if(d.type==="call")return function(p,f){De(f[p.name],p.payload||p.data)}(d,e);throw new Error("Unknown message type '"+d.type+"'")}).dispose,s=new URL("https://login.work.weixin.qq.com/wwlogin/sso/login"),l=k(Object.keys(e.params||{}));!(r=l()).done;){var u=r.value;s.searchParams.set(u,e.params[u])}return s.searchParams.set("version","1.4.5"),a.src=s.href,{el:a,unmount:function(){var d;o(),(d=a.parentNode)==null||d.removeChild(a)}}}const an=R({name:"IframeWechatEn",props:{authOptions:{type:Object,default:()=>null},externalId:{type:String,default:()=>""},authId:{type:String,default:()=>""}},setup(e){const t=ke(),r=B({loading:!1,wwLogin:null}),n=a=>{var s,l;const o={externalId:e.externalId};r.wwLogin=rn({el:"#wechat-en-iframe",params:{appid:(s=a.action)==null?void 0:s.appId,agentid:(l=a.action)==null?void 0:l.agentId,redirect_uri:window.location.href,state:btoa(JSON.stringify(o)),redirect_type:"callback",panel_size:"small"},onCheckWeComLogin({isWeComLogin:u}){console.log("isWeComLogin",u)},async onLoginSuccess({code:u}){const d={externalId:e.externalId,data:JSON.stringify({code:u,deviceId:await Oe()})};await(async p=>{const{code:f}=await Te(p);f===0&&t.getUserInfo()})(d)},onLoginFail(u){console.log("err",u)}})};return T(()=>e.authId,a=>{if(a===e.externalId)(async()=>{const o={externalId:e.externalId},{code:s,data:l}=await Be(o);s===0&&n(l)})();else{const o=document.getElementById("wechat-en-iframe");o&&(o.innerHTML="")}},{immediate:!0,deep:!0}),{...U(r)}}}),on={id:"wechat-en-iframe",class:"wechat-en-iframe"},sn=R({name:"WechatEnPc",components:{WechatEnScan:Ze,IframeWechatEn:E(an,[["render",function(e,t,r,n,a,o){return v(),S("div",on)}],["__scopeId","data-v-ba410612"]])},props:{authOptions:{type:Object,default:()=>null},externalId:{type:String,default:()=>""},authId:{type:String,default:()=>""}},setup(e){const t=B({authOptions:null,externalId:"",authId:""});return T(()=>e.authId,()=>{t.authOptions=e.authOptions,t.externalId=e.externalId,t.authId=e.authId},{immediate:!0,deep:!0}),{...U(t)}}}),cn={class:"wechat-en-pc-container"},Cn=E(sn,[["render",function(e,t,r,n,a,o){var u;const s=Q("WechatEnScan"),l=Q("IframeWechatEn");return v(),S("div",cn,[(u=e.authOptions)!=null&&u.scanQrOnWeChat?(v(),F(s,{key:0,"external-id":e.externalId,"auth-id":e.authId,"auth-options":e.authOptions},null,8,["external-id","auth-id","auth-options"])):(v(),F(l,{key:1,"external-id":e.externalId,"auth-id":e.authId,"auth-options":e.authOptions},null,8,["external-id","auth-id","auth-options"]))])}],["__scopeId","data-v-c08a8d96"]]);export{Cn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.