소스 검색

更新打包

lex 2 년 전
부모
커밋
b300651b8e
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      dist/assets/index-5662eaa6.js
  2. 1 1
      dist/index.html
  3. 2 2
      src/main.ts

+ 1 - 1
dist/assets/index-51f1d890.js → dist/assets/index-5662eaa6.js

@@ -1278,4 +1278,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
 `,i+="TLS.time:"+n+`
 `,i+="TLS.expire:"+r+`
 `,o!=null&&(i+="TLS.userbuf:"+o+`
-`);let s=UE.HmacSHA256(i,this.PRIVATEKEY);return UE.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,r){let o=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":o,"TLS.expire":n},s="";if(r!=null){let g=this.base64encode(r);i["TLS.userbuf"]=g,s=this._hmacsha256(t,o,n,g)}else s=this._hmacsha256(t,o,n,null);i["TLS.sig"]=s;let u=JSON.stringify(i),d=zA.deflateSync(this.newBuffer(u)).toString("base64"),f=this.escape(d);return console.log("ret="+f),f}validate(t){let n=this.decode(t),r=zA.inflateSync(n);console.log("validate ret="+r)}}const Obe=604800;function Rbe(e){const{SDKAppID:t,secretKey:n,userID:r}=e,i=new Lbe(t,n,Obe).genTestUserSig(r);return{SDKAppID:t,userSig:i}}const Nbe=RY({components:[sY,LY,kY,KK,pK,SY]}),Ig=MN.parse(location.search),c0=MN.parse(location.hash.split("?")[1]),Pbe=Ig.Authorization||c0.Authorization||"";sessionStorage.setItem("Authorization",Pbe);sessionStorage.setItem("platform",Ig.platform||c0.platform||"");console.log(!1,"false");const U3=Ig.appId||c0.appId||1400799837,xbe=Ig.secretKey||c0.secretKey||"37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9",jA=Ig.userID,iw=OI.init({SDKAppID:U3});iw.use(H_e);iw.login({userID:jA,userSig:Rbe({SDKAppID:U3,secretKey:xbe,userID:jA}).userSig});k7(hF).use(Nbe).use(mF).use(iw).mount("#app");
+`);let s=UE.HmacSHA256(i,this.PRIVATEKEY);return UE.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,r){let o=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":o,"TLS.expire":n},s="";if(r!=null){let g=this.base64encode(r);i["TLS.userbuf"]=g,s=this._hmacsha256(t,o,n,g)}else s=this._hmacsha256(t,o,n,null);i["TLS.sig"]=s;let u=JSON.stringify(i),d=zA.deflateSync(this.newBuffer(u)).toString("base64"),f=this.escape(d);return console.log("ret="+f),f}validate(t){let n=this.decode(t),r=zA.inflateSync(n);console.log("validate ret="+r)}}const Obe=604800;function Rbe(e){const{SDKAppID:t,secretKey:n,userID:r}=e,i=new Lbe(t,n,Obe).genTestUserSig(r);return{SDKAppID:t,userSig:i}}const Nbe=RY({components:[sY,LY,kY,KK,pK,SY]}),Ig=MN.parse(location.search),c0=MN.parse(location.hash.split("?")[1]),Pbe=Ig.Authorization||c0.Authorization||"";sessionStorage.setItem("Authorization",Pbe);sessionStorage.setItem("platform",Ig.platform||c0.platform||"");console.log(!1,"false");const U3=Ig.appId||c0.appId||1400805079,xbe=Ig.secretKey||c0.secretKey||"c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30",jA=Ig.userID,iw=OI.init({SDKAppID:U3});iw.use(H_e);iw.login({userID:jA,userSig:Rbe({SDKAppID:U3,secretKey:xbe,userID:jA}).userSig});k7(hF).use(Nbe).use(mF).use(iw).mount("#app");

+ 1 - 1
dist/index.html

@@ -6,7 +6,7 @@
   <link rel="icon" type="image/svg+xml" href="./vite.svg" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>IM</title>
-  <script type="module" crossorigin src="./assets/index-51f1d890.js"></script>
+  <script type="module" crossorigin src="./assets/index-5662eaa6.js"></script>
   <link rel="stylesheet" href="./assets/index-98d4e1b2.css">
 </head>
 

+ 2 - 2
src/main.ts

@@ -41,8 +41,8 @@ import { TUIComponents, TUICore, genTestUserSig } from "./TUIKit";
 console.log(import.meta.env.DEV, "import.meta.env.DEV");
 
 // 判断是否是测试环境的
-const SDKAppID = parseSearch.appId || hashSearch.appId || 1400799837; // import.meta.env.DEV ? 1400805079 : 1400799837; // 1400805079; // Your SDKAppID
-const secretKey = parseSearch.secretKey || hashSearch.secretKey || "37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9"; //import.meta.env.DEV ? "c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30" : "37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9"; //"c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30"; // Your secretKey
+const SDKAppID = parseSearch.appId || hashSearch.appId || 1400805079; // import.meta.env.DEV ? 1400805079 : 1400799837; // 1400805079; // Your SDKAppID
+const secretKey = parseSearch.secretKey || hashSearch.secretKey || "c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30"; //import.meta.env.DEV ? "c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30" : "37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9"; //"c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30"; // Your secretKey
 const userID = parseSearch.userID; //|| "KT:140:TEACHER"; // User ID
 
 // init TUIKit