|
@@ -243,6 +243,7 @@
|
|
|
return {
|
|
|
id: '',
|
|
|
status: '',
|
|
|
+ is_order: false,
|
|
|
info: {},
|
|
|
// 售后状态
|
|
|
statusList: [],
|
|
@@ -252,6 +253,8 @@
|
|
|
const that = this;
|
|
|
that.$set(that, `id`, e.id);
|
|
|
that.$set(that, `status`, e.status);
|
|
|
+ console.log(e.is_order);
|
|
|
+ that.$set(that, `is_order`, e.is_order);
|
|
|
await that.searchOther();
|
|
|
await that.search()
|
|
|
},
|
|
@@ -266,21 +269,27 @@
|
|
|
let res;
|
|
|
// 待付款
|
|
|
if (that.id) {
|
|
|
- if (that.status == '0') {
|
|
|
- res = await that.$api(`/order/${that.id}`);
|
|
|
+ if (that.is_order) {
|
|
|
+ console.log('1');
|
|
|
} else {
|
|
|
- res = await that.$api(`/orderDetail/${that.id}`);
|
|
|
- }
|
|
|
- if (res.errcode == '0') {
|
|
|
- let status = that.statusList.find(i => i.value == res.data.status)
|
|
|
- if (status) res.data.zhStatus = status.label;
|
|
|
- // 运费总数和商品总数相加
|
|
|
- let total = 0;
|
|
|
- for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
|
|
|
- res.data.goods_total = total
|
|
|
- that.$set(that, `info`, res.data);
|
|
|
- uni.hideLoading();
|
|
|
+ console.log('2');
|
|
|
}
|
|
|
+ // if (that.is_order == true) {
|
|
|
+ // res = await that.$api(`/order/${that.id}`);
|
|
|
+ // } else if (that.is_order == false) {
|
|
|
+ // res = await that.$api(`/orderDetail/${that.id}`);
|
|
|
+ // }
|
|
|
+ // console.log(res);
|
|
|
+ // if (res.errcode == '0') {
|
|
|
+ // let status = that.statusList.find(i => i.value == res.data.status)
|
|
|
+ // if (status) res.data.zhStatus = status.label;
|
|
|
+ // // 运费总数和商品总数相加
|
|
|
+ // let total = 0;
|
|
|
+ // for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
|
|
|
+ // res.data.goods_total = total
|
|
|
+ // that.$set(that, `info`, res.data);
|
|
|
+ // uni.hideLoading();
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
// 查询其他信息
|