diff --git a/src/pages/orderDetail/orderDetail.vue b/src/pages/orderDetail/orderDetail.vue index 53b2bab..05ad654 100644 --- a/src/pages/orderDetail/orderDetail.vue +++ b/src/pages/orderDetail/orderDetail.vue @@ -31,14 +31,14 @@ const getMemberOrderByIdData = async (orderId) => { const data = res.data if (data.recyclerInfo) { - const arr = JSON.parse(data.recyclerInfo.headIcon) - const imgUrl = serviceDomain + arr[0].url + const arr = data.recyclerInfo.headIcon && JSON.parse(data.recyclerInfo.headIcon) || [] + const imgUrl = serviceDomain + arr[0]?.url data.recyclerInfo.imgUrl = imgUrl } if (data.recycleStationInfo) { - const arr = JSON.parse(data.recycleStationInfo.stationImg) - const imgUrl = serviceDomain + arr[0].url + const arr = data.recycleStationInfo.stationImg && JSON.parse(data.recycleStationInfo.stationImg) || [] + const imgUrl = serviceDomain + arr[0]?.url data.recycleStationInfo.imgUrl = imgUrl } @@ -50,8 +50,8 @@ const getMemberOrderByIdData = async (orderId) => { isOderTypeDZ.value = data.orderType?.code == '520193532170867013' || false data.orderDetails?.forEach((q) => { - const arr = JSON.parse(q.product.photo) - const imgUrl = serviceDomain + arr[0].url + const arr = q.product.photo && JSON.parse(q.product.photo) || [] + const imgUrl = serviceDomain + arr[0]?.url q.imgUrl = imgUrl }) // 预约回收 @@ -119,8 +119,10 @@ const handleCancleOrder = () => { {{ item.product.name }} - 实际价格:{{ item.actualRecoveryPrice }}元 - 实际重量:{{ item.productActualWeight }}千克 + 实际价格:{{ + item.actualRecoveryPrice }}元 + 实际重量:{{ + item.productActualWeight }}千克 @@ -213,8 +215,8 @@ const handleCancleOrder = () => { - 联系人: - {{ order.recycleStationInfo.contactPerson }} + 联系人电话: + {{ order.recycleStationInfo.recycleTel }} 营业时间: @@ -348,6 +350,7 @@ page { font-size: 28rpx; color: #3D3D3D; } + .marginLeft50 { margin-left: 50rpx; } diff --git a/src/services/constants.ts b/src/services/constants.ts index 2b637e3..34ec8be 100644 --- a/src/services/constants.ts +++ b/src/services/constants.ts @@ -52,8 +52,8 @@ export const bannerList = [ }, ] // 文件路径 -// export const serviceDomain = 'https://nxhs.cjyx.cc' -export const serviceDomain = 'http://222.71.165.188:8808' +export const serviceDomain = 'https://nxhs.cjyx.cc' +// export const serviceDomain = 'http://222.71.165.188:8808' // export const serviceDomain = 'http://192.168.0.166:8808' export const storage_userInfo = { userType: {