Commit c8fb4184 authored by 高滢's avatar 高滢

feat(标题): 配置

parent 95da1fbf
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 融创软通PSA管理系统
# 开发环境配置 # 开发环境配置
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
......
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 融创软通PSA管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
...@@ -8,4 +8,4 @@ VITE_APP_ENV = 'production' ...@@ -8,4 +8,4 @@ VITE_APP_ENV = 'production'
VITE_APP_BASE_API = '/prod-api' VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip
\ No newline at end of file
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 融创软通PSA管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'staging' VITE_APP_ENV = 'staging'
...@@ -8,4 +8,4 @@ VITE_APP_ENV = 'staging' ...@@ -8,4 +8,4 @@ VITE_APP_ENV = 'staging'
VITE_APP_BASE_API = '/stage-api' VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip
\ No newline at end of file
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<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.png">
<title>若依管理系统</title> <title>融创软通PSA管理系统</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,
...@@ -212,4 +212,4 @@ ...@@ -212,4 +212,4 @@
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.8.9", "version": "3.8.9",
"description": "若依管理系统", "description": "融创软通PSA项目管理系统",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
......
src/assets/logo/logo.png

5.53 KB | W: | H:

src/assets/logo/logo.png

3.66 KB | W: | H:

src/assets/logo/logo.png
src/assets/logo/logo.png
src/assets/logo/logo.png
src/assets/logo/logo.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
&.has-logo { &.has-logo {
.el-scrollbar { .el-scrollbar {
height: calc(100% - 300px); height: calc(100% - 400px);
margin-top:80px; margin-top:80px;
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/> />
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
<div style="display: flex;justify-content: center"> <div class="footer">
<img :src="comlogo" class="comlogo"> <img :src="comlogo" class="comlogo">
</div> </div>
</div> </div>
...@@ -81,6 +81,11 @@ const activeMenu = computed(() => { ...@@ -81,6 +81,11 @@ const activeMenu = computed(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
.sidebar-container { .sidebar-container {
background-color: v-bind(getMenuBackground); background-color: v-bind(getMenuBackground);
.footer{
position: absolute;
bottom: 60px;
left: 38px;
}
.avatar{ .avatar{
position: absolute; position: absolute;
top: 40px; top: 40px;
......
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> <el-form
<h3 class="title">若依后台管理系统</h3> ref="loginRef"
<el-form-item prop="username"> :model="loginForm"
<el-input :rules="loginRules"
v-model="loginForm.username" class="login-form"
type="text"
size="large"
auto-complete="off"
placeholder="账号"
> >
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template> <h3 class="title">融创软通PSA管理系统</h3>
</el-input> <el-form-item prop="username">
</el-form-item> <el-input
<el-form-item prop="password"> v-model="loginForm.username"
<el-input type="text"
v-model="loginForm.password" size="large"
type="password" auto-complete="off"
size="large" placeholder="账号"
auto-complete="off" >
placeholder="密码" <template #prefix
@keyup.enter="handleLogin" ><svg-icon
> icon-class="user"
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template> class="el-input__icon input-icon"
</el-input> /></template>
</el-form-item> </el-input>
<el-form-item prop="code" v-if="captchaEnabled"> </el-form-item>
<el-input <el-form-item prop="password">
v-model="loginForm.code" <el-input
size="large" v-model="loginForm.password"
auto-complete="off" type="password"
placeholder="验证码" size="large"
style="width: 63%" auto-complete="off"
@keyup.enter="handleLogin" placeholder="密码"
> @keyup.enter="handleLogin"
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template> >
</el-input> <template #prefix
<div class="login-code"> ><svg-icon
<img :src="codeUrl" @click="getCode" class="login-code-img"/> icon-class="password"
class="el-input__icon input-icon"
/></template>
</el-input>
</el-form-item>
<el-form-item v-if="captchaEnabled" prop="code">
<el-input
v-model="loginForm.code"
size="large"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter="handleLogin"
>
<template #prefix
><svg-icon
icon-class="validCode"
class="el-input__icon input-icon"
/></template>
</el-input>
<div class="login-code">
<img
:src="codeUrl"
class="login-code-img"
@click="getCode"
/>
</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="large"
type="primary"
style="width: 100%"
@click.prevent="handleLogin"
>
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
</el-button>
<div v-if="register" style="float: right">
<router-link class="link-type" :to="'/register'"
>立即注册</router-link
>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
</div> </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="large"
type="primary"
style="width:100%;"
@click.prevent="handleLogin"
>
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
</el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
</div> </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 { encrypt, decrypt } from "@/utils/jsencrypt"; import { encrypt, decrypt } from '@/utils/jsencrypt'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
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: "admin", username: 'admin',
password: "admin123", password: 'admin123',
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)
// 注册开关 // 注册开关
const register = ref(false); const register = ref(false)
const redirect = ref(undefined); const redirect = ref(undefined)
watch(route, (newRoute) => { watch(
redirect.value = newRoute.query && newRoute.query.redirect; route,
}, { immediate: true }); newRoute => {
redirect.value = newRoute.query && newRoute.query.redirect
},
{ immediate: true }
)
function handleLogin() { function handleLogin() {
proxy.$refs.loginRef.validate(valid => { proxy.$refs.loginRef.validate(valid => {
if (valid) { if (valid) {
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, {
Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 }); expires: 30
Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 }); })
} else { Cookies.set('password', encrypt(loginForm.value.password), {
// 否则移除 expires: 30
Cookies.remove("username"); })
Cookies.remove("password"); Cookies.set('rememberMe', loginForm.value.rememberMe, {
Cookies.remove("rememberMe"); expires: 30
} })
// 调用action的登录方法 } else {
userStore.login(loginForm.value).then(() => { // 否则移除
const query = route.query; Cookies.remove('username')
const otherQueryParams = Object.keys(query).reduce((acc, cur) => { Cookies.remove('password')
if (cur !== "redirect") { Cookies.remove('rememberMe')
acc[cur] = query[cur]; }
} // 调用action的登录方法
return acc; userStore
}, {}); .login(loginForm.value)
router.push({ path: redirect.value || "/", query: otherQueryParams }); .then(() => {
}).catch(() => { const query = route.query
loading.value = false; const otherQueryParams = Object.keys(query).reduce(
// 重新获取验证码 (acc, cur) => {
if (captchaEnabled.value) { if (cur !== 'redirect') {
getCode(); acc[cur] = query[cur]
}
return acc
},
{}
)
router.push({
path: redirect.value || '/',
query: otherQueryParams
})
})
.catch(() => {
loading.value = false
// 重新获取验证码
if (captchaEnabled.value) {
getCode()
}
})
} }
}); })
}
});
} }
function getCode() { function getCode() {
getCodeImg().then(res => { getCodeImg().then(res => {
captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled; captchaEnabled.value =
if (captchaEnabled.value) { res.captchaEnabled === undefined ? true : res.captchaEnabled
codeUrl.value = "data:image/gif;base64," + res.img; if (captchaEnabled.value) {
loginForm.value.uuid = res.uuid; codeUrl.value = 'data:image/gif;base64,' + res.img
} 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:
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) password === undefined
}; ? loginForm.value.password
: decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
}
} }
getCode(); getCode()
getCookie(); getCookie()
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url('../assets/images/login-background.jpg');
background-size: cover; background-size: cover;
} }
.title { .title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #707070;
} }
.login-form { .login-form {
border-radius: 6px; border-radius: 6px;
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 40px; height: 40px;
input { input {
height: 40px; height: 40px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 0px;
} }
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 0px;
}
} }
.login-tip { .login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 33%;
height: 40px; height: 40px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.el-login-footer { .el-login-footer {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-family: Arial; font-family: Arial;
font-size: 12px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
} }
.login-code-img { .login-code-img {
height: 40px; height: 40px;
padding-left: 12px; padding-left: 12px;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment