diff --git a/common/api/shop.js b/common/api/shop.js
index 369489e..18abda3 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -139,7 +139,7 @@ export default {
});
},
// 订单步骤2:发起订单,返回订单信息
- sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id }) {
+ sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, is_selfraising }) {
return vm.$u.post('buy/buy_step2', {
ifcart: ifcart,
cart_id: cart_id,
@@ -148,6 +148,7 @@ export default {
pintuan_id: pintuan_id,
pintuangroup_id: pintuangroup_id,
voucher_id: voucher_id, // 优惠券信息
+ is_selfraising: is_selfraising, // 是否自提
});
},
// 订单步骤3:发起支付(第三方统一下单)
diff --git a/components/comment/index.vue b/components/comment/index.vue
index 41ff22f..12b0ed1 100644
--- a/components/comment/index.vue
+++ b/components/comment/index.vue
@@ -9,7 +9,7 @@
{{ content.geval_content }}
-
+
掌柜回复:
@@ -41,11 +41,12 @@ export default {
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
},
methods: {
- previewImage(urls) {
- console.log(urls);
- // uni.previewImage({
- // urls: urls,
- // });
+ previewImage(urls, index) {
+ // console.log(urls);
+ uni.previewImage({
+ urls: urls,
+ current: urls[index]
+ });
},
}
};
diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue
index f68890c..75fac3d 100644
--- a/components/mine/order-item/index.vue
+++ b/components/mine/order-item/index.vue
@@ -25,7 +25,7 @@
申请退款
- 查看物流
+ 查看物流
确认收货
取消支付
diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue
index 75d9f4c..68c4e95 100644
--- a/pageB/sdetails/index.vue
+++ b/pageB/sdetails/index.vue
@@ -49,7 +49,7 @@
+
+ 自提地址
+ {{ orderInfo.store_list[index].store_address }}
+
@@ -107,9 +111,15 @@ export default {
deliveryList: [{
text: '快递',
value: 'express',
+ disabled: false,
}, {
text: '骑手',
value: 'takeawayer',
+ disabled: false,
+ }, {
+ text: '自提',
+ value: 'selfraising',
+ disabled: false,
}],
delivery: {
text: '快递',
@@ -123,6 +133,7 @@ export default {
goodsClass: [],
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
debounce: true,
+ is_selfraising: 0, // 是否自提:0=》否,1=》是
}
},
components: {
@@ -148,6 +159,8 @@ export default {
onLoad(option) {
this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo;
+ // 判断是否可选自提
+ if(!this.orderInfo.is_selfraising) this.deliveryList[2].disabled = true;
// console.log('orderType' + this.orderType);
// console.log(this.orderInfo);
this.getGoodsClass();
@@ -182,8 +195,10 @@ export default {
// console.log(this.orderInfo);
// console.log(this.$store.state.pintuangroup_headid);
if(this.orderInfo.pintuangroup_id) {
- Object.assign(params, { pintuangroup_headid: this.$store.state.pintuangroup_headid });
- Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id });
+ Object.assign(params, {
+ pintuangroup_headid: this.$store.state.pintuangroup_headid,
+ pintuangroup_id: this.orderInfo.pintuangroup_id
+ });
}
console.log(params);
this.$u.api.withImmediate(params).then(res => {
@@ -249,6 +264,7 @@ export default {
cart_id: id,
address_id: this.addressInfo.address_id,
buy_city_id: this.addressInfo.city_id,
+ is_selfraising: this.is_selfraising,
}
if(coupon.length) Object.assign(params, { voucher_id: coupon });
if(this.orderType == 2) {
@@ -262,10 +278,10 @@ export default {
type: 'redirect',
url: '/pageC/cart/cashier',
params: {
- ifcart: params.ifcart,
+ ifcart: ifcart,
pay_sn: res.data.pay_sn,
price: res.data.order_total_amount,
- order_id: res.data.order_list[0].order_id,
+ order_id: res.data.order_list[0].order_id,
}
})
} else {
@@ -282,13 +298,8 @@ export default {
this.couponStatus = true;
},
useCoupon(coupon) {
- console.log(coupon)
-
-
-
-
+ // console.log(coupon)
if(this.couponType.type == 1){
-
this.choiceCoupon = {}
for(let i in this.orderInfo.store_voucher_all_list){
if(this.orderInfo.store_voucher_all_list[i].voucher_id == coupon.voucher_id && !this.orderInfo.store_voucher_all_list[i].sel){
@@ -338,23 +349,23 @@ export default {
const goods = this.orderInfo.store_goods_total;
let [freight, price, minPrice] = [0, 0, 0];
// 运费
- for (const key in this.freight) {
- if (this.freight.hasOwnProperty(key)) {
+ for(const key in this.freight) {
+ if(this.freight.hasOwnProperty(key)) {
const element = this.freight[key];
freight += Number(element);
}
}
// 商品价格减去优惠券
// 店铺
- for (const gid in goods) {
- if (goods.hasOwnProperty(gid)) {
+ for(const gid in goods) {
+ if(goods.hasOwnProperty(gid)) {
// 计算最小价格
minPrice += 0.01;
// 每个店铺所有商品的价格
let sprice = Number(goods[gid]);
if(JSON.stringify(this.storeCoupon) != '{}') {
- for (const cid in this.storeCoupon) {
- if (this.storeCoupon.hasOwnProperty(cid)) {
+ for(const cid in this.storeCoupon) {
+ if(this.storeCoupon.hasOwnProperty(cid)) {
const cprice = this.storeCoupon[cid];
// 商品减去优惠券价格
if(gid == cid) {
@@ -378,13 +389,31 @@ export default {
// console.log("price:" + price);
this.totalPrice = (price + freight).toFixed(2);
},
- setDelivery(index) {
+ async setDelivery(index) {
+ // console.log(index);
if(index == 1) {
if(!this.isTakeawayer) this.$u.toast('此地区不支持骑手配送');
return false;
+ this.delivery = this.deliveryList[index];
+ 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';
+ }
+ }
+ this.isTakeawayer = false;
+ this.setTotalPrice(); // 计算总价
+ this.delivery = this.deliveryList[index];
+ } else {
+ this.is_selfraising = 0;
+ }
+ if(index == 0) {
+ this.delivery = this.deliveryList[index];
+ this.getFreight();
}
- this.delivery = this.deliveryList[index];
- this.getFreight();
},
settlement() {
uni.navigateTo({
@@ -409,6 +438,7 @@ export default {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
padding-top: 1rpx;
+ padding-bottom: 200rpx;
.info-address {
padding: 30rpx;
display: flex;
@@ -471,7 +501,7 @@ export default {
height: 60rpx;
border-radius: 50%;
margin-right: 15rpx;
- background-color: aquamarine;
+ // background-color: aquamarine;
}
> view {
font-size: 28rpx;
@@ -479,6 +509,7 @@ export default {
margin-right: 15rpx;
}
.right {
+ margin-left: auto;
flex-shrink: 0;
width: 11rpx;
height: 22rpx;
@@ -496,7 +527,7 @@ export default {
width: 180rpx;
height: 160rpx;
border-radius: 10rpx;
- background-color: aqua;
+ // background-color: aqua;
flex-shrink: 0;
}
.info {
@@ -565,10 +596,24 @@ export default {
}
}
}
+ .pick-up {
+ padding: 30rpx;
+ background: rgba(255,255,255,1);
+ .title {
+ font-size: 28rpx;
+ color: #666666;
+ margin-bottom: 30rpx;
+ }
+ .content {
+ font-size: 30rpx;
+ color: #343434;
+ line-height: 40rpx;
+ }
+ }
}
}
.common-active {
- padding-bottom: 200rpx;
+ padding-bottom: 30rpx;
> view {
height: 98rpx;
background: rgba(255,255,255,1);
diff --git a/pageE/order/Details.vue b/pageE/order/Details.vue
index 448e13e..3681d78 100644
--- a/pageE/order/Details.vue
+++ b/pageE/order/Details.vue
@@ -59,12 +59,17 @@
支付方式
{{ orderInfo.payment_name }}
+
+ 配送方式
+ 自提
+
订单编号:{{ orderInfo.order_sn }}
支付单号:{{ orderInfo.pay_sn }}
创建时间:{{ orderInfo.add_time | date}}
+ 自提地址:{{ orderInfo.extend_store.store_address }}
@@ -75,7 +80,7 @@
取消支付
- 查看物流
+ 查看物流
联系骑手
@@ -460,6 +465,9 @@ export default {
> view:not(:last-child) {
margin-bottom: 30rpx;
}
+ .address {
+ line-height: 40rpx;
+ }
}
}
.btn {
diff --git a/pages.json b/pages.json
index 7c1ca24..b9f0e00 100644
--- a/pages.json
+++ b/pages.json
@@ -135,7 +135,7 @@
"backgroundColor":"#ffffff",
"buttons": [
{
- // "type":"none",
+ "type":"none",
"text":"\ue503",
"float":"right",
"fontSize":"20",