diff --git a/config.js b/config.js index cef8f9b..8280d52 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ // 应用全局配置 module.exports = { - // baseUrl: 'https://www.nuoyunr.com', - baseUrl: 'http://192.168.1.4:48080', + baseUrl: 'https://www.nuoyunr.com', + // baseUrl: 'http://192.168.1.4:48080', // baseUrl: "http://localhost:48080", imagesUrl: 'http://shequ.0315e.com/static/images/pages/', baseImageUrl: 'https://www.nuoyunr.com/minio/', diff --git a/pages/my/my.vue b/pages/my/my.vue index 5438aed..cbb3ea5 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -112,8 +112,20 @@ }, //获取当前登录用户信息 async getServer() { - await getUserInfoRequest() - this.customInfo = JSON.parse(getUserInfo()) + request({ + url: "/userClient/customer/getUserCustomer", + method: 'get', + params:{} + }).then(res=>{ + if(!res.data){ + uni.reLaunch({ + url: '/pages/my/register' + }) + }else{ + setUserInfo(JSON.stringify(res.data)) + this.customInfo = res.data + } + }) } } } diff --git a/pages/myCar/carDetail.vue b/pages/myCar/carDetail.vue index 8d175f1..d7efb0d 100644 --- a/pages/myCar/carDetail.vue +++ b/pages/myCar/carDetail.vue @@ -5,7 +5,7 @@ 车牌号 - + 品牌 @@ -15,7 +15,7 @@ 型号 - + 车辆类别 diff --git a/pages/myCar/myCar.vue b/pages/myCar/myCar.vue index b2f57ba..c3eee48 100644 --- a/pages/myCar/myCar.vue +++ b/pages/myCar/myCar.vue @@ -133,7 +133,6 @@ export default { } .carImage { - background-color: #eee; width: 240rpx; height: 150rpx; border-radius: 8rpx 8rpx 8rpx 8rpx; diff --git a/utils/request.js b/utils/request.js index 0e5a3be..810ec77 100644 --- a/utils/request.js +++ b/utils/request.js @@ -23,10 +23,13 @@ const request = config => { // 设置租户 const isTanantId = (config.headers || {}).isTanantId === false config.header = config.header || {} - if(getTenantId() && !isTanantId){ - config.header['tenant-id'] = getTenantId() + if(!config.hasOwnProperty("noTenantId")){ + //请求设置了不需要租户,不拼接,,走进这里的是没设置不需要租户的 + if(getTenantId() && !isTanantId){ + config.header['tenant-id'] = getTenantId() + } + config.header['tenant-id'] = 180 } - config.header['tenant-id'] = 180 console.log(config.header,424242); return new Promise((resolve, reject) => { uni.request({