Task:物流拆分
This commit is contained in:
@@ -112,6 +112,7 @@ export default {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
id: "",
|
||||
index: null,
|
||||
cartInfo: [],
|
||||
orderInfo: {},
|
||||
expressList: [],
|
||||
@@ -124,6 +125,9 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.index = opts.index || 0;
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
if (n.name === NAME && this.$yroute.query.id !== this.id) {
|
||||
@@ -151,16 +155,18 @@ export default {
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getExpress() {
|
||||
console.log(this.id, "this.id");
|
||||
|
||||
if (!this.id) {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: '订单信息错误',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
@@ -169,11 +175,11 @@ export default {
|
||||
this.loaded = false;
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
this.orderInfo = {
|
||||
deliveryId: res.data.deliveryId,
|
||||
deliveryName: res.data.deliveryName,
|
||||
deliverySn: res.data.deliverySn
|
||||
};
|
||||
console.log(this.index, "this.orderInfo");
|
||||
const { data } = res;
|
||||
const current = data.deliveryInfo[+this.index ];
|
||||
console.log(current, "current");
|
||||
this.orderInfo = current;
|
||||
this.getExpressInfo();
|
||||
// const result = res.data.express.result || {};
|
||||
// this.cartInfo = res.data.order.cartInfo;
|
||||
@@ -182,8 +188,7 @@ export default {
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: err.msg ,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user