|
@@ -26,7 +26,14 @@
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" style="width: 100%" :loading="loading" round @click="login">{{ $t('login.signIn') }}</el-button>
|
|
|
+ <el-button style="width: 100%" :loading="loading" @click="login">{{ $t('login.signIn') }}</el-button>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" style="width: 100%" :loading="loading" @click="giteeLogin">
|
|
|
+ <svg-icon style="font-size: 18px; margin-right: 10px" icon-class="flow-gitee" />
|
|
|
+ 使用 Gitee 账号 Start, 免密登录
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<div v-if="false" class="login-reg">
|
|
|
{{ $t('login.noAccount') }} <router-link to="/user_register">{{ $t('login.createAccount') }}</router-link>
|
|
@@ -36,7 +43,11 @@
|
|
|
|
|
|
<script>
|
|
|
import useStore from '@/store'
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
+
|
|
|
+import message from '@/api/system/message.js'
|
|
|
const { user } = useStore()
|
|
|
+const route = useRoute()
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -65,7 +76,9 @@ export default {
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ if (route.query.token) {}
|
|
|
+ },
|
|
|
methods: {
|
|
|
async login() {
|
|
|
let validate = await this.$refs.loginForm.validate().catch(() => {})
|
|
@@ -76,6 +89,12 @@ export default {
|
|
|
user.login(this.form).finally(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
+ },
|
|
|
+ giteeLogin() {
|
|
|
+ alert('暂未开放')
|
|
|
+ return
|
|
|
+ const jumpUrl = `https://star.aizuda.com/v1/auth-check?platform=eui&t=${new Date().getTime()}`
|
|
|
+ window.open(jumpUrl, '_blank')
|
|
|
}
|
|
|
}
|
|
|
}
|