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