Przeglądaj źródła

环境动态配置

wangtao 1 rok temu
rodzic
commit
084e2fdd88

+ 20 - 0
.env.development

@@ -0,0 +1,20 @@
+# 开发环境配置
+ENV = 'development'
+
+VUE_APP_BASE_API  = 'https://smartpark.caih.com/'
+
+
+#东信api
+VUE_APP_DX_BASE_API  = 'https://smartpark.caih.com/dxapi/'
+
+#中控
+VUE_APP_CONTROL_BASE_API  = 'https://smartpark.caih.com/zkxt/'
+
+#一卡通
+VUE_APP_CARD_BASE_API  = 'https://smartpark.caih.com/ykt/'
+
+#支付
+VUE_APP_PAYMENT_BASE_API  = 'https://smartpark.caih.com/vuepay/'
+
+#运营中心跳转
+VUE_APP_YYZX_BASE_API  = 'http://10.21.39.1:8280/'

+ 22 - 0
.env.production

@@ -0,0 +1,22 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+
+VUE_APP_BASE_API  = 'https://smartpark.caih.com/'
+
+
+#东信api
+VUE_APP_DX_BASE_API  = 'https://smartpark.caih.com/dxapi/'
+
+#中控
+VUE_APP_CONTROL_BASE_API  = 'https://smartpark.caih.com/zkxt/'
+
+#一卡通
+VUE_APP_CARD_BASE_API  = 'https://smartpark.caih.com/ykt/'
+
+#支付
+VUE_APP_PAYMENT_BASE_API  = 'https://smartpark.caih.com/vuepay/'
+
+#运营中心跳转
+VUE_APP_YYZX_BASE_API  = 'http://10.21.39.1:8280/'

+ 22 - 0
.env.staging

@@ -0,0 +1,22 @@
+NODE_ENV = production
+
+# just a flag
+ENV = 'staging'
+
+VUE_APP_BASE_API  = 'https://smartpark.caih.com/'
+
+
+#东信api
+VUE_APP_DX_BASE_API  = 'https://smartpark.caih.com/dxapi/'
+
+#中控
+VUE_APP_CONTROL_BASE_API  = 'https://smartpark.caih.com/zkxt/'
+
+#一卡通
+VUE_APP_CARD_BASE_API  = 'https://smartpark.caih.com/ykt/'
+
+#支付
+VUE_APP_PAYMENT_BASE_API  = 'https://smartpark.caih.com/vuepay/'
+
+#运营中心跳转
+VUE_APP_YYZX_BASE_API  = 'http://10.21.39.1:8280/'

+ 82 - 80
package-lock.json

@@ -1,5 +1,5 @@
 {
-    "version": "0.1.0",
+    "version": "0.1.1",
     "lockfileVersion": 1,
     "requires": true,
     "dependencies": {
@@ -1778,44 +1778,6 @@
                     "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
                     "dev": true
                 },
-                "ansi-styles": {
-                    "version": "4.3.0",
-                    "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-                    "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "color-convert": "^2.0.1"
-                    }
-                },
-                "chalk": {
-                    "version": "4.1.2",
-                    "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-                    "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "ansi-styles": "^4.1.0",
-                        "supports-color": "^7.1.0"
-                    }
-                },
-                "color-convert": {
-                    "version": "2.0.1",
-                    "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-                    "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "color-name": "~1.1.4"
-                    }
-                },
-                "color-name": {
-                    "version": "1.1.4",
-                    "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-                    "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-                    "dev": true,
-                    "optional": true
-                },
                 "css-select": {
                     "version": "4.2.1",
                     "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz",
@@ -1863,13 +1825,6 @@
                         "domhandler": "^4.2.0"
                     }
                 },
-                "has-flag": {
-                    "version": "4.0.0",
-                    "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-                    "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-                    "dev": true,
-                    "optional": true
-                },
                 "html-webpack-plugin": {
                     "version": "3.2.0",
                     "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
@@ -1917,18 +1872,6 @@
                         }
                     }
                 },
-                "loader-utils": {
-                    "version": "2.0.2",
-                    "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
-                    "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "big.js": "^5.2.2",
-                        "emojis-list": "^3.0.0",
-                        "json5": "^2.1.2"
-                    }
-                },
                 "nth-check": {
                     "version": "2.0.1",
                     "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
@@ -1979,16 +1922,6 @@
                         "ansi-regex": "^2.0.0"
                     }
                 },
