|
|
@ -265,7 +265,6 @@ export default { |
|
|
|
handleOrderGoods () { |
|
|
|
let orderList = this.$store.state.user.techanOrderList; |
|
|
|
|
|
|
|
orderList = uni.getStorageSync("techanOrderList") |
|
|
|
if (!Array.isArray(orderList) || orderList.length<=0) { |
|
|
|
uni.navigateBack(); |
|
|
|
return |
|
|
@ -274,11 +273,11 @@ export default { |
|
|
|
// use_type 0邮寄 1自提 3邮寄或自提 |
|
|
|
// is_post 1邮寄 2自提 默认邮寄1 |
|
|
|
orderList.forEach(v=>{ |
|
|
|
v.is_post = v.sInfo.use_type==3?3:v.sInfo.use_type==1?2:1 // 产品自己的方式 |
|
|
|
v.is_user_post = v.sInfo.use_type==1?2:1 // 用户自选方式 |
|
|
|
v.is_post = v.is_post; // 产品自己的方式 |
|
|
|
v.is_user_post = v.is_user_post; // 用户自选方式 |
|
|
|
v.pickupAddress = v.pickupAddress || null // 自提信息 |
|
|
|
v.contacts = v.contacts || null // 收货地址 |
|
|
|
v.post = v.post || null // 运费信息 |
|
|
|
v.contacts = v.contacts// 收货地址 |
|
|
|
v.post = v.post// 运费信息 |
|
|
|
v.remark = v.remark||"" |
|
|
|
}) |
|
|
|
let contactsData = orderList.find(v=>v.contacts && v.is_post==1) |
|
|
@ -288,7 +287,7 @@ export default { |
|
|
|
this.allOrderList = orderList; |
|
|
|
|
|
|
|
|
|
|
|
this.order() |
|
|
|
this.handleOrder() |
|
|
|
|
|
|
|
console.log(this.orderList) |
|
|
|
}, |
|
|
@ -389,6 +388,7 @@ export default { |
|
|
|
this.orderList.forEach(v=>{ |
|
|
|
v.contacts = JSON.parse(JSON.stringify(this.contacts)) |
|
|
|
}) |
|
|
|
this.getPost() |
|
|
|
} else { |
|
|
|
this.getContacts() |
|
|
|
} |
|
|
@ -458,8 +458,24 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleOrder () { |
|
|
|
let tempOrderList = [] |
|
|
|
this.allOrderList.forEach(v=>{ |
|
|
|
if (v.is_post != 1) { |
|
|
|
tempOrderList.push(v) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(tempOrderList) |
|
|
|
if (tempOrderList.length>0) { |
|
|
|
this.orderList = tempOrderList |
|
|
|
this.step = 2 |
|
|
|
// 设置收货地址 |
|
|
|
this.setAddress() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 总价 |
|
|
|
total() { |
|
|
|
let price = 0 |
|
|
@ -532,25 +548,6 @@ export default { |
|
|
|
goods.push(param) |
|
|
|
} |
|
|
|
|
|
|
|
let flag = false |
|
|
|
if (this.step == 1) { |
|
|
|
let tempOrderList = [] |
|
|
|
this.allOrderList.forEach(v=>{ |
|
|
|
if (v.is_post != 1) { |
|
|
|
tempOrderList.push(v) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(tempOrderList) |
|
|
|
if (tempOrderList.length>0) { |
|
|
|
this.orderList = tempOrderList |
|
|
|
this.step = 2 |
|
|
|
// 设置收货地址 |
|
|
|
this.setAddress() |
|
|
|
flag = true |
|
|
|
} |
|
|
|
} |
|
|
|
if (flag) return |
|
|
|
|
|
|
|
// 如果是购物车下单 |
|
|
|
if (this.isShoppingCart) { |
|
|
|
this.$store.commit("changeTechanOrderList", this.allOrderList); |
|
|
|