From 265faea6b91f76865dfe0f9bbfe4509b18da4d5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com>
Date: Mon, 11 Oct 2021 15:46:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=B3=BB=E5=88=97=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/coupon/index/index.vue | 6 +++--
pages/index/category/category.vue | 6 ++++-
pages/order/confirm/confirm.vue | 35 +++++++++++------------------
pages/order/newdetail/newdetail.vue | 10 ++++++---
pages/shop/goodsdetail.vue | 16 +++++--------
pages/store/cart/cart.vue | 18 +++++++++++++--
6 files changed, 51 insertions(+), 40 deletions(-)
diff --git a/pages/coupon/index/index.vue b/pages/coupon/index/index.vue
index 2320165..13da3b7 100644
--- a/pages/coupon/index/index.vue
+++ b/pages/coupon/index/index.vue
@@ -250,10 +250,12 @@
align-items: flex-start;
display: flex;
flex-direction: column;
- margin-left: 84rpx;
+ margin-left: 54rpx;
+ width: 380rpx;
}
.coupon-left {
- margin-left: 20rpx;
+ // margin-left: 20rpx;
+ width: 182rpx;
display: flex;
flex-direction: column;
justify-content: center;
diff --git a/pages/index/category/category.vue b/pages/index/category/category.vue
index 88da584..19110d0 100644
--- a/pages/index/category/category.vue
+++ b/pages/index/category/category.vue
@@ -70,7 +70,8 @@
-
+
+
@@ -637,6 +638,9 @@
margin-top: 30rpx;
}
}
+ .brand-item:last-child{
+ margin-bottom: 0rpx;
+ }
.img{
width: 150rpx;
height: 150rpx;
diff --git a/pages/order/confirm/confirm.vue b/pages/order/confirm/confirm.vue
index 0b2b1b3..ddfa766 100644
--- a/pages/order/confirm/confirm.vue
+++ b/pages/order/confirm/confirm.vue
@@ -83,10 +83,10 @@
运费
+¥{{ order_detail.order.payable_freight_yuan || 0 }}
-
+
@@ -107,11 +107,11 @@
-
+
-
+
+
@@ -338,8 +329,6 @@
address_id: this.address.id,
note: this.value,
}
-
- // 是否选择了优惠券 TODO 优惠券id是否传对?
if(this.coupon_index != null){
par.coupon_id = this.order_detail.coupons[this.coupon_index].id;
}
@@ -472,8 +461,8 @@
height: max-content;
background-color: #FFFFFF;
border-top: 1rpx solid #e5e5e5;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
+ // padding-bottom: constant(safe-area-inset-bottom);
+ // padding-bottom: env(safe-area-inset-bottom);
.fixed-content{
width: 100%;
height: 118rpx;
@@ -544,10 +533,12 @@
align-items: flex-start;
display: flex;
flex-direction: column;
- margin-left: 90rpx;
+ margin-left: 54rpx;
+ width: 380rpx;
}
.coupon-left {
- margin-left: 30rpx;
+ // margin-left: 30rpx;
+ width: 182rpx;
display: flex;
flex-direction: column;
justify-content: center;
diff --git a/pages/order/newdetail/newdetail.vue b/pages/order/newdetail/newdetail.vue
index a9557de..caf935b 100644
--- a/pages/order/newdetail/newdetail.vue
+++ b/pages/order/newdetail/newdetail.vue
@@ -291,9 +291,13 @@
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
- this.$msg(res.data.message).then(() => {
- this.getOrderDetails();
- })
+ if(res.data.status){
+ this.$msg('确认收货成功', {icon: 'success'}).then(() => {
+ this.getOrderDetails();
+ })
+ }else{
+ this.$msg(res.data.message || '确认收货失败');
+ }
})
},
searchLogistics() {
diff --git a/pages/shop/goodsdetail.vue b/pages/shop/goodsdetail.vue
index 464e6e7..b702d3f 100644
--- a/pages/shop/goodsdetail.vue
+++ b/pages/shop/goodsdetail.vue
@@ -1,5 +1,5 @@
-
+
@@ -169,7 +169,7 @@
商品详情
-
+
@@ -293,7 +293,8 @@
coupons: [], // 优惠
goods_num: 1,
is_date_finish: false,
- car_num: 0
+ car_num: 0,
+ goods_content: ''
}
},
computed: {
@@ -358,16 +359,9 @@
}else {
this.car_num = res.data.data;
}
- } else {
- wx.showModal({
- content: '请下拉页面刷新重试',
- showCancel: false
- });
}
})
.catch(() => {
- wx.stopPullDownRefresh();
- wx.hideLoading();
wx.showModal({
content: '请求失败',
showCancel: false
@@ -542,6 +536,7 @@
}).then(res => {
if(res.data.code == 200){
this.$msg('加入购物车成功', {icon: 'success'})
+ this.getcarNum()
}else{
this.$msg('加入购物车失败', {icon: 'error'})
}
@@ -635,6 +630,7 @@
this.goods_detail = goods_detail;
this.pictures = [res.data.data.img];
this.is_collect = Boolean(res.data.data.is_collect) || false;
+ this.goods_content = this.formatRichText(goods_detail.content);
let type = 'mail';
if(this.$isRight(goods_detail.is_largess)){
type = 'point';
diff --git a/pages/store/cart/cart.vue b/pages/store/cart/cart.vue
index 46dbc4e..774aa77 100644
--- a/pages/store/cart/cart.vue
+++ b/pages/store/cart/cart.vue
@@ -103,7 +103,8 @@
backgroundColor: '#15716E'
}
}],
- show: false
+ show: false,
+ show_count: 0
}
},
watch: {
@@ -130,6 +131,15 @@
this.token = this.$cookieStorage.get('user_token');
this.getCartList();
},
+ onShow(){
+ this.show_count++;
+ if(this.show_count > 1){
+ this.allChecked = false;
+ this.total_price = '';
+ this.total_count = '';
+ this.getCartList();
+ }
+ },
methods: {
// 购物车商品加减
changeNum(type, parentIndex, childIndex){
@@ -166,6 +176,9 @@
})
},
getCartList(){
+ uni.showLoading({
+ title: '正在查询购物车'
+ })
this.$http.get({
api: 'api/cart',
header: {
@@ -173,6 +186,7 @@
}
}).then(res => {
console.log("===", res);
+ uni.hideLoading();
let data = res.data.data;
let list = [];
for(let i in data){
@@ -188,7 +202,7 @@
})
}
this.list = list;
- })
+ }).catch(err => uni.hideLoading())
},
// 商品被勾选
goodsCheckChange(event, parentIndex, childIndex) {