Jelajahi Sumber

Merge branch 'master' of git.caimei365.com:git_lijun/caimei-mall-admin-ui

zhengjinyi 5 tahun lalu
induk
melakukan
b3978b37ff

+ 5 - 4
src/layout/components/Navbar.vue

@@ -5,10 +5,6 @@
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
 
 
     <div class="right-menu">
     <div class="right-menu">
-      <template v-if="device!=='mobile'">
-        <screenfull id="screenfull" class="right-menu-item hover-effect" />
-      </template>
-
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
         <div class="avatar-wrapper">
           <span class="admin-name">{{ adminName }}</span>
           <span class="admin-name">{{ adminName }}</span>
@@ -24,6 +20,11 @@
           </el-dropdown-item>
           </el-dropdown-item>
         </el-dropdown-menu>
         </el-dropdown-menu>
       </el-dropdown>
       </el-dropdown>
+
+      <template v-if="device!=='mobile'">
+        <screenfull id="screenfull" class="right-menu-item hover-effect" />
+      </template>
+
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -6,7 +6,7 @@
       </router-link>
       </router-link>
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
         <img :src="systemImage" class="sidebar-logo">
         <img :src="systemImage" class="sidebar-logo">
-        <h1 class="sidebar-title">{{ systemName }} </h1>
+        <h1 class="sidebar-title">{{ systemName ? systemName : '后台管理系统' }}</h1>
       </router-link>
       </router-link>
     </transition>
     </transition>
   </div>
   </div>

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -7,7 +7,7 @@
         :collapse="isCollapse"
         :collapse="isCollapse"
         :background-color="variables.menuBg"
         :background-color="variables.menuBg"
         :text-color="variables.menuText"
         :text-color="variables.menuText"
-        :unique-opened="false"
+        :unique-opened="true"
         :active-text-color="variables.menuActiveText"
         :active-text-color="variables.menuActiveText"
         :collapse-transition="false"
         :collapse-transition="false"
         mode="vertical"
         mode="vertical"

+ 14 - 0
src/layout/index.vue

@@ -37,6 +37,8 @@ export default {
       sidebar: state => state.app.sidebar,
       sidebar: state => state.app.sidebar,
       device: state => state.app.device,
       device: state => state.app.device,
       adminName: state => state.user.name,
       adminName: state => state.user.name,
+      systemName: state => state.user.systemName,
+      systemImage: state => state.user.systemImage,
       showSettings: state => state.settings.showSettings,
       showSettings: state => state.settings.showSettings,
       needTagsView: state => state.settings.tagsView,
       needTagsView: state => state.settings.tagsView,
       fixedHeader: state => state.settings.fixedHeader
       fixedHeader: state => state.settings.fixedHeader
@@ -50,9 +52,21 @@ export default {
       }
       }
     }
     }
   },
   },
+  created() {
+    this.checkSysName()
+  },
   methods: {
   methods: {
     handleClickOutside() {
     handleClickOutside() {
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+    },
+    checkSysName() {
+      if (this.systemName) {
+        return false
+      }
+      this.$store.dispatch('user/getSysInfo', this.organizeID).then(() => {
+        this.systemName = this.$store.getters.systemName
+        this.systemImage = this.$store.getters.systemImage
+      })
     }
     }
   }
   }
 }
 }

+ 1 - 1
src/main.js

@@ -20,7 +20,7 @@ import './utils/error-log' // error log
 import * as filters from './filters' // global filters
 import * as filters from './filters' // global filters
 
 
 const organizeID = 1 // 组织ID
 const organizeID = 1 // 组织ID
-const simplePwd = '123456' // 简单密码
+const simplePwd = '12345678' // 简单密码
 /**
 /**
  * If you don't want to use mock-server
  * If you don't want to use mock-server
  * you want to use MockJs for mock api
  * you want to use MockJs for mock api

+ 1 - 1
src/views/login/index.vue

@@ -4,7 +4,7 @@
 
 
       <div class="title-container">
       <div class="title-container">
         <div class="logo"><img class="img" :src="systemImage" alt=""> </div>
         <div class="logo"><img class="img" :src="systemImage" alt=""> </div>
-        <h3 class="title">{{ systemName }}</h3>
+        <h3 class="title">{{ systemName ? systemName : '后台管理系统' }}</h3>
       </div>
       </div>
 
 
       <el-form-item prop="account">
       <el-form-item prop="account">