guanchunjie 3 роки тому
батько
коміт
0b1eb6af60
2 змінених файлів з 20 додано та 18 видалено
  1. 17 11
      src/settings.js
  2. 3 7
      vue.config.js

+ 17 - 11
src/settings.js

@@ -1,15 +1,21 @@
+import { getConfig } from "@/utils/auth";
+let title = ''
+if (getConfig()) {
+  let config = JSON.parse(getConfig());
+  title = config.title
+}
 module.exports = {
 module.exports = {
-    title: '全球汉语教学平台',
+  title: title,
 
 
-    /**
-     * @type {boolean} true | false
-     * @description Whether fix the header
-     */
-    fixedHeader: false,
+  /**
+   * @type {boolean} true | false
+   * @description Whether fix the header
+   */
+  fixedHeader: false,
 
 
-    /**
-     * @type {boolean} true | false
-     * @description Whether show the logo in sidebar
-     */
-    sidebarLogo: false
+  /**
+   * @type {boolean} true | false
+   * @description Whether show the logo in sidebar
+   */
+  sidebarLogo: false
 }
 }

+ 3 - 7
vue.config.js

@@ -1,18 +1,14 @@
 'use strict'
 'use strict'
 const path = require('path')
 const path = require('path')
 const defaultSettings = require('./src/settings.js')
 const defaultSettings = require('./src/settings.js')
-import { getConfig } from "@/utils/auth";
+
 
 
 function resolve(dir) {
 function resolve(dir) {
   return path.join(__dirname, dir)
   return path.join(__dirname, dir)
 }
 }
-let title = ''
-if (getConfig()) {
-  let config = JSON.parse(getConfig());
-  title = config.title
-}
 
 
-const name = defaultSettings.title || title // page title
+
+const name = defaultSettings.title // page title
 
 
 // If your port is set to 80,
 // If your port is set to 80,
 // use administrator privileges to execute the command line.
 // use administrator privileges to execute the command line.