From 2ad46ce2a12a1925328c23a89a9ec9990e28bc91 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Mon, 7 Sep 2020 11:32:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E9=80=81=E6=96=B9?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/shop.js | 12 ++--------
components/mine/order-item/index.vue | 2 +-
pageC/cart/ConfirmOrder.vue | 12 +++++-----
pageD/notice/info.vue | 2 +-
pageE/order/Details.vue | 34 ++++++++++++++++++++++++----
pageE/order/Index.vue | 4 ++--
6 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/common/api/shop.js b/common/api/shop.js
index 8474ff1..a64ba45 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -139,17 +139,9 @@ export default {
});
},
// 订单步骤2:发起订单,返回订单信息
- sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, is_selfraising, invoice_id }) {
+ sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, member_deliver_type, invoice_id }) {
return vm.$u.post('buy/buy_step2', {
- ifcart: ifcart,
- cart_id: cart_id,
- address_id: address_id,
- buy_city_id: buy_city_id,
- pintuan_id: pintuan_id,
- pintuangroup_id: pintuangroup_id,
- voucher_id: voucher_id, // 优惠券信息
- is_selfraising: is_selfraising, // 是否自提
- invoice_id: invoice_id,
+ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, member_deliver_type, invoice_id,
});
},
// 订单步骤3:发起支付(第三方统一下单)
diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue
index 7c02123..79dd301 100644
--- a/components/mine/order-item/index.vue
+++ b/components/mine/order-item/index.vue
@@ -25,7 +25,7 @@
申请退款
- 查看物流
+ 查看物流
确认收货
取消支付
diff --git a/pageC/cart/ConfirmOrder.vue b/pageC/cart/ConfirmOrder.vue
index fd24593..fb5723c 100644
--- a/pageC/cart/ConfirmOrder.vue
+++ b/pageC/cart/ConfirmOrder.vue
@@ -48,7 +48,7 @@
-
+
自提地址
{{ orderInfo.store_list[index].store_address }}
@@ -120,18 +120,22 @@ export default {
text: '快递',
value: 'express',
disabled: false,
+ type: 1,
}, {
text: '骑手',
value: 'takeawayer',
disabled: false,
+ type: 2,
}, {
text: '自提',
value: 'selfraising',
disabled: false,
+ type: 3,
}],
delivery: {
text: '快递',
value: 'express',
+ type: 1,
}, // 配送方式
couponList: [],
couponStatus: false,
@@ -141,7 +145,6 @@ export default {
goodsClass: [],
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
debounce: true,
- is_selfraising: 0, // 是否自提:0=》否,1=》是
hasInvoice: 0,
}
},
@@ -276,7 +279,7 @@ export default {
cart_id: id,
address_id: this.addressInfo.address_id,
buy_city_id: this.addressInfo.city_id,
- is_selfraising: this.is_selfraising,
+ member_deliver_type: this.delivery.type,
invoice_id: this.$store.getters.getInvoiceId, // 发票抬头ID,不开票传0
}
if(coupon.length) Object.assign(params, { voucher_id: coupon });
@@ -413,7 +416,6 @@ export default {
this.getFreight();
}
if(index == 2) {
- this.is_selfraising = 1;
for (const key in this.freight) {
if (this.freight.hasOwnProperty(key)) {
this.freight[key] = '0.00';
@@ -421,8 +423,6 @@ export default {
}
this.setTotalPrice(); // 计算总价
this.delivery = this.deliveryList[index];
- } else {
- this.is_selfraising = 0;
}
if(index == 0) {
this.delivery = this.deliveryList[index];
diff --git a/pageD/notice/info.vue b/pageD/notice/info.vue
index fa7bb7a..875a7d9 100644
--- a/pageD/notice/info.vue
+++ b/pageD/notice/info.vue
@@ -1,6 +1,6 @@
-
+
{{ list.title }}
diff --git a/pageE/order/Details.vue b/pageE/order/Details.vue
index de0319c..2e48445 100644
--- a/pageE/order/Details.vue
+++ b/pageE/order/Details.vue
@@ -59,9 +59,9 @@
支付方式
{{ orderInfo.payment_name }}
-
+
配送方式
- 自提
+ {{ orderInfo.member_deliver_type | getDeliverType(orderInfo.store_deliver_type) }}
@@ -69,7 +69,7 @@
订单编号:{{ orderInfo.order_sn }}
支付单号:{{ orderInfo.pay_sn }}
创建时间:{{ orderInfo.add_time | date}}
- 自提地址:{{ orderInfo.extend_store.store_address }}
+ 自提地址:{{ orderInfo.extend_store.store_address }}
@@ -77,7 +77,7 @@
申请退款
- 查看物流
+ 查看物流
确认收货
取消支付
@@ -157,6 +157,32 @@ export default {
beforeDestroy() {
clearInterval(this.timer);
},
+ filters: {
+ getDeliverType(user, store) {
+ let deliverType = '';
+ function setType(type) {
+ switch (type) {
+ case 1:
+ deliverType = '快递'
+ break;
+ case 2:
+ deliverType = '骑手'
+ break;
+ case 3:
+ deliverType = '自提'
+ break;
+ default:
+ deliverType = '-'
+ break;
+ }
+ }
+ setType(user);
+ if(store) {
+ setType(store);
+ }
+ return deliverType;
+ }
+ },
methods: {
viewStoreDetails(id) {
this.$u.route('pageC/merchant/index', {
diff --git a/pageE/order/Index.vue b/pageE/order/Index.vue
index f45a2bb..f884692 100644
--- a/pageE/order/Index.vue
+++ b/pageE/order/Index.vue
@@ -132,7 +132,7 @@ export default {
console.log(load)
res.data.forEach(element => {
element.extend_order_goods.forEach(i=>{
- console.log(i)
+ // console.log(i)
})
});
this.timer = true;
@@ -148,7 +148,7 @@ export default {
}
this.orderList[this.current].forEach(element => {
element.extend_order_goods.forEach(i=>{
- console.log(i)
+ // console.log(i)
})
});
this.$forceUpdate();