From 622dbbd2d665030fa12502eec5432ca4a7b9fc8d Mon Sep 17 00:00:00 2001 From: caolc <572275724@qq.com> Date: Fri, 9 Sep 2022 15:02:08 +0800 Subject: [PATCH 1/2] 11 --- pages/escalation/escalation.vue | 1 - utils/request.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/escalation/escalation.vue b/pages/escalation/escalation.vue index 339ca1e..25f35c7 100644 --- a/pages/escalation/escalation.vue +++ b/pages/escalation/escalation.vue @@ -126,7 +126,6 @@ onShow() { this.start = this.datefn(); this.single = this.datefn() - console.log(this.start),'+++++++++++++++++++' this.getByPage() }, methods: { diff --git a/utils/request.js b/utils/request.js index 9c656dc..5dd71ba 100644 --- a/utils/request.js +++ b/utils/request.js @@ -2,12 +2,12 @@ import axios from 'axios' import utils from '@/utils/encode' // const env = 'test' /* */ - // const env = 'test'// 仅用于测试、 - const env = 'production' + const env = 'test'// 仅用于测试、 + // const env = 'production' //42 洛超 /29 孙志华 /40 阿浩 // 测试日日顺时需要连阿浩 -const testUrl = 'http://192.168.110.208:38080' +const testUrl = 'http://192.168.46:38080' // const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old // const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new const productionUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new From e8b3d0f49b62ae63d7beafb50f2b5f01cc4cb71b Mon Sep 17 00:00:00 2001 From: caolc <572275724@qq.com> Date: Wed, 9 Nov 2022 11:46:04 +0800 Subject: [PATCH 2/2] 111 --- pages/escalation/escalation.vue | 1 - pages/home/home.vue | 45 +++++++++++++++++++++++++++------ utils/request.js | 6 ++--- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/pages/escalation/escalation.vue b/pages/escalation/escalation.vue index 339ca1e..25f35c7 100644 --- a/pages/escalation/escalation.vue +++ b/pages/escalation/escalation.vue @@ -126,7 +126,6 @@ onShow() { this.start = this.datefn(); this.single = this.datefn() - console.log(this.start),'+++++++++++++++++++' this.getByPage() }, methods: { diff --git a/pages/home/home.vue b/pages/home/home.vue index 31f2a54..c9057cf 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -416,6 +416,7 @@ }, // 获取油站信息 getSiteInfo(channelId) { + console.log('获取油站信息') oliSiteApi.getSiteDetail(channelId).then(res => { // //console.log(res) if (res.code === 20000) { @@ -450,14 +451,41 @@ this.accountName = items.otherSiteName this.checkList = '' this.checkFirst = false - uni.setStorageSync('checkFirst',false) - uni.setStorage({ - key: 'Authorization', - data: res.data.authTokenDTO.accessToken, - success: () => { - //console.log('Authorization成功', res.data.authTokenDTO.accessToken) - } - }) + uni.setStorageSync('checkFirst',false); + console.log(uni.getStorageSync('Authorization'),'更新前Authorization') + uni.setStorageSync('Authorization',res.data.authTokenDTO.accessToken) + console.log(uni.getStorageSync('Authorization'),'更新后Authorization') + // uni.setStorage({ + // key:'Authorization', + // data:res.data.authTokenDTO.accessToken, + // success: function () { + // console.log('accessToken更新成功'); + // }, + // fail(){ + // console.log('accessToken更新失败') + // } + // }) + // uni.setStorage({ + // key: 'Authorization', + // data: res.data.authTokenDTO.accessToken, + // success: () => { + // console.log('Authorization成功', res.data.authTokenDTO.accessToken) + // }, + // fail(e){ + // console.log(e,'Authorization失败') + // } + // }) + // uni.setStorageSync({ + // key: 'Authorization', + // data: res.data.authTokenDTO.accessToken, + // success: () => { + // console.log('Authorization成功', res.data.authTokenDTO.accessToken) + // }, + // fail(e){ + // console.log(e,'11111111111111') + // } + // }) + this.checkForE =false uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) uni.setStorageSync('loginUser', { @@ -478,6 +506,7 @@ }, //获取油站基本资料 getUserInfo(id) { + console.log('获取油站基本资料') // 获取云站当前登录用户的基础资料 oliSiteApi.getSiteBasicData(id).then(res => { //console.log('用户资料', res) diff --git a/utils/request.js b/utils/request.js index 9c656dc..1b3f35d 100644 --- a/utils/request.js +++ b/utils/request.js @@ -7,11 +7,11 @@ import utils from '@/utils/encode' //42 洛超 /29 孙志华 /40 阿浩 // 测试日日顺时需要连阿浩 -const testUrl = 'http://192.168.110.208:38080' +const testUrl = 'http://192.168.54:38080' // const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old // const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new -const productionUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new -// const productionUrl = 'http://121.196.213.68/adminapi' //预生产 +// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new +const productionUrl = 'http://uat.xingoil.com/adminapi' // const env = process.env.NODE_ENV // 环境 const service = axios.create({ baseURL: env=='production'?productionUrl:testUrl, //