guanchunjie %!s(int64=3) %!d(string=hai) anos
pai
achega
6145e06358
Modificáronse 2 ficheiros con 12 adicións e 4 borrados
  1. 11 3
      src/settings.js
  2. 1 1
      vue.config.js

+ 11 - 3
src/settings.js

@@ -1,6 +1,14 @@
+const Cookies = require("js-cookie");
+console.log(Cookies);
+let title = ''
+let config = Cookies.get('GCLS_Config')
+if (config) {
+  let configObj = JSON.parse(config);
+  title = configObj.title
+}
+console.log(title);
 module.exports = {
-
-  title: '全球汉语教学平台',
+  title: title,
 
   /**
    * @type {boolean} true | false
@@ -13,4 +21,4 @@ module.exports = {
    * @description Whether show the logo in sidebar
    */
   sidebarLogo: false
-}
+}

+ 1 - 1
vue.config.js

@@ -6,7 +6,7 @@ function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = defaultSettings.title || '全球汉语教学平台' // page title
+const name = defaultSettings.title || '教学平台' // page title
 
 // If your port is set to 80,
 // use administrator privileges to execute the command line.