diff --git a/src/components/modals/providers/GiteaAccountModal.vue b/src/components/modals/providers/GiteaAccountModal.vue index 1610504a..c0e980c7 100644 --- a/src/components/modals/providers/GiteaAccountModal.vue +++ b/src/components/modals/providers/GiteaAccountModal.vue @@ -10,6 +10,9 @@
例如: https://gitea.example.com/ + + ,非https的URL,请跳转到 HTTP链接 添加Gitea。 +
@@ -38,6 +41,7 @@ import constants from '../../../data/constants'; export default modalTemplate({ data: () => ({ + redirectUrl: constants.oauth2RedirectUri, }), computedLocalSettings: { serverUrl: 'giteaServerUrl', @@ -45,12 +49,11 @@ export default modalTemplate({ applicationSecret: 'giteaApplicationSecret', }, computed: { - redirectUrl() { - let url = constants.oauth2RedirectUri; - if (this.serverUrl && this.serverUrl.indexOf('http://') === 0) { - url = url.replace('https://', 'http://'); + httpAppUrl() { + if (constants.origin.indexOf('https://') === 0 && this.serverUrl.indexOf('http://') === 0) { + return `${constants.origin.replace('https://', 'http://')}/app`; } - return url; + return null; }, }, methods: {