fix: 增加获取详情 判断,减少错误接口请求
This commit is contained in:
parent
73e0a4eb71
commit
0fa9f34df4
|
@ -102,8 +102,8 @@
|
||||||
|
|
||||||
/* 获取详情 */
|
/* 获取详情 */
|
||||||
function getInfo(isLoading) {
|
function getInfo(isLoading) {
|
||||||
|
|
||||||
const orderNumber = sessionStorage.getItem('orderNumber');
|
const orderNumber = sessionStorage.getItem('orderNumber');
|
||||||
|
if (orderNumber) {
|
||||||
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
@ -124,6 +124,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* 重新兑换 */
|
/* 重新兑换 */
|
||||||
function toHome() {
|
function toHome() {
|
||||||
if (goods.value.use_coupon === 2) {
|
if (goods.value.use_coupon === 2) {
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
/* 获取详情 */
|
/* 获取详情 */
|
||||||
function getInfo(isLoading) {
|
function getInfo(isLoading) {
|
||||||
const orderNumber = sessionStorage.getItem('orderNumber');
|
const orderNumber = sessionStorage.getItem('orderNumber');
|
||||||
|
if (orderNumber) {
|
||||||
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
@ -106,6 +107,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 重新兑换 */
|
/* 重新兑换 */
|
||||||
function toHome() {
|
function toHome() {
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
},
|
},
|
||||||
//获取订单详情
|
//获取订单详情
|
||||||
getOrderDetail(id) {
|
getOrderDetail(id) {
|
||||||
|
if (id) {
|
||||||
req.axiosGet("/key/order/detail/" + id).then((res) => {
|
req.axiosGet("/key/order/detail/" + id).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.orderInfo = res.data;
|
this.orderInfo = res.data;
|
||||||
|
@ -130,6 +131,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch();
|
}).catch();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//弹出框提示
|
//弹出框提示
|
||||||
|
|
Loading…
Reference in New Issue