triage_business/js/oauthAuthorize.ee8c005f.js
2026-03-06 14:37:11 +08:00

1 line
1.1 KiB
JavaScript

"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[2908],{33366:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var a=o(66252);const n={class:"videoMain"},s={class:"videoDemonstrate","element-loading-text":"加载中..."};function d(e,t,o,d,i,r){const c=(0,a.Q2)("loading");return(0,a.wg)(),(0,a.iD)("div",n,[(0,a.wy)((0,a._)("div",s,null,512),[[c,i.loading]])])}var i={name:"authorize",components:{},data(){return{loading:!1}},beforeCreate(){},mounted(){this.getCode()},unmounted(){},methods:{async getAuthorize(){const e=await this.$API.auth.video.authorize.post();window.location.href=e.data},getCode(){const e=window.location.href,t=this.getQueryParams(e);let o={code:this.$TOOL.data.get("videoCode"),state:this.$TOOL.data.get("videoState")};t.code==o.code&&o.code?window.close():t.code&&t.state?this.$router.replace({path:"/oauth2/introduce?code="+t.code+"&state="+t.state}):this.getAuthorize()},getQueryParams(e){const t=new URLSearchParams(new URL(e).search),o={};for(let[a,n]of t)o[a]=n;return o}}},r=o(83744);const c=(0,r.Z)(i,[["render",d],["__scopeId","data-v-0cc01d40"]]);var u=c}}]);