chrislee há 1 semana atrás
pai
commit
d2279a5f6e
2 ficheiros alterados com 16 adições e 16 exclusões
  1. 4 2
      config/index.js
  2. 12 14
      static/config/index.js

+ 4 - 2
config/index.js

@@ -1,13 +1,15 @@
 'use strict'
 
-const currentHost = (window.SITE_CONFIG && window.SITE_CONFIG.domain)
-
 // Template version: 1.2.5
 // see http://vuejs-templates.github.io/webpack for documentation.
 
 const path = require('path')
 const devEnv = require('./dev.env')
 
+// const currentHost = 'www.muzhikeji.cn' // 测试环境
+// const currentHost = '192.168.2.124' // 东齐环境
+const currentHost = '192.168.110.222' // 昌柘环境
+
 module.exports = {
   dev: {
 

+ 12 - 14
static/config/index.js

@@ -1,18 +1,16 @@
 ;(function () {
-  window.SITE_CONFIG = {}
+  if (typeof window !== 'undefined') {
+    window.SITE_CONFIG = {}
 
-  // api接口请求地址(测试)
-  window.SITE_CONFIG['baseUrl'] = 'https://www.muzhikeji.cn/api'
+    // api接口请求地址(测试)
+    window.SITE_CONFIG['baseUrl'] = 'https://www.muzhikeji.cn/api'
 
-  // cdn地址 = 域名 + 版本号
-  window.SITE_CONFIG['domain'] = './' // 域名
-  window.SITE_CONFIG['version'] = ''   // 版本号(年月日时分)
-  window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version
-  // 系统名称
-  window.SITE_CONFIG['systemName'] = '木之云数字化平台'
-  // window.SITE_CONFIG['systemName'] = '昌柘伟业数字化平台'
-  // 域名
-  window.SITE_CONFIG['domain'] = 'www.muzhikeji.cn' // 测试环境
-  // window.SITE_CONFIG['domain'] = '192.168.2.124' // 东齐环境
-  // window.SITE_CONFIG['domain'] = '192.168.110.222' // 昌柘环境
+    // cdn地址 = 域名 + 版本号
+    window.SITE_CONFIG['domain'] = './' // 域名
+    window.SITE_CONFIG['version'] = ''   // 版本号(年月日时分)
+    window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version
+    // 系统名称
+    // window.SITE_CONFIG['systemName'] = '木之云数字化平台'
+    window.SITE_CONFIG['systemName'] = '昌柘伟业数字化平台'
+  }
 })()