diff --git a/public/config.json b/public/config.json
new file mode 100644
index 0000000..99c9299
--- /dev/null
+++ b/public/config.json
@@ -0,0 +1,19 @@
+{
+ "title":"智慧观碳系统",
+ "baseUrl": "http://111.198.10.15:11411",
+ "DataVUrl":[
+ {
+ "name": "碳足迹监测",
+ "url": "https://share.shanhaibi.com/6482e0dc0987c/"
+ },
+ {
+ "name": "碳足迹评价",
+ "url": "https://share.shanhaibi.com/64867996e5a73/"
+ },
+ {
+ "name": "碳足迹预警",
+ "url": "https://share.shanhaibi.com/64867d25bd589/"
+ }
+ ]
+
+}
diff --git a/public/config.json b/public/config.json
new file mode 100644
index 0000000..99c9299
--- /dev/null
+++ b/public/config.json
@@ -0,0 +1,19 @@
+{
+ "title":"智慧观碳系统",
+ "baseUrl": "http://111.198.10.15:11411",
+ "DataVUrl":[
+ {
+ "name": "碳足迹监测",
+ "url": "https://share.shanhaibi.com/6482e0dc0987c/"
+ },
+ {
+ "name": "碳足迹评价",
+ "url": "https://share.shanhaibi.com/64867996e5a73/"
+ },
+ {
+ "name": "碳足迹预警",
+ "url": "https://share.shanhaibi.com/64867d25bd589/"
+ }
+ ]
+
+}
diff --git a/src/main.ts b/src/main.ts
index 553b0a3..b917f84 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,10 +2,12 @@
import ElementPlus from 'element-plus'
// import print from 'vue3-print-nb'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
+import axios from 'axios'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
@@ -30,5 +32,13 @@
app.component(key, component)
}
directive(app)
+axios.get('/config.json').then((result) => {
+ console.log('get config')
+ console.log(result)
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
-app.mount('#app')
diff --git a/public/config.json b/public/config.json
new file mode 100644
index 0000000..99c9299
--- /dev/null
+++ b/public/config.json
@@ -0,0 +1,19 @@
+{
+ "title":"智慧观碳系统",
+ "baseUrl": "http://111.198.10.15:11411",
+ "DataVUrl":[
+ {
+ "name": "碳足迹监测",
+ "url": "https://share.shanhaibi.com/6482e0dc0987c/"
+ },
+ {
+ "name": "碳足迹评价",
+ "url": "https://share.shanhaibi.com/64867996e5a73/"
+ },
+ {
+ "name": "碳足迹预警",
+ "url": "https://share.shanhaibi.com/64867d25bd589/"
+ }
+ ]
+
+}
diff --git a/src/main.ts b/src/main.ts
index 553b0a3..b917f84 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,10 +2,12 @@
import ElementPlus from 'element-plus'
// import print from 'vue3-print-nb'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
+import axios from 'axios'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
@@ -30,5 +32,13 @@
app.component(key, component)
}
directive(app)
+axios.get('/config.json').then((result) => {
+ console.log('get config')
+ console.log(result)
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
-app.mount('#app')
diff --git a/src/utils/fullScreenUrl.ts b/src/utils/fullScreenUrl.ts
deleted file mode 100644
index 4216607..0000000
--- a/src/utils/fullScreenUrl.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// 山海经数据可视化大屏地址
-export function getDataUrl() {
- return [
- {
- name: '碳足迹监测',
- url: 'https://share.shanhaibi.com/6482e0dc0987c/',
- },
- {
- name: '碳足迹评价',
- url: 'https://share.shanhaibi.com/6482d1b93886b/',
- },
- {
- name: '碳足迹预警',
- url: 'https://share.shanhaibi.com/64867d25bd589/',
- },
- ]
-}
diff --git a/public/config.json b/public/config.json
new file mode 100644
index 0000000..99c9299
--- /dev/null
+++ b/public/config.json
@@ -0,0 +1,19 @@
+{
+ "title":"智慧观碳系统",
+ "baseUrl": "http://111.198.10.15:11411",
+ "DataVUrl":[
+ {
+ "name": "碳足迹监测",
+ "url": "https://share.shanhaibi.com/6482e0dc0987c/"
+ },
+ {
+ "name": "碳足迹评价",
+ "url": "https://share.shanhaibi.com/64867996e5a73/"
+ },
+ {
+ "name": "碳足迹预警",
+ "url": "https://share.shanhaibi.com/64867d25bd589/"
+ }
+ ]
+
+}
diff --git a/src/main.ts b/src/main.ts
index 553b0a3..b917f84 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,10 +2,12 @@
import ElementPlus from 'element-plus'
// import print from 'vue3-print-nb'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
+import axios from 'axios'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
@@ -30,5 +32,13 @@
app.component(key, component)
}
directive(app)
+axios.get('/config.json').then((result) => {
+ console.log('get config')
+ console.log(result)
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
-app.mount('#app')
diff --git a/src/utils/fullScreenUrl.ts b/src/utils/fullScreenUrl.ts
deleted file mode 100644
index 4216607..0000000
--- a/src/utils/fullScreenUrl.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// 山海经数据可视化大屏地址
-export function getDataUrl() {
- return [
- {
- name: '碳足迹监测',
- url: 'https://share.shanhaibi.com/6482e0dc0987c/',
- },
- {
- name: '碳足迹评价',
- url: 'https://share.shanhaibi.com/6482d1b93886b/',
- },
- {
- name: '碳足迹预警',
- url: 'https://share.shanhaibi.com/64867d25bd589/',
- },
- ]
-}
diff --git a/src/views/evaluate/page.vue b/src/views/evaluate/page.vue
index 2800dde..6b78d43 100644
--- a/src/views/evaluate/page.vue
+++ b/src/views/evaluate/page.vue
@@ -1,5 +1,4 @@
diff --git a/public/config.json b/public/config.json
new file mode 100644
index 0000000..99c9299
--- /dev/null
+++ b/public/config.json
@@ -0,0 +1,19 @@
+{
+ "title":"智慧观碳系统",
+ "baseUrl": "http://111.198.10.15:11411",
+ "DataVUrl":[
+ {
+ "name": "碳足迹监测",
+ "url": "https://share.shanhaibi.com/6482e0dc0987c/"
+ },
+ {
+ "name": "碳足迹评价",
+ "url": "https://share.shanhaibi.com/64867996e5a73/"
+ },
+ {
+ "name": "碳足迹预警",
+ "url": "https://share.shanhaibi.com/64867d25bd589/"
+ }
+ ]
+
+}
diff --git a/src/main.ts b/src/main.ts
index 553b0a3..b917f84 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,10 +2,12 @@
import ElementPlus from 'element-plus'
// import print from 'vue3-print-nb'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
+import axios from 'axios'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
@@ -30,5 +32,13 @@
app.component(key, component)
}
directive(app)
+axios.get('/config.json').then((result) => {
+ console.log('get config')
+ console.log(result)
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
-app.mount('#app')
diff --git a/src/utils/fullScreenUrl.ts b/src/utils/fullScreenUrl.ts
deleted file mode 100644
index 4216607..0000000
--- a/src/utils/fullScreenUrl.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// 山海经数据可视化大屏地址
-export function getDataUrl() {
- return [
- {
- name: '碳足迹监测',
- url: 'https://share.shanhaibi.com/6482e0dc0987c/',
- },
- {
- name: '碳足迹评价',
- url: 'https://share.shanhaibi.com/6482d1b93886b/',
- },
- {
- name: '碳足迹预警',
- url: 'https://share.shanhaibi.com/64867d25bd589/',
- },
- ]
-}
diff --git a/src/views/evaluate/page.vue b/src/views/evaluate/page.vue
index 2800dde..6b78d43 100644
--- a/src/views/evaluate/page.vue
+++ b/src/views/evaluate/page.vue
@@ -1,5 +1,4 @@
diff --git a/vite.config.ts b/vite.config.ts
index 8589a2e..288448a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -24,6 +24,7 @@
base: './',
// 开发服务器选项 https://cn.vitejs.dev/config/#server-options
server: {
+ host: '0.0.0.0', // 设置ip分享
open: true,
port: 9000,
proxy: {