|
@@ -1,28 +1,67 @@
|
|
|
<!--suppress ALL -->
|
|
|
<template>
|
|
|
<div class="login-container columnCC">
|
|
|
- <el-form ref="refloginForm" class="login-form" :model="formInline" :rules="formRules">
|
|
|
+ <el-form
|
|
|
+ ref="refloginForm"
|
|
|
+ class="login-form"
|
|
|
+ :model="formInline"
|
|
|
+ :rules="formRules"
|
|
|
+ >
|
|
|
<div class="title-container rowSS">
|
|
|
- <el-avatar class="appNav-avatar" :size="36" :src="imgUrl" @error="errorHandler">
|
|
|
+ <el-avatar
|
|
|
+ class="appNav-avatar"
|
|
|
+ :size="36"
|
|
|
+ :src="imgUrl"
|
|
|
+ @error="errorHandler"
|
|
|
+ >
|
|
|
<img src="../../assets/home/pc_err.png" />
|
|
|
</el-avatar>
|
|
|
<h3 class="title">{{ title }}</h3>
|
|
|
</div>
|
|
|
<el-form-item prop="username" :rules="formRules.isNotNull">
|
|
|
- <el-input size="large" autocomplete="on" v-model="formInline.username" placeholder="用户名" />
|
|
|
+ <el-input
|
|
|
+ size="large"
|
|
|
+ autocomplete="on"
|
|
|
+ v-model="formInline.username"
|
|
|
+ placeholder="用户名"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<!--<el-form-item prop="password" :rules="formRules.passwordValid">-->
|
|
|
<el-form-item prop="password" :rules="formRules.isNotNull">
|
|
|
- <el-input size="large" show-password ref="refPassword" autocomplete="on" v-model="formInline.password" type="password" name="password" placeholder="密码" />
|
|
|
+ <el-input
|
|
|
+ size="large"
|
|
|
+ show-password
|
|
|
+ ref="refPassword"
|
|
|
+ autocomplete="on"
|
|
|
+ v-model="formInline.password"
|
|
|
+ type="password"
|
|
|
+ name="password"
|
|
|
+ placeholder="密码"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<div v-if="verificationCodeEnable" class="rowSS">
|
|
|
<el-form-item prop="verificationCode" :rules="formRules.isNotNull">
|
|
|
- <el-input size="large" @keyup.enter="handleLogin" v-model="formInline.verificationCode" placeholder="请输入验证码" />
|
|
|
+ <el-input
|
|
|
+ size="large"
|
|
|
+ @keyup.enter="handleLogin"
|
|
|
+ v-model="formInline.verificationCode"
|
|
|
+ placeholder="请输入验证码"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
- <Identify :identifyCode="identifyCode" @changeCode="changeCode" style="margin-left:18px" />
|
|
|
+ <Identify
|
|
|
+ :identifyCode="identifyCode"
|
|
|
+ @changeCode="changeCode"
|
|
|
+ style="margin-left: 18px"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="tip-message">{{ tipMessage }}</div>
|
|
|
- <el-button :loading="loading" type="primary" class="login-btn" size="large" @click.prevent="handleLogin">
|
|
|
+ <el-button
|
|
|
+ :loading="loading"
|
|
|
+ type="primary"
|
|
|
+ class="login-btn"
|
|
|
+ size="large"
|
|
|
+ @click.prevent="handleLogin"
|
|
|
+ >
|
|
|
登录
|
|
|
</el-button>
|
|
|
</el-form>
|
|
@@ -31,7 +70,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive, onBeforeMount } from "vue";
|
|
|
-import { GetCheckCode, gettoken, GetSystemSet } from "@/api/newLogin";
|
|
|
+import { GetCheckCode, gettoken, GetSystemSet, Getmus } from "@/api/newLogin";
|
|
|
import { setCodeToken, getCodeToken } from "@/utils/auth";
|
|
|
import Identify from "./identify.vue";
|
|
|
import { ElMessage } from "element-plus";
|
|
@@ -80,7 +119,7 @@ onBeforeMount(() => {
|
|
|
getToken();
|
|
|
});
|
|
|
|
|
|
-const verificationCodeEnable = ref(false)
|
|
|
+const verificationCodeEnable = ref(false);
|
|
|
const getToken = async () => {
|
|
|
const { code, returnData, message } = (await gettoken({
|
|
|
appid: PLATFROM_CONFIG.appId,
|
|
@@ -88,7 +127,7 @@ const getToken = async () => {
|
|
|
})) as any;
|
|
|
if (code == 0 && returnData) {
|
|
|
setCodeToken(returnData.appToken);
|
|
|
- verificationCodeEnable.value = returnData.verificationCode
|
|
|
+ verificationCodeEnable.value = returnData.verificationCode;
|
|
|
getCheckCode();
|
|
|
//getSystemSet();
|
|
|
} else {
|
|
@@ -155,11 +194,20 @@ let loginReq = () => {
|
|
|
.then(() => {
|
|
|
ElMessage({ message: "登录成功", type: "success" });
|
|
|
sessionStorage.setItem("userName", params.username);
|
|
|
+ let paras = {
|
|
|
+ id: 135,
|
|
|
+ dataContent: [sessionStorage.getItem("User_Id")],
|
|
|
+ };
|
|
|
+ Getmus(paras);
|
|
|
// router.push({ path: state.redirect || "/", query: state.otherQuery });
|
|
|
router.push({ path: "/", query: state.otherQuery });
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
- console.log(res);
|
|
|
+ let paras = {
|
|
|
+ id: 136,
|
|
|
+ dataContent: [params.username],
|
|
|
+ };
|
|
|
+ Getmus(paras);
|
|
|
tipMessage.value = res.msg;
|
|
|
useCommon()
|
|
|
.sleep(30)
|
|
@@ -246,4 +294,3 @@ $light_gray: #eee;
|
|
|
text-align: center;
|
|
|
}
|
|
|
</style>
|
|
|
-
|