瀏覽代碼

'202206171645'

fanghuisheng 3 年之前
父節點
當前提交
de3f562bc1
共有 12 個文件被更改,包括 41 次插入37 次删除
  1. 5 4
      .env.development
  2. 2 1
      .env.production
  3. 二進制
      202206171426.zip
  4. 1 0
      package-lock.json
  5. 4 2
      package.json
  6. 二進制
      public/favicon.ico
  7. 二進制
      public/favicon3.ico
  8. 10 10
      public/static/config.js
  9. 1 1
      src/api/home/home.js
  10. 0 1
      src/main.js
  11. 17 17
      src/utils/request.js
  12. 1 1
      src/views/home/index.vue

+ 5 - 4
.env.development

@@ -1,4 +1,5 @@
-	// development 开发环境
-	NODE_ENV='development'
-	// 下面的为接口地址。此处/api是我经过webpack设置跨域代理之后的地址
-	VUE_APP_BASE_URL='https://qhome.usky.cn/fivapi/'
+// development 开发环境
+NODE_ENV='development'
+// 下面的为接口地址。此处/api是我经过webpack设置跨域代理之后的地址
+VUE_APP_BASE_URL='https://qhome.usky.cn/fivapi/'
+VUE_APP_BASE_FILE='https://qhome.usky.cn/uskyfile/'

+ 2 - 1
.env.production

@@ -1,4 +1,5 @@
 // production 生产环境
 NODE_ENV = 'production'
 // 下方链接为生产环境接口地址
-VUE_APP_BASE_URL='http://我是生产环境接口地址'
+VUE_APP_BASE_URL='https://qhome.usky.cn/uskypower/'
+VUE_APP_BASE_FILE='https://qhome.usky.cn/file/'

二進制
202206171221.zip → 202206171426.zip


+ 1 - 0
package-lock.json

@@ -32,6 +32,7 @@
       "version": "6.0.1",
       "resolved": "https://registry.npmmirror.com/@ant-design/icons-vue/-/icons-vue-6.0.1.tgz",
       "integrity": "sha512-HigIgEVV6bbcrz2A92/qDzi/aKWB5EC6b6E1mxMB6aQA7ksiKY+gi4U94TpqyEIIhR23uaDrjufJ+xCZQ+vx6Q==",
+      "dev": true,
       "requires": {
         "@ant-design/colors": "^5.0.0",
         "@ant-design/icons-svg": "^4.0.0",

+ 4 - 2
package.json

@@ -5,10 +5,11 @@
     "scripts": {
         "serve": "vue-cli-service serve",
         "build": "vue-cli-service build || vue-cli-service build --mode test",
-        "lint": "vue-cli-service lint"
+        "lint": "vue-cli-service lint",
+        "build:development": "vue-cli-service build --mode development",
+        "build:production": "vue-cli-service build --mode production"
     },
     "dependencies": {
-        "@ant-design/icons-vue": "^6.0.1",
         "ant-design-vue": "^2.0.0-rc.7",
         "axios": "^0.21.1",
         "core-js": "^3.6.5",
@@ -22,6 +23,7 @@
         "vuex": "^4.0.0"
     },
     "devDependencies": {
+        "@ant-design/icons-vue": "^6.0.1",
         "@vue/cli-plugin-babel": "~4.5.0",
         "@vue/cli-plugin-eslint": "~4.5.0",
         "@vue/cli-service": "~4.5.0",

二進制
public/favicon.ico


二進制
public/favicon3.ico


+ 10 - 10
public/static/config.js

@@ -3,16 +3,16 @@ var PLATFROM_CONFIG = {};
 // PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
 // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
 
-// console.log(window.location)
-PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
-PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
-    // if (window.location.host.indexOf("localhost") != -1 || window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
-    //     PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
-    //     PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
-    // } else {
-    //     PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api/" //线上
-    //     PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
-    // }
+// // console.log(window.location)
+// PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+// PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
+// if (window.location.host.indexOf("localhost") != -1 || window.location.host.indexOf("pcdev.ewoogi.com") != -1) {
+//     PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+//     PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
+// } else {
+//     PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api/" //线上
+//     PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
+// }
 
 
 // 本地json文件请求路径

+ 1 - 1
src/api/home/home.js

@@ -69,7 +69,7 @@ export default {
     // 地图撒点
     siteList_api(params) {
         return request({
-            url: `site/list`,
+            url: `site/list2`,
             method: 'GET',
             params: params
         })

+ 0 - 1
src/main.js

@@ -66,6 +66,5 @@ router.beforeEach((to, from, next) => {
         } else {
             next()
         }
-
     }
 })

+ 17 - 17
src/utils/request.js

@@ -7,10 +7,11 @@ import router from '@/router'
 
 // create an axios instance
 
-let baseURL = window.PLATFROM_CONFIG.baseUrl
-    // alert(process.env.NODE_ENV)
-    // alert(baseURL)
-    // alert(process.env.VUE_APP_BASE_URL)
+let baseURL = process.env.VUE_APP_BASE_URL
+// let baseURL =  window.PLATFROM_CONFIG.baseUrl 
+// alert(process.env.NODE_ENV)
+// alert(baseURL)
+// alert(process.env.VUE_APP_BASE_URL)
 
 /**
  * @description 处理code异常
@@ -28,11 +29,10 @@ const handleCode = (code, msg) => {
             // })
             router
 
-
             // localStorage.removeItem('accessToken')
             // router.replace({ path: "/login" });
 
-            window.location.href = 'http://101.133.214.75:13201/backStage'
+            window.location.href = 'http://101.133.214.75:13201/'
 
             removeToken()
 
@@ -41,15 +41,15 @@ const handleCode = (code, msg) => {
 }
 
 const service = axios.create({
-        baseURL: baseURL,
-        // baseURL: process.env.NODE_ENV !== "development" ? baseURL : process.env.VUE_APP_BASE_URL,
-        withCredentials: true, // send cookies when cross-domain requests
-        timeout: 5000, // request timeout
-        headers: {
-            'Content-Type': 'application/json;charset=UTF-8',
-        },
-    })
-    // request interceptor
+    baseURL: baseURL,
+    // baseURL: process.env.NODE_ENV !== "development" ? baseURL : process.env.VUE_APP_BASE_URL,
+    withCredentials: true, // send cookies when cross-domain requests
+    timeout: 5000, // request timeout
+    headers: {
+        'Content-Type': 'application/json;charset=UTF-8',
+    },
+})
+// request interceptor
 
 
 service.interceptors.request.use(
@@ -58,8 +58,8 @@ service.interceptors.request.use(
     config => {
         // config.headers.accessToken = getToken()
         var tokenInfo = localStorage.getItem('accessToken')
-            // console.log('tokenInfo')
-            // console.log(tokenInfo)
+        // console.log('tokenInfo')
+        // console.log(tokenInfo)
 
 
         config.headers.accessToken = tokenInfo

+ 1 - 1
src/views/home/index.vue

@@ -446,7 +446,7 @@ export default {
               ? markIconError
               : "",
 
-          //   icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-via-marker.png',
+          //icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-via-marker.png',
           zIndex: 9,
           extData: {
             id: ind + 1,