-                "supports-color": {
-                    "version": "7.2.0",
-                    "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-                    "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "has-flag": "^4.0.0"
-                    }
-                },
                 "util.promisify": {
                     "version": "1.0.0",
                     "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
@@ -1998,18 +1931,6 @@
                         "define-properties": "^1.1.2",
                         "object.getownpropertydescriptors": "^2.0.3"
                     }
-                },
-                "vue-loader-v16": {
-                    "version": "npm:vue-loader@16.8.3",
-                    "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
-                    "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-                    "dev": true,
-                    "optional": true,
-                    "requires": {
-                        "chalk": "^4.1.0",
-                        "hash-sum": "^2.0.0",
-                        "loader-utils": "^2.0.0"
-                    }
                 }
             }
         },
@@ -12851,6 +12772,87 @@
                 }
             }
         },
+        "vue-loader-v16": {
+            "version": "npm:vue-loader@16.8.3",
+            "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+            "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+            "dev": true,
+            "optional": true,
+            "requires": {
+                "chalk": "^4.1.0",
+                "hash-sum": "^2.0.0",
+                "loader-utils": "^2.0.0"
+            },
+            "dependencies": {
+                "ansi-styles": {
+                    "version": "4.3.0",
+                    "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+                    "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+                    "dev": true,
+                    "optional": true,
+                    "requires": {
+                        "color-convert": "^2.0.1"
+                    }
+                },
+                "chalk": {
+                    "version": "4.1.2",
+                    "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+                    "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+                    "dev": true,
+                    "optional": true,
+                    "requires": {
+                        "ansi-styles": "^4.1.0",
+                        "supports-color": "^7.1.0"
+                    }
+                },
+                "color-convert": {
+                    "version": "2.0.1",
+                    "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+                    "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+                    "dev": true,
+                    "optional": true,
+                    "requires": {
+                        "color-name": "~1.1.4"
+                    }
+                },
+                "color-name": {
+                    "version": "1.1.4",
+                    "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+                    "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+                    "dev": true,
+                    "optional": true
+                },
+                "has-flag": {
+                    "version": "4.0.0",
+                    "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+                    "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+                    "dev": true,
+                    "optional": true
+                },
+                "loader-utils": {
+                    "version": "2.0.4",
+                    "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
+                    "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+                    "dev": true,
+                    "optional": true,
+                    "requires": {
+                        "big.js": "^5.2.2",
+                        "emojis-list": "^3.0.0",
+                        "json5": "^2.1.2"
+                    }
+                },
+                "supports-color": {
+                    "version": "7.2.0",
+                    "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+                    "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+                    "dev": true,
+                    "optional": true,
+                    "requires": {
+                        "has-flag": "^4.0.0"
+                    }
+                }
+            }
+        },
         "vue-router": {
             "version": "3.5.2",
             "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz",

+ 1 - 1
package.json

@@ -63,4 +63,4 @@
         "last 2 versions",
         "not dead"
     ]
-}
+}

+ 1 - 2
src/plugins/axios.js

@@ -4,8 +4,7 @@ import Vue from 'vue';
 import axios from "axios";
 // Full config:  https://github.com/axios/axios#request-config
 
-//axios.defaults.baseURL = 'http://172.16.120.104:8085/'; //本地
-axios.defaults.baseURL = 'https://smartpark.caih.com/dxapi/'; //东信部署
+axios.defaults.baseURL = process.env.VUE_APP_DX_BASE_API; //东信部署
 // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
 // axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
 // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

+ 0 - 44
src/plugins/common.js

@@ -29,47 +29,3 @@ export function getPayApi(money, topPayType, payType, channelId, scene, userId)
 
     })
 }
-// 充值记录
-// export function charge(startTime, endTime, current, size) {
-//     return axios.post(`/dxtop/charge/page`, { "startTime": startTime, "endTime": endTime, "current": current, "size": size })
-//         .then(res => {
-//             return res
-//         }).catch(() => {
-
-//         })
-// }
-// //消费记录
-// export function dish(startTime, endTime, current, size) {
-//     return axios.post(`/dxtop/dish/page`, { "startTime": startTime, "endTime": endTime, "current": current, "size": size })
-//         .then(res => {
-//             return res
-//         }).catch(() => {
-
-//         })
-// }
-
-// //人员信息
-// export function user(token) {
-//     return axios.post(`/dxtop/dish/page`, { "token": token })
-//         .then(res => {
-//             return res
-//         }).catch(() => {
-
-//         })
-// }
-
-// export function weixin() {
-//     return axios.get(`wxAccToken`, { "url": "https://smartpark.caih.com/dxapi/wxAccToken?url=https://smartpark.caih.com/dxapi/wxAccToken" })
-//         .then(res => {
-//             return res
-//         }).catch(() => {
-
-//         })
-// }
-// export function cardBalance(card) {
-//     return axios.get(`/dxtop/staff/cardBalance`, { "card": 1 }, { headers: { "Authorization": window.localStorage.getItem('token') } }).then(res => {
-//         console.log(res.data)
-//     }).catch(err => {
-//         console.log(err)
-//     })
-// }

