From c788166a1fb219bbacf9395ec1f45b5d28a258c1 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期三, 16 四月 2025 15:22:33 +0800 Subject: [PATCH] 人员获取第三方人员-页面bug修改 --- src/views/login.vue | 54 ++++++++++++++++++++++++++---------------------------- 1 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index 2590586..47f42aa 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -18,15 +18,15 @@ <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> </el-input> </el-form-item> - <el-form-item prop="code" v-if="captchaEnabled"> - <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%" - @keyup.enter.native="handleLogin"> - <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> - </el-input> - <div class="login-code"> - <img :src="codeUrl" @click="getCode" class="login-code-img" /> - </div> - </el-form-item> +<!-- <el-form-item prop="code" v-if="captchaEnabled">--> +<!-- <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%"--> +<!-- @keyup.enter.native="handleLogin">--> +<!-- <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />--> +<!-- </el-input>--> +<!-- <div class="login-code">--> +<!-- <img :src="codeUrl" @click="getCode" class="login-code-img" />--> +<!-- </div>--> +<!-- </el-form-item>--> <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">璁颁綇瀵嗙爜</el-checkbox> <el-form-item style="width:100%;"> <el-button :loading="loading" size="medium" type="primary" style="width:100%;" @@ -38,7 +38,7 @@ <router-link class="link-type" :to="'/register'">绔嬪嵆娉ㄥ唽</router-link> </div> </el-form-item> - <el-button v-if="false" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button> + <el-button v-if="true" type="primary" plain @click="goLogin">闆嗗洟闆嗘垚鐧诲綍</el-button> </el-form> </div> <!-- 搴曢儴 --> @@ -91,16 +91,14 @@ } }, created() { - this.getCode(); + // this.getCode(); this.getCookie(); }, methods: { async goLogin() { - const { - data: { data }, - } = await getSsoAuthUrl() - window.location.href = data - // this.$router.push({ path: '/thirdpartylogin' }) + await getSsoAuthUrl().then(res => { + window.location.href = res.data + }) }, getCode() { getCodeImg().then(res => { @@ -135,12 +133,12 @@ Cookies.remove('rememberMe'); } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(() => { }); + this.$router.push({ path: "/" }).catch(() => { }); }).catch(() => { this.loading = false; - if (this.captchaEnabled) { - this.getCode(); - } + // if (this.captchaEnabled) { + // this.getCode(); + // } }); } }); @@ -150,14 +148,14 @@ </script> <style rel="stylesheet/scss" lang="scss"> -//.login { -// display: flex; -// justify-content: center; -// align-items: center; -// height: 100%; -// background-image: url("../assets/images/login-background.jpg"); -// background-size: cover; -//} +.login { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + background-image: url("../assets/images/login-background.jpg"); + background-size: cover; +} .login { width: 100vw; height: 100vh; -- Gitblit v1.9.3