diff --git a/.env.development b/.env.development index a2b6e98..47e54ee 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' # 定义变量 -VUE_APP_CITY_TYPE = '' +VUE_APP_CITY_TYPE = 'ah' # 开发环境接口调用前缀 # VUE_APP_BASE_API = '/dev-api' diff --git a/.env.production b/.env.production index cbd9641..4033a7a 100644 --- a/.env.production +++ b/.env.production @@ -6,7 +6,7 @@ NODE_ENV=production # 测试0 生产1 VUE_APP_ENV = '1' # 定义变量 -VUE_APP_CITY_TYPE = 'cq' +VUE_APP_CITY_TYPE = 'sx' # base api VUE_APP_BASE_API = '' diff --git a/src/api/axios.js b/src/api/axios.js index 029851f..f076918 100644 --- a/src/api/axios.js +++ b/src/api/axios.js @@ -35,7 +35,7 @@ const LoadingInstance = { function myAxios(axiosConfig, customOptions) { const service = axios.create({ baseURL: axiosConfig.type ? '' : baseURLs, // 设置统一的请求前缀 - timeout: 20000, // 设置统一的超时时长 + timeout: 30000, // 设置统一的超时时长 }); // 自定义配置 @@ -143,8 +143,8 @@ function httpErrorStatusHandle(error) { // console.log(router,'114'); // router.push('/login') // eslint-disable-next-line no-case-declarations - let pathName = sessionStorage.getItem('path') - router.push(pathName) + // let pathName = sessionStorage.getItem('path') + // router.push(pathName) break; case 403: message = '您没有权限操作!'; break; case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下 diff --git a/src/api/config.js b/src/api/config.js index e34eb5b..b1887ad 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -5,7 +5,7 @@ if (process.env.NODE_ENV === 'development') { // 测试环境 // baseURL = 'http://172.29.69.38:28083/' //后端ip和端口 // baseURL = 'http://192.168.1.116:28083/' //测试后端ip和端口 - baseURL = 'http://172.29.69.38:19012/' //测试后端ip和端口 + baseURL = 'http://172.29.106.250:19012/' //测试后端ip和端口 } else { // 生产环境 @@ -13,8 +13,8 @@ if (process.env.NODE_ENV === 'development') { // baseURL = '/proxy-ah' //安徽 打包以后的路径 // baseURL = '/proxy-nx' //宁夏 打包以后的路径 // baseURL = '/proxy-xj' //新疆 打包以后的路径 - // baseURL = '/proxy-sx' //山西 打包以后的路径 - baseURL = '/proxy-cq' //重庆 打包以后的路径 + baseURL = '/proxy-sx' //山西 打包以后的路径 + // baseURL = '/proxy-cq' //重庆 打包以后的路径 } diff --git a/src/settings.js b/src/settings.js index 97bb2fb..fa4b443 100644 --- a/src/settings.js +++ b/src/settings.js @@ -10,7 +10,7 @@ module.exports = { */ sidebarLogo: true, menuExclude: [], - downloadUrl: `${process.env.VUE_APP_BASE_API}/proxy-cq/file/minio/download/`, + downloadUrl: `${process.env.VUE_APP_BASE_API}/proxy-sx/file/minio/download/`, uploadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/upload/`, statusCode: { SUCCESS: 0 diff --git a/src/views/comment/components/cleanEnery.vue b/src/views/comment/components/cleanEnery.vue index 96c3eed..5d84049 100644 --- a/src/views/comment/components/cleanEnery.vue +++ b/src/views/comment/components/cleanEnery.vue @@ -114,6 +114,10 @@ export default { async getLoginCustomer() { this.loading2 = true try { + let reportCustomerId = localStorage.getItem('reportCustomerId') + if(reportCustomerId&&this.$route.name=='energyReport'){ + return + } const res = await getLoginCustomerAPI() // console.log(res.data.customerId); if (res.code == 0) { diff --git a/src/views/comment/components/device.vue b/src/views/comment/components/device.vue index 899e0f5..e80988f 100644 --- a/src/views/comment/components/device.vue +++ b/src/views/comment/components/device.vue @@ -626,6 +626,10 @@ export default { async getLoginCustomer() { this.loading2 = true try { + let reportCustomerId = localStorage.getItem('reportCustomerId') + if(reportCustomerId&&this.$route.name=='energyReport'){ + return + } const res = await getLoginCustomerAPI() // console.log(res.data.customerId); if (res.code == 0) { diff --git a/src/views/comment/components/energyReport-quota.vue b/src/views/comment/components/energyReport-quota.vue index 0700135..ea99b8b 100644 --- a/src/views/comment/components/energyReport-quota.vue +++ b/src/views/comment/components/energyReport-quota.vue @@ -716,6 +716,10 @@ export default { async getLoginCustomer() { this.loading2 = true try { + let reportCustomerId = localStorage.getItem('reportCustomerId') + if(reportCustomerId&&this.$route.name=='energyReport'){ + return + } const res = await getLoginCustomerAPI() // console.log(res.data.customerId); if (res.code == 0) { diff --git a/src/views/comment/components/manage.vue b/src/views/comment/components/manage.vue index e2ddb77..89cf51d 100644 --- a/src/views/comment/components/manage.vue +++ b/src/views/comment/components/manage.vue @@ -156,7 +156,7 @@