update: 项目名称修改
This commit is contained in:
parent
6a2c754811
commit
8701868ac8
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 检察院来访登记及分析系统
|
VITE_APP_TITLE = 访查查
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 检察院来访登记及分析系统
|
VITE_APP_TITLE = 访查查
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>检察院来访登记及分析系统</title>
|
<title>访查查</title>
|
||||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="login-title-container">
|
<div class="login-title-container">
|
||||||
<!-- <h2>{{ title }}</h2> -->
|
<!-- <h2>{{ title }}</h2> -->
|
||||||
<!-- <h2>江苏省人民检察院</h2> -->
|
<!-- <h2>江苏省人民检察院</h2> -->
|
||||||
<h2>检察院来访登记及分析系统</h2>
|
<h2>{{ title }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
@ -81,41 +81,42 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
|
<span>使用单位:常熟市人民检察院</span>
|
||||||
<span>技术支持:上海佳盟计算机系统有限公司</span>
|
<span>技术支持:上海佳盟计算机系统有限公司</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getCodeImg} from "@/api/login";
|
import {getCodeImg} from '@/api/login';
|
||||||
import Cookies from "js-cookie";
|
import Cookies from 'js-cookie';
|
||||||
import {decrypt, encrypt} from "@/utils/jsencrypt";
|
import {decrypt, encrypt} from '@/utils/jsencrypt';
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
// const title = import.meta.env.VITE_APP_TITLE;
|
// const title = import.meta.env.VITE_APP_TITLE;
|
||||||
|
|
||||||
const title = "检察院来访登记及分析系统"
|
const title = import.meta.env.VITE_APP_TITLE;
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "",
|
username: '',
|
||||||
password: "",
|
password: '',
|
||||||
// username: "admin",
|
// username: "admin",
|
||||||
// password: "jm@61020900",
|
// password: "jm@61020900",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: '',
|
||||||
uuid: ""
|
uuid: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const loginRules = {
|
const loginRules = {
|
||||||
username: [{required: true, trigger: "blur", message: "请输入您的账号"}],
|
username: [{required: true, trigger: 'blur', message: '请输入您的账号'}],
|
||||||
password: [{required: true, trigger: "blur", message: "请输入您的密码"}],
|
password: [{required: true, trigger: 'blur', message: '请输入您的密码'}],
|
||||||
code: [{required: true, trigger: "change", message: "请输入验证码"}]
|
code: [{required: true, trigger: 'change', message: '请输入验证码'}]
|
||||||
};
|
};
|
||||||
|
|
||||||
const codeUrl = ref("");
|
const codeUrl = ref('');
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
const captchaEnabled = ref(true);
|
const captchaEnabled = ref(true);
|
||||||
@ -133,25 +134,25 @@ function handleLogin() {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
|
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
|
||||||
if (loginForm.value.rememberMe) {
|
if (loginForm.value.rememberMe) {
|
||||||
Cookies.set("username", loginForm.value.username, {expires: 30});
|
Cookies.set('username', loginForm.value.username, {expires: 30});
|
||||||
Cookies.set("password", encrypt(loginForm.value.password), {expires: 30});
|
Cookies.set('password', encrypt(loginForm.value.password), {expires: 30});
|
||||||
Cookies.set("rememberMe", loginForm.value.rememberMe, {expires: 30});
|
Cookies.set('rememberMe', loginForm.value.rememberMe, {expires: 30});
|
||||||
} else {
|
} else {
|
||||||
// 否则移除
|
// 否则移除
|
||||||
Cookies.remove("username");
|
Cookies.remove('username');
|
||||||
Cookies.remove("password");
|
Cookies.remove('password');
|
||||||
Cookies.remove("rememberMe");
|
Cookies.remove('rememberMe');
|
||||||
}
|
}
|
||||||
// 调用action的登录方法
|
// 调用action的登录方法
|
||||||
userStore.login(loginForm.value).then(() => {
|
userStore.login(loginForm.value).then(() => {
|
||||||
const query = route.query;
|
const query = route.query;
|
||||||
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
|
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
|
||||||
if (cur !== "redirect") {
|
if (cur !== 'redirect') {
|
||||||
acc[cur] = query[cur];
|
acc[cur] = query[cur];
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
router.push({path: redirect.value || "/", query: otherQueryParams});
|
router.push({path: redirect.value || '/', query: otherQueryParams});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
// 重新获取验证码
|
// 重新获取验证码
|
||||||
@ -167,16 +168,16 @@ function getCode() {
|
|||||||
getCodeImg().then(res => {
|
getCodeImg().then(res => {
|
||||||
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
if (captchaEnabled.value) {
|
if (captchaEnabled.value) {
|
||||||
codeUrl.value = "data:image/gif;base64," + res.img;
|
codeUrl.value = 'data:image/gif;base64,' + res.img;
|
||||||
loginForm.value.uuid = res.uuid;
|
loginForm.value.uuid = res.uuid;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCookie() {
|
function getCookie() {
|
||||||
const username = Cookies.get("username");
|
const username = Cookies.get('username');
|
||||||
const password = Cookies.get("password");
|
const password = Cookies.get('password');
|
||||||
const rememberMe = Cookies.get("rememberMe");
|
const rememberMe = Cookies.get('rememberMe');
|
||||||
loginForm.value = {
|
loginForm.value = {
|
||||||
username: username === undefined ? loginForm.value.username : username,
|
username: username === undefined ? loginForm.value.username : username,
|
||||||
password: password === undefined ? loginForm.value.password : decrypt(password),
|
password: password === undefined ? loginForm.value.password : decrypt(password),
|
||||||
@ -274,8 +275,6 @@ getCookie();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -285,6 +284,9 @@ getCookie();
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user