guanchunjie 3 lat temu
rodzic
commit
25af2b42aa
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      vue.config.js

+ 7 - 1
vue.config.js

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