|
@@ -79,27 +79,43 @@
|
|
},
|
|
},
|
|
async search() {
|
|
async search() {
|
|
const that = this;
|
|
const that = this;
|
|
- let res;
|
|
|
|
- if (that.type == 'integral') {
|
|
|
|
- res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
|
|
|
|
- } else if (that.type == 'afterSale') {
|
|
|
|
- res = await that.$api(`/afterSale/getTransportInfo/${that.id}`, `GET`)
|
|
|
|
- } else {
|
|
|
|
- res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
|
|
|
|
- }
|
|
|
|
- if (res.errcode == '0') {
|
|
|
|
- that.$set(that, `is_check`, res.data.is_check);
|
|
|
|
- let list = res.data.list.map((i) => ({
|
|
|
|
- desc: i.time,
|
|
|
|
- title: i.context
|
|
|
|
- }))
|
|
|
|
- that.$set(that, `list`, list);
|
|
|
|
- that.$set(that, `no`, res.data.no);
|
|
|
|
|
|
+ if (that.type == 'afterSale') {
|
|
|
|
+ let arr = await that.$api(`/afterSale/getTransportInfo/${that.info.id}`, `GET`)
|
|
|
|
+ if (arr.errcode == '0') {
|
|
|
|
+ that.$set(that, `is_check`, arr.data.shop.is_check);
|
|
|
|
+ let list = arr.data.shop.list.map((i) => ({
|
|
|
|
+ desc: i.time,
|
|
|
|
+ title: i.context
|
|
|
|
+ }))
|
|
|
|
+ that.$set(that, `list`, list);
|
|
|
|
+ that.$set(that, `no`, arr.data.shop.no);
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.errmsg,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- uni.showToast({
|
|
|
|
- title: res.errmsg,
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
|
|
+ let res;
|
|
|
|
+ if (that.type == 'integral') {
|
|
|
|
+ res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
|
|
|
|
+ } else {
|
|
|
|
+ res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
|
|
|
|
+ }
|
|
|
|
+ if (res.errcode == '0') {
|
|
|
|
+ that.$set(that, `is_check`, res.data.is_check);
|
|
|
|
+ let list = res.data.list.map((i) => ({
|
|
|
|
+ desc: i.time,
|
|
|
|
+ title: i.context
|
|
|
|
+ }))
|
|
|
|
+ that.$set(that, `list`, list);
|
|
|
|
+ that.$set(that, `no`, res.data.no);
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.errmsg,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|