mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化系统
This commit is contained in:
parent
51b1efce46
commit
f9988111b1
@ -1,20 +1,4 @@
|
||||
export default {
|
||||
baseUrl: 'http://localhost:9008',
|
||||
apiTimeout: 15000,
|
||||
lang: 'zh',
|
||||
url: {
|
||||
userLogin: "/home/login.pcUserLogin",
|
||||
getCaptcha: "/home/user.getValidCode",
|
||||
// 项目管理
|
||||
projectList: '/home/project.listProject',
|
||||
projectAdd: '/home/project.saveProject',
|
||||
projectUpdate: '/home/project.updateProject',
|
||||
projectDelete: '/home/project.deleteProject',
|
||||
|
||||
// 设备管理
|
||||
machineList: '/machine/list',
|
||||
machineAdd: '/machine/add',
|
||||
machineUpdate: '/machine/update',
|
||||
machineDelete: '/machine/delete'
|
||||
}
|
||||
lang: 'zh',// zh 中文 en 英文
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import ElementLocale from 'element-ui/lib/locale'
|
||||
import config from '@/conf/config'
|
||||
import { messages as loginMessages } from '../views/user/login/LoginLang'
|
||||
import { messages as layoutMessages } from '../views/layout/LayoutLang'
|
||||
import { messages as commonMessages } from './commonLang'
|
||||
@ -436,7 +437,7 @@ const messages = {
|
||||
|
||||
// 创建 i18n 实例
|
||||
const i18n = new VueI18n({
|
||||
locale: 'zh',
|
||||
locale: config.lang,
|
||||
messages
|
||||
})
|
||||
|
||||
|
||||
@ -750,9 +750,9 @@ router.beforeEach((to, from, next) => {
|
||||
} else {
|
||||
let _title = to.meta.title;
|
||||
if (!_title) {
|
||||
_title = '物业官网平台'
|
||||
_title = '物业管理系统'
|
||||
} else {
|
||||
_title = _title + ' - 物业官网平台'
|
||||
_title = _title + ' - 物业管理系统'
|
||||
}
|
||||
document.title = _title
|
||||
next()
|
||||
|
||||
@ -8,7 +8,7 @@ let loadingInstance = null
|
||||
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
baseURL: config.baseApi, // 基础URL
|
||||
baseURL: '/', // 基础URL
|
||||
timeout: config.apiTimeout // 请求超时时间
|
||||
})
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<!-- 顶部导航 -->
|
||||
<el-header height="60px" class="app-header">
|
||||
<div class="header-left">
|
||||
<div class="logo">HC</div>
|
||||
<div class="logo">{{systemInfo.systemSimpleTitle}}</div>
|
||||
<el-menu mode="horizontal" :default-active="activeMenu" class="header-menu" background-color="#1e2132"
|
||||
text-color="#fff" active-text-color="#409EFF">
|
||||
<el-menu-item :index="item.caId" v-for="(item, index) in catalogs" :key="index"
|
||||
@ -79,6 +79,7 @@
|
||||
<script>
|
||||
import { _getMenuCatalog, getMenuTree, jumpToMall, jumpToIot } from '@/api/user/menuApi'
|
||||
import { getStoreInfo } from "@/api/user/indexApi"
|
||||
import {listSystemInfo} from '@/api/system/systemInfoManageApi'
|
||||
import { deepCopy, setCurrentCommunity } from "@/utils/vc"
|
||||
import { getCommunityName, _loadCommunityInfo } from '@/api/community/communityApi'
|
||||
import moreCommunity from '@/components/community/moreCommunity.vue'
|
||||
@ -107,13 +108,17 @@ export default {
|
||||
storeTypeCd: '',
|
||||
storeId: ''
|
||||
},
|
||||
|
||||
systemInfo: {
|
||||
systemSimpleTitle: '',
|
||||
companyName: '',
|
||||
logoUrl: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let _user = JSON.parse(localStorage.getItem('user'));
|
||||
this.username = _user.name
|
||||
|
||||
this.getSystemInfo()
|
||||
this._loadStoreInfo()
|
||||
this.loadCatalogs()
|
||||
this.curCommunityName = getCommunityName()
|
||||
@ -126,6 +131,12 @@ export default {
|
||||
searchCommunityDataList
|
||||
},
|
||||
methods: {
|
||||
async getSystemInfo() {
|
||||
const { data } = await listSystemInfo({ page: 1, row: 1 });
|
||||
this.systemInfo.systemSimpleTitle = data[0].systemSimpleTitle
|
||||
this.systemInfo.companyName = data[0].companyName
|
||||
this.systemInfo.logoUrl = data[0].logoUrl
|
||||
},
|
||||
async loadCommunity() {
|
||||
const { communitys } = await _loadCommunityInfo()
|
||||
this.communitys = communitys
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<div class="login-card">
|
||||
<div class="login-title">{{ $t('login.title') }}</div>
|
||||
<div class="login-title" v-if="logo">
|
||||
<img :src="logo" alt="logo">
|
||||
</div>
|
||||
<el-form :model="loginForm" :rules="rules" ref="loginForm">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" :placeholder="$t('login.usernamePlaceholder')"></el-input>
|
||||
@ -22,7 +24,7 @@
|
||||
</el-form>
|
||||
<!-- Add a white line and copyright info below the form -->
|
||||
<div class="divider"></div>
|
||||
<div class="copyright">©2020-2025 java110团队</div>
|
||||
<div class="copyright">©2020-2025 {{companyName}}</div>
|
||||
</div>
|
||||
<select-login-user ref="selectLoginUserRef" @select="handleSelect"></select-login-user>
|
||||
</div>
|
||||
@ -31,12 +33,16 @@
|
||||
<script>
|
||||
import { login, getCaptcha, _loadStaffPrivileges } from '@/api/user/loginApi';
|
||||
import { _loadCommunityInfo } from '@/api/community/communityApi';
|
||||
import {listSystemInfo} from '@/api/system/systemInfoManageApi'
|
||||
import selectLoginUser from '@/components/user/selectLoginUser.vue';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
logo: '',
|
||||
companyName:'',
|
||||
loginForm: {
|
||||
username: 'wuxw',
|
||||
passwd: 'admin',
|
||||
@ -59,12 +65,19 @@ export default {
|
||||
},
|
||||
created() {
|
||||
localStorage.clear();
|
||||
this.getSystemInfo()
|
||||
this.refreshCaptcha();
|
||||
|
||||
},
|
||||
components: {
|
||||
selectLoginUser
|
||||
},
|
||||
methods: {
|
||||
async getSystemInfo() {
|
||||
const { data } = await listSystemInfo({ page: 1, row: 1 });
|
||||
this.logo = data[0].logoUrl
|
||||
this.companyName = data[0].companyName
|
||||
},
|
||||
async submitForm(formName) {
|
||||
this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
@ -144,7 +157,6 @@ export default {
|
||||
.login-card .login-title {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user