import{g as e,s as t,r as s,u as o,a,b as n,c as r,d as i,o as c,i as u}from"./index-CuGRD9U9.js";import{r as d}from"./resources.DipqUmnN.js";import{_ as l}from"./_plugin-vue_export-helper.BCo6x5W8.js";const g=l({data:()=>({startup:d.startup.main,title:"",token:""}),onLoad(){if(e("isUpdate"))return;const o=e("launchFlag"),a=e("token")||"";console.log(o,999),o?a?t({url:"/pages/index/index"}):s({url:"/pages/login/index"}):a?t({url:"/pages/index/index"}):(localStorage.getItem("hasLogin")||s({url:"/pages/login/qywxLogin"}),this.$route.query.code&&(localStorage.setItem("auth_code",this.$route.query.code),this.getToken()))},methods:{getToken:function(){const e=o(),s={nonPassword:"nonPassword",grant_type:"password",code:this.$route.query.code.trim()};a(s).then((s=>{this.title=this.$route.query.code;let o=s.data.token;e.setToken(o),e.getCurrentUser().then((e=>{t({url:"/pages/index/index"})})).catch((()=>{}))})).catch((e=>{}))},copy:function(){n({data:this.$route.query.code,success:()=>{r({title:"ε€εΆζε",duration:2e3,icon:"success"})}})}}},[["render",function(e,t,s,o,a,n){const r=u;return c(),i(r,{class:"launch-v"})}],["__scopeId","data-v-9eace7c2"]]);export{g as default};