update preview
This commit is contained in:
1 parent
1eb713aaf4
commit
304201ef80
10 files changed
+83
-17
No files matched your search
@@ -30,8 +30,11 @@ export default defineComponent({
|
||||
this.$router.push(this.redirect);
|
||||
}
|
||||
} else {
|
||||
const currentUrl = window.location.href;
|
||||
const targetUrl = `https://auth.zhishuyun.com?redirect=${currentUrl}`;
|
||||
const host = window.location.host;
|
||||
const subDomain = import.meta.env.DEV ? 'test.zhishuyun.com' : host.substring(host.indexOf('.') + 1);
|
||||
// callback url used to init access token and then redirect back of `redirect`
|
||||
const callbackUrl = `https://${host}/auth/callback?redirect=${this.redirect}`;
|
||||
const targetUrl = `https://auth.${subDomain}?redirect=${callbackUrl}`;
|
||||
window.location.href = targetUrl;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export default defineComponent({
|
||||
},
|
||||
async mounted() {
|
||||
const host = window.location.host;
|
||||
const subDomain = host.substring(host.indexOf('.') + 1);
|
||||
const subDomain = import.meta.env.DEV ? 'test.zhishuyun.com' : host.substring(host.indexOf('.') + 1);
|
||||
// callback url used to init access token and then redirect back of `redirect`
|
||||
const callbackUrl = `https://${host}/auth/callback?redirect=${this.redirect}`;
|
||||
// redirect to auth service to get access token then redirect back
|
||||
|
||||
Reference in new issue
Block a user