Commit 49cf6d7f authored by 琉璃丶c's avatar 琉璃丶c

1.限制 订单详情页面的商品列表最多显示3个

2.添加 接口调用失败提示
parent 6f0956d0
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
</div> </div>
</div> </div>
<!-- 物流追踪信息 --> <!-- 物流追踪信息 -->
<div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'" v-if="stepList&&stepList.length > 0"> <div id="stepLine" :class="stepList.length>2?'logistics-step-line':'logistics-step-line_show'"
v-if="stepList&&stepList.length > 0">
<logistics-step> <logistics-step>
<step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/> <step-item v-for="(item, index) in stepList" :stepInfo=item :key="index"/>
</logistics-step> </logistics-step>
...@@ -138,10 +139,14 @@ export default { ...@@ -138,10 +139,14 @@ export default {
this.getGpsPoint() this.getGpsPoint()
} }
} else { } else {
console.log('运单信息', '请求无数据') if (rt.code === 500) {
this.$toast(rt.msg)
}
// console.log('运单信息', '请求无数据')
} }
}).catch(err => { }).catch(err => {
console.log('运单信息', err) console.log('运单信息', err)
this.$toast('运单信息获取失败')
}) })
}, },
/* 物流追踪 */ /* 物流追踪 */
...@@ -174,9 +179,14 @@ export default { ...@@ -174,9 +179,14 @@ export default {
}) })
}) })
this.stepList = tempStep this.stepList = tempStep
} else {
if (res.code === 500) {
this.$toast(res.msg)
}
} }
}).catch(err => { }).catch(err => {
console.log('物流跟踪', err) console.log('物流跟踪', err)
this.$toast('物流跟踪信息获取失败')
}) })
}, },
/* GPS 定位信息 */ /* GPS 定位信息 */
...@@ -192,9 +202,14 @@ export default { ...@@ -192,9 +202,14 @@ export default {
if (res.code === 200 && res.data.code === '00000' && if (res.code === 200 && res.data.code === '00000' &&
res.data.entity && res.data.entity.gisMapInfoList) { res.data.entity && res.data.entity.gisMapInfoList) {
this.mapPointList = res.data.entity.gisMapInfoList this.mapPointList = res.data.entity.gisMapInfoList
} else {
if (res.code === 500) {
this.$toast(res.msg)
}
} }
}).catch(err => { }).catch(err => {
console.log('GPS信息', err) console.log('GPS信息', err)
this.$toast('GIS信息获取失败')
}) })
} }
} }
......
...@@ -304,11 +304,17 @@ export default { ...@@ -304,11 +304,17 @@ export default {
this.storageModel.jm = true this.storageModel.jm = true
} }
}) })
// 最多显示3条数据
this.detailData.goodsInfos = this.detailData.goodsInfos.slice(0, 3)
} else { } else {
console.log('订单详情', '请求失败') console.log('订单详情', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
}
} }
}).catch(err => { }).catch(err => {
console.log('订单详情', err) console.log('订单详情', err)
this.$toast('订单详情获取失败')
}) })
}, },
/* 物流追踪 */ /* 物流追踪 */
...@@ -330,9 +336,14 @@ export default { ...@@ -330,9 +336,14 @@ export default {
res.data.entity && res.data.entity.logisticsTrackingInfoList) { res.data.entity && res.data.entity.logisticsTrackingInfoList) {
this.trackData = res.data.entity.logisticsTrackingInfoList this.trackData = res.data.entity.logisticsTrackingInfoList
this.calcOrderStep(this.trackData.currentOrderStatusCode) this.calcOrderStep(this.trackData.currentOrderStatusCode)
} else {
if (res.code === 500) {
this.$toast(res.msg)
}
} }
}).catch(err => { }).catch(err => {
console.log('物流跟踪', err) console.log('物流跟踪', err)
this.$toast('物流追踪信息获取失败')
}) })
}, },
/* 获取发票列表 */ /* 获取发票列表 */
...@@ -369,9 +380,13 @@ export default { ...@@ -369,9 +380,13 @@ export default {
this.invoiceData = res.data.entity this.invoiceData = res.data.entity
} else { } else {
console.log('发票明细', '请求失败') console.log('发票明细', '请求失败')
if (res.code === 500) {
this.$toast(res.msg)
}
} }
}).catch(err => { }).catch(err => {
console.log('发票明细', err) console.log('发票明细', err)
this.$toast('发票明细获取失败')
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment