|
|
@@ -21,7 +21,7 @@
|
|
|
<h1 class="text-2xl font-bold text-center mb-8">登录</h1>
|
|
|
|
|
|
<!-- 用户名密码登陆 -->
|
|
|
- <div v-if="!showQrDialog && !showQrOnly">
|
|
|
+ <!-- <div>
|
|
|
<el-form
|
|
|
:model="form"
|
|
|
:rules="rules"
|
|
|
@@ -62,17 +62,11 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 钉钉登陆 -->
|
|
|
- <div v-show="showQrOnly" class="text-center">
|
|
|
+ <div class="text-center">
|
|
|
<div id="login_container" class="pb-2"></div>
|
|
|
-
|
|
|
- <div class="flex gap-3 justify-center mt-4">
|
|
|
- <el-button class="w-full" @click="backToPasswordLogin"
|
|
|
- >返回用户名密码登录</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -80,13 +74,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { nextTick, reactive, ref } from "vue";
|
|
|
+import { nextTick, onMounted, reactive, ref } from "vue";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import logo from "@/assets/images/logo.png";
|
|
|
import bgImage from "@/assets/images/bg.png";
|
|
|
import { login } from "@/api/user";
|
|
|
import * as authUtil from "@/utils/auth";
|
|
|
-import { encrypt } from "@/utils/jsencrypt";
|
|
|
|
|
|
type LoginForm = {
|
|
|
username: string;
|
|
|
@@ -227,6 +220,10 @@ const backToPasswordLogin = () => {
|
|
|
// 移除监听事件
|
|
|
window.removeEventListener("message", handleMsg());
|
|
|
};
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ qrLogin();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|