+ 2 - 3
src/views/amount/index.vue

@@ -403,7 +403,7 @@ export default {
     userQuery(){
       axios({//查询信息
         method: 'get',
-        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.getQueryVariable("token"),
+        url: process.env.VUE_APP_CONTROL_BASE_API+'api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.getQueryVariable("token"),
         timeout: 10000,
       }).then(res =>{
         if(res.data?.data?.id){
@@ -829,11 +829,10 @@ export default {
         this.$router.go(-1)
       }else{
         
-          window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
+          window.location.href= process.env.VUE_APP_BASE_API+"h5/#/home/feature"
           // this.$router.go(-2)
 
         
-        //window.location.href = "https://smartpark.caih.com/h5/#/home/feature?isApp=true"
       //}
       }
     }

+ 7 - 7
src/views/catering/index.vue

@@ -142,7 +142,7 @@ export default {
         if(id){
             data.orderStatus = id
              //历史订单
-            axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,data).then(res => { 
+            axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,data).then(res => { 
                 const data = res.data.data.records
                 this.order  = data
                 this.status = true
@@ -150,7 +150,7 @@ export default {
         }else{
             data.statusList = [0,1,2]
              //历史订单
-            axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,data).then(res => { 
+            axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,data).then(res => { 
                 const data = res.data.data.records
                 this.number = data.length
                 if(this.number == "0"){
@@ -175,7 +175,7 @@ export default {
             orderStatus:undefined,
         }
             //历史订单
-        axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,data).then(res => { 
+        axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,data).then(res => { 
             const data = res.data.data.records
             for(let i =0;i<data.length;i++){
                 if(data[i].id == this.$route.query.id){
@@ -227,10 +227,10 @@ export default {
     orderOne(row){
         this.orderDetails = JSON.parse(JSON.stringify(row))
         this.orderDetails.mType = monthDay(this.orderDetails.orderTime) + " " + this.orderDetails.mType
-        axios.get(`https://smartpark.caih.com/dxapi/system/config/configKey/dre_urgency_phone`).then(res => { 
+        axios.get(`${process.env.VUE_APP_DX_BASE_API}system/config/configKey/dre_urgency_phone`).then(res => { 
             this.orderDetails.jjPhone  = res.data.data
             //订单详情
-            axios.get(`https://smartpark.caih.com/dxapi/dreOrderDetail/listByOrder?orderId=${row.id}`).then(res => { 
+            axios.get(`${process.env.VUE_APP_DX_BASE_API}dreOrderDetail/listByOrder?orderId=${row.id}`).then(res => { 
                 this.dishes = res.data.data
                 this.show = true
             })
@@ -253,7 +253,7 @@ export default {
                 sendEndTime:undefined,
             }
             let sid = undefined
-            axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+            axios.get(`${process.env.VUE_APP_DX_BASE_API}dxtop/staff/one`,{
             params:{
                 id:Cookies.get("userId57")
             }
@@ -272,7 +272,7 @@ export default {
                 if(id == "3"){
                     data.sendEndTime = time
                 }
-                axios.put(`https://smartpark.caih.com/dxapi/dreOrder/`,data).then(res => { 
+                axios.put(`${process.env.VUE_APP_DX_BASE_API}dreOrder/`,data).then(res => { 
                     console.log(res)
                     if(res.data.status == "SUCCESS"){
                         if(id == "3"){

+ 3 - 3
src/views/fk/index.vue

@@ -55,7 +55,7 @@ export default {
   },
   methods:  {
     fk(){//访客列表查询
-        axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/queryDmVisitorsApply?page=0&size=100`,{timestamp:Cookies.get("timestamp57"),nonce:Cookies.get("nonce57"),query:{
+        axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/queryDmVisitorsApply?page=0&size=100`,{timestamp:Cookies.get("timestamp57"),nonce:Cookies.get("nonce57"),query:{
 userNumber:Cookies.get("userId57"),applyStatus:0,}},
         {
           headers: {
@@ -70,7 +70,7 @@ userNumber:Cookies.get("userId57"),applyStatus:0,}},
     },
     //访客信息已读消除及页面跳转
     fkId(item){
-      axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/editDmVisitorsApplyStatus`, 
+      axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/editDmVisitorsApplyStatus`, 
       {
         "timestamp":Cookies.get("timestamp57"),
         "nonce":Cookies.get("nonce57"),
@@ -84,7 +84,7 @@ userNumber:Cookies.get("userId57"),applyStatus:0,}},
             "XYTACCESSTOKEN":Cookies.get("token57")
           }
       }).then(res => {
-          window.location.href = `https://smartpark.caih.com/h5/#/myVisitor?id=${item.id}`
+          window.location.href = `${process.env.VUE_APP_BASE_API}h5/#/myVisitor?id=${item.id}`
       }).catch(err =>{
           
       })

+ 5 - 7
src/views/function/index.vue

@@ -59,7 +59,7 @@
           <van-image :src="require('../../assets/image/function/icon1.png')" />
           <van-col >运营中心</van-col>
         </van-col> -->
-        <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/licence',1)">
+        <van-col span="6" class="function" @click="sm(linkUrl+'h5/#/licence',1)">
           <van-image :src="require('../../assets/image/function/icon2.png')" />
           <div class="title">停车管理</div>
         </van-col>
@@ -67,12 +67,9 @@
           <van-image :src="require('../../assets/image/function/icon3.png')" />
           <div class="title">一卡通</div>
         </van-col>
-        <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/Food')">
-          <van-image :src="require('../../assets/image/function/icon5.png')" />
-          <van-col >智慧餐饮</van-col>
-        </van-col> -->
+     
 
-        <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/myVisitor',2)">
+        <van-col span="6" class="function" @click="sm(linkUrl+'h5/#/myVisitor',2)">
           <van-image :src="require('../../assets/image/function/icon6.png')" />
           <div class="title">访客申请</div>
         </van-col>
@@ -141,6 +138,7 @@ export default {
       loading: false,
       active: 1,
       title:"功能",
+      linkUrl:process.env.VUE_APP_BASE_API,
       img:{
         msg:require('../../assets/image/msg1.png'),
         fun:require('../../assets/image/fun2.png'),
@@ -228,7 +226,7 @@ export default {
               }
               this.loading = false
               //访客查询
-                axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/queryDmVisitorsApply?page=0&size=100`,
+                axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/queryDmVisitorsApply?page=0&size=100`,
                 {
                   timestamp:Cookies.get("timestamp57"),
                   nonce:Cookies.get("nonce57"),

+ 13 - 30
src/views/home/index.vue

@@ -35,38 +35,21 @@
     <van-row class="contentBox">
       <van-row class="system">
         <van-row  type="flex"  gutter="22" class="menu">
-          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/licence',1)">
-            <van-image :src="require('../../assets/image/ic_车辆登记备份@3x.png')" />
-            <div class="title">车牌登记</div>
-          </van-col> -->
+
           <van-col span="6" class="function" @click="ykt">
             <van-image :src="require('../../assets/image/ic_一卡通备份@3x.png')" />
             <div class="title">余额管理</div>
           </van-col>
-          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/visitorApply',2)">
-            <van-image :src="require('../../assets/image/ic_访客登记备份@3x.png')" />
-            <div class="title">访客登记</div>
-          </van-col> -->
-          <!-- <van-col span="6" class="function" @click="sm('https://smartpark.caih.com/h5/#/safeIndex',3)" v-if="people57 == '1'">
-            <van-image :src="require('../../assets/image/ic_综合安防备份@3x.png')" />
-            <div class="title">综合安防</div>
-          </van-col> -->
-          <!-- <van-col span="6" class="function" @click="dc" >
-            <van-image :src="require('../../assets/image/ic_点餐服务备份@3x.png')" />
-            <div class="title">点餐服务</div>
-          </van-col> -->
+
           <van-col span="6" class="function" @click="pc" v-if="pcy">
             <van-image :src="require('../../assets/image/ic_配餐服务备份@3x.png')" />
             <div class="title">配餐服务</div>
           </van-col>
-          <van-col span="6" class="function" @click="yddp('http://10.21.39.1:8280/#/index')" v-if="MT57">
+          <van-col span="6" class="function" @click="yddp(linkUrl+'#/index')" v-if="MT57">
             <van-image :src="require('../../assets/image/yd.png')" />
             <div class="title">运营中心</div>
           </van-col>
-          <!-- <van-col span="6" class="function"  v-if="people57 == '1'">
-            <van-image :src="require('../../assets/image/function/icon11.png')" />
-            <div class="title">预约场地</div>
-          </van-col> -->
+      
         </van-row>
       </van-row>
       <van-row class="record">
@@ -148,6 +131,7 @@ import { encrypt, decrypt } from '../../utils/jsencrypt';
 export default {
   data() {
     return {
+        linkUrl:process.env.VUE_APP_YYZX_BASE_API,
       //个人信息
         portrait57:undefined,
         nickName57:undefined,
@@ -231,7 +215,7 @@ export default {
       }
     })
     //车牌号查询
-    axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/getPlateNumber`, 
+    axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/getPlateNumber`, 
     {
       "nonce": Cookies.get("nonce57"),
       "timestamp": Cookies.get("timestamp57"),
@@ -255,7 +239,7 @@ export default {
     })
     
     //通行记录
-    axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/getAccessTraffic?page=0&size=6&sort=id,desc`, 
+    axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/getAccessTraffic?page=0&size=6&sort=id,desc`, 
     {
       "nonce": Cookies.get("nonce57"),
       "timestamp": Cookies.get("timestamp57"),
@@ -277,7 +261,7 @@ export default {
         Toast(err.response.data.message)
     })
     //停车记录
-    axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/getParkingTrafficByUserNumber?page=0&size=6&sort=id,desc`, 
+    axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/getParkingTrafficByUserNumber?page=0&size=6&sort=id,desc`, 
     {
       "nonce": Cookies.get("nonce57"),
       "timestamp": Cookies.get("timestamp57"),
@@ -325,7 +309,7 @@ export default {
     })
     //访客查询
     
-    axios.post(`https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/getVisitant?page=0&size=10`,
+    axios.post(`${process.env.VUE_APP_CARD_BASE_API}api/thirdparty/v1/openInterface/getVisitant?page=0&size=10`,
     {
       timestamp:Cookies.get("timestamp57"),
       nonce:Cookies.get("nonce57"),
@@ -362,13 +346,13 @@ export default {
         type:"wx_yt"
       }
       if(id == 1){
-        window.location.href = `https://smartpark.caih.com/h5/#/parkingAdministration?param=${encodeURIComponent(JSON.stringify(param))}`
+        window.location.href = `${process.env.VUE_APP_BASE_API}h5/#/parkingAdministration?param=${encodeURIComponent(JSON.stringify(param))}`
       }
       if(id == 2){
         this.$router.push({ path: `/record?id=2`})
       }
       if(id == 3){
-        window.location.href = `https://smartpark.caih.com/h5/#/myVisitor?param=${encodeURIComponent(JSON.stringify(param))}`
+        window.location.href = `${process.env.VUE_APP_BASE_API}h5/#/myVisitor?param=${encodeURIComponent(JSON.stringify(param))}`
       }
       
       
@@ -382,13 +366,13 @@ export default {
       let params = JSON.stringify({nonce:this.nonce,timestamp:this.timestamp,query:{userId:this.userId}})
       this.formData.append('params', params)// 参数
       this.formData.append('multipartFile', param.file)// 参数
-      axios.post(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/edit/zkuser/picture` ,this.formData, 
+      axios.post(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/edit/zkuser/picture` ,this.formData, 
         {headers: {
               'Content-Type': "multipart/form-data",
               "XYTACCESSTOKEN":this.token
           }
         }).then(res => {
-            axios.get(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/appLogin?name=${this.username}&pass=${this.password}`).then(res => {
+            axios.get(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/appLogin?name=${this.username}&pass=${this.password}`).then(res => {
               if (res?.data?.data?.data?.cipher) {
                   localStorage.setItem("cipher57",res?.data?.data?.data?.cipher)
                   localStorage.setItem("classify","1")
@@ -426,7 +410,6 @@ export default {
     },
     //世茂
     sm(url){
-      // https://smartpark.caih.com/h5/#/myVisitor 访客申请列表页
       let param = {
         userid:encrypt(Cookies.get("username57")),
         password:Cookies.get("password57"),

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

@@ -85,7 +85,7 @@ export default {
     userQuery(){
       axios({//查询信息
           method: 'get',
-          url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.getQueryVariable("token"),
+          url: process.env.VUE_APP_CONTROL_BASE_API+'api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.getQueryVariable("token"),
           timeout: 10000,
         }).then(res =>{
           if(res.data?.data?.id){

+ 3 - 3
src/views/information/index.vue

@@ -130,13 +130,13 @@ export default {
       let params = JSON.stringify({nonce:this.nonce,timestamp:this.timestamp,query:{userId:this.userId}})
       this.formData.append('params', params)// 参数
       this.formData.append('multipartFile', param.file)// 参数
-      axios.post(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/edit/zkuser/picture` ,this.formData, 
+      axios.post(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/edit/zkuser/picture` ,this.formData, 
         {headers: {
               'Content-Type': "multipart/form-data",
               "XYTACCESSTOKEN":this.token
           }
         }).then(res => {
-            axios.get(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/appLogin?name=${this.username}&pass=${this.password}`).then(res => {
+            axios.get(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/appLogin?name=${this.username}&pass=${this.password}`).then(res => {
               if (res?.data?.data?.data?.cipher) {
                   localStorage.setItem("cipher57",res?.data?.data?.data?.cipher)
                   localStorage.setItem("classify","1")
@@ -177,7 +177,7 @@ export default {
     },
     submit(){
       if(this.oldPass && this.newPass){
-        axios.post(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/edit/zkuser/pass`, 
+        axios.post(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/edit/zkuser/pass`, 
           {
             "nonce": Cookies.get("nonce57"),
             "timestamp": Cookies.get("timestamp57"),

+ 11 - 11
src/views/login/index.vue

@@ -102,7 +102,7 @@ export default {
   mounted() {
 
     document.title = '中国东信智慧园区'
-  //  Cookies.set("openid57",'o5P6I5tLj-TjrK7leWUT8EFmTCa4') //本地测试
+   Cookies.set("openid57",'o5P6I5tLj-TjrK7leWUT8EFmTCa4') //本地测试
     if(Cookies.get('rememberMe57')){
       this.loginForm.rememberMe = Boolean(Cookies.get('rememberMe57'))
     }
@@ -147,7 +147,7 @@ export default {
        return gvalue;
      },
     wx_login2(){//微信拉起授权获取code
-      window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd64360a4b8c50006&redirect_uri=https://smartpark.caih.com/vuepay&response_type=code&scope=snsapi_base&state=123`
+      window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd64360a4b8c50006&redirect_uri=${process.env.VUE_APP_BASE_API}/vuepay&response_type=code&scope=snsapi_base&state=123`
       //获取openid
       //https://api.weixin.qq.com/sns/oauth2/access_token?appid=wxd64360a4b8c50006&secret=b758e45c89162542610509dafd9db7c3&code=021Ye8Ha1jvNXC0ckiJa1JtKPF2Ye8Hp&grant_type=authorization_code
     },
@@ -185,13 +185,13 @@ export default {
     },
     login_info() {
       if(Cookies.get("openid57") && Cookies.get("username57") && Cookies.get("password57")){
-        window.location.href = "https://smartpark.caih.com/vuepay/#/home"
+        window.location.href = process.env.VUE_APP_PAYMENT_BASE_API+"#/home"
         // this.$router.push({ path: `/home`}) 
       }else{
         this.$refs.loginForm.validate(valid => {
           if (valid) {
             this.loading = true;
-            axios.get(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/appLogin?name=${this.loginForm.username}&pass=${this.loginForm.password}`).then(res => {
+            axios.get(`${process.env.VUE_APP_CONTROL_BASE_API}api/thirdparty/v1/user/appLogin?name=${this.loginForm.username}&pass=${this.loginForm.password}`).then(res => {
               if (res?.data?.data?.data?.cipher) {
                 let data = res.data.data.data
                 //人员种类(00-正式人员、01-外协单位、02-租户)
@@ -225,13 +225,13 @@ export default {
                       id:data.userId,
                       openId:Cookies.get("openid57")
                     })
-                    axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+                    axios.get(process.env.VUE_APP_DX_BASE_API+"dxtop/staff/one",{
                       params:{
                         id: Cookies.get("userId57")
                       }
                     }).then(res2=>{
                       let data2 = res2.data.data.sid
-                      axios.get('https://smartpark.caih.com/dxapi/dreUser/page', {
+                      axios.get(process.env.VUE_APP_DX_BASE_API+'dreUser/page', {
                         params:{
                           current:1,size:500
                         }
@@ -245,8 +245,8 @@ export default {
                           }
                         }
                         setTimeout(()=>{
-                          // this.$router.push({ path: `/home`}) 
-                          window.location.href = "https://smartpark.caih.com/vuepay/#/home"
+                          this.$router.push({ path: `/home`})  //本地打开
+                          // window.location.href = process.env.VUE_APP_PAYMENT_BASE_API+"#/home"
                         },200)
                      })
                     })
@@ -281,13 +281,13 @@ export default {
                       id:data.userId,
                       openId:Cookies.get("openid57")
                     })
-                    axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+                    axios.get(process.env.VUE_APP_DX_BASE_API+"dxtop/staff/one",{
                       params:{
                         id: Cookies.get("userId57")
                       }
                     }).then(res2=>{
                       let data2 = res2.data.data.sid
-                      axios.get('https://smartpark.caih.com/dxapi/dreUser/page', {
+                      axios.get(process.env.VUE_APP_DX_BASE_API+'dreUser/page', {
                         params:{
                           current:1,size:500
                         }
@@ -302,7 +302,7 @@ export default {
                         }
                         setTimeout(()=>{
                           //this.$router.push({ path: `/home`}) 
-                          window.location.href = "https://smartpark.caih.com/vuepay/#/home"
+                          window.location.href = process.env.VUE_APP_PAYMENT_BASE_API+"#/home"
                         },200)
                      })
                     })

+ 3 - 3
src/views/orderingFood/address/index.vue

@@ -97,7 +97,7 @@ export default {
   },
   created() {
       //获取默认地址
-      axios.get(`https://smartpark.caih.com/dxapi/system/config/configKey/dre_default_address`).then(res => { 
+      axios.get(`${process.env.VUE_APP_DX_BASE_API}system/config/configKey/dre_default_address`).then(res => { 
         const data = res.data.data.split(',')
         let arr = []
         for(let i =0;i<data.length;i++){
@@ -168,13 +168,13 @@ export default {
           return
         }
       }
-      axios.get("https://smartpark.caih.com/dxapi/dxtop/staff/one",{
+      axios.get(`${process.env.VUE_APP_DX_BASE_API}dxtop/staff/one`,{
         params:{
           //id: Cookies.get("userId57") //测试
           id: localStorage.getItem("user_wt")
         }
       }).then(res2 =>{
-        axios.post(`https://smartpark.caih.com/dxapi/dreOrder/`,
+        axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/`,
           {
             orderUserName:Cookies.get("nickName57"),
             address:this.form.id == "自定义送餐地址:" ? this.form.address : this.form.id,

+ 3 - 3
src/views/orderingFood/index copy.vue

@@ -141,7 +141,7 @@ export default {
   },
   mounted(){
     //获取菜单
-    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1`).then(res => { 
+    axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1`).then(res => { 
      const data = res.data.data.records
      this.RecommendedDishes  = data
     })
@@ -150,7 +150,7 @@ export default {
     let startTime = getNowTime().split(" ")[0] + " 00:00:00"
     let endTime = getNowTime().split(" ")[0] + " 23:59:59"
     //历史订单
-      axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
+      axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,{
         current:1,
         size:500,
         orderUserName:Cookies.get("nickName57"),
@@ -188,7 +188,7 @@ export default {
       localStorage.setItem("tokenERP",this.$route.query.token)
       axios({//查询信息
         method: 'get',
-        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
+        url: process.env.VUE_APP_CONTROL_BASE_API+'thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
         timeout: 10000,
       }).then(res =>{
         if(res.data?.data?.id){

+ 5 - 5
src/views/orderingFood/index.vue

@@ -123,7 +123,7 @@ export default {
   },
   mounted(){
     //获取服务器时间
-    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/mDate`).then(res => { 
+    axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/mDate`).then(res => { 
       let nowTime = undefined
       let nowF = undefined
       // 本地时间测试
@@ -167,7 +167,7 @@ export default {
         Toast("没有获取token信息")
       }
       //获取菜单
-      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1&status=0`).then(res => { 
+      axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/list?current=1&size=500&type=${this.type}&isRecommend=1&status=0`).then(res => { 
         const data = res.data.data.records
         let time4 = new Date(Date.parse(data[0].createTime.replace(/-/g, '/'))).getTime() / 1000//创建时间
         if(!this.today){
@@ -189,7 +189,7 @@ export default {
     let startTime = GetDateStr(-1) + " 19:00:00"
     let endTime = GetDateStr(1) + " 19:00:00"
     //历史订单
-      axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
+      axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,{
         current:1,
         size:500,
         statusList:[0,1,2],
@@ -229,7 +229,7 @@ export default {
       localStorage.setItem("tokenERP",this.$route.query.token)
       axios({//查询信息
         method: 'get',
-        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
+        url: process.env.VUE_APP_CONTROL_BASE_API+'api/thirdparty/v1/user/getZkUserByCipher?cipher=' + this.$route.query.token,
         timeout: 10000,
       }).then(res =>{
         if(res.data?.data?.id){
@@ -253,7 +253,7 @@ export default {
     },
     /** 返回上级或app目录页 */
     fanhuiBtn(){
-      window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
+      window.location.href= process.env.VUE_APP_CONTROL_BASE_API+"h5/#/home/feature"
       //this.$router.back()
       //this.$router.go(-1)
       //this.$router.push({ path: "/home"})

+ 1 - 1
src/views/orderingFood/orderList/index.vue

@@ -77,7 +77,7 @@ export default {
   },
   mounted(){
     //历史订单
-      axios.post(`https://smartpark.caih.com/dxapi/dreOrder/page`,{
+      axios.post(`${process.env.VUE_APP_DX_BASE_API}dreOrder/page`,{
         current:1,
         size:500,
         //orderUserName:"王卫",

+ 2 - 2
src/views/orderingFood/orderService/index.vue

@@ -142,7 +142,7 @@ export default {
     //document.title = '中国东信智慧园区'
     //时段判断
     //获取服务器时间
-    axios.get(`https://smartpark.caih.com/dxapi/dreMenu/mDate`).then(res => {
+    axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/mDate`).then(res => {
       let nowTime = undefined
       let nowF = undefined
       //本地时间测试
@@ -260,7 +260,7 @@ export default {
     /** 菜单 */
     foodMenu(id,startTime){
       this.foodList  = []
-      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${id}&status=0&status=0`).then(res => { 
+      axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/list?current=1&size=500&type=${id}&status=0&status=0`).then(res => { 
         const data = res.data.data.records
         this.time4 = new Date(Date.parse(data[0].createTime.replace(/-/g, '/'))).getTime() / 1000//创建时间
         const arr = []

+ 1 - 1
src/views/orderingFood/orderService/index2.vue

@@ -224,7 +224,7 @@ export default {
     /** 菜单 */
     foodMenu(id){
       this.foodList  = []
-      axios.get(`https://smartpark.caih.com/dxapi/dreMenu/list?current=1&size=500&type=${id}&status=0`).then(res => { 
+      axios.get(`${process.env.VUE_APP_DX_BASE_API}dreMenu/list?current=1&size=500&type=${id}&status=0`).then(res => { 
         const data = res.data.data.records
         for(let i = 0;i<data.length;i++){
           data[i].num = 0

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

@@ -42,7 +42,7 @@ export default {
   },
   methods:{
      fanhuiBtn(){
-      window.location.href= "https://smartpark.caih.com/h5/#/home/feature"
+      window.location.href= process.env.VUE_APP_BASE_API+"/h5/#/home/feature"
      }
   }
 }

+ 11 - 11
vue.config.js

@@ -35,17 +35,17 @@ module.exports = {
         // https: false, // https:{type:Boolean}
         open: true, // 配置自动启动浏览器
         hotOnly: true, // 热更新
-        proxy: {
-            // 配置多个跨域
-            '/': {
-                target: 'https://smartpark.caih.com/dxapi/', //东信
-                //target: 'https://smartpark.caih.com/dxapi/', //本地
-                changeOrigin: false,
-                pathRewrite: {
-                    '': '/'
-                }
-            }
-        },
+        // proxy: {
+        //     // 配置多个跨域
+        //     '/': {
+        //         target: '', //
+        //         //target: '', //
+        //         changeOrigin: false,
+        //         pathRewrite: {
+        //             '': '/'
+        //         }
+        //     }
+        // },
         headers: {
             'Access-Control-Allow-Origin': '*',
         }