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 1/2] =?UTF-8?q?=E4=B8=80=E7=B3=BB=E5=88=97=E4=BC=98?=
=?UTF-8?q?=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) {
From 285395cde3a4c95779d1bc4bb303330475bf60dd 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 16:43:29 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/index-banner/index-banner.vue | 4 ++--
components/lf-payPassword/lf-payPassword.vue | 9 ++++++++-
pages/order/cashier/cashier.vue | 7 ++++++-
pages/order/confirm/confirm.vue | 4 +++-
pages/shop/goodsdetail.vue | 14 ++++++++------
5 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/components/index-banner/index-banner.vue b/components/index-banner/index-banner.vue
index 4b1e8fa..af59b2f 100644
--- a/components/index-banner/index-banner.vue
+++ b/components/index-banner/index-banner.vue
@@ -14,7 +14,7 @@
:style="
'height: ' +
imgHeight +
- 'px; padding-left: ' +
+ 'rpx; padding-left: ' +
meta.padding_left +
'px; padding-right: ' +
meta.padding_right +
@@ -41,7 +41,7 @@ export default {
// 对应data
data() {
return {
- imgHeight: '450'
+ imgHeight: 900
};
},
options: {
diff --git a/components/lf-payPassword/lf-payPassword.vue b/components/lf-payPassword/lf-payPassword.vue
index bb98b97..0029404 100644
--- a/components/lf-payPassword/lf-payPassword.vue
+++ b/components/lf-payPassword/lf-payPassword.vue
@@ -50,7 +50,8 @@
data(){
return {
code: '', // 密码
- time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime()
+ time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime(),
+ is_auto: false
}
},
created(){
@@ -64,12 +65,18 @@
this.code = event;
if(this.code.length >= 6){
this.comfirm();
+ this.is_auto = true;
+ }else{
+ this.is_auto = false;
}
},
comfirm(){
if(this.code.length < 6){
return this.$msg('请输入完整支付密码');
}
+ if(this.is_auto){
+ return;
+ }
this.$emit('comfirm', this.code);
}
}
diff --git a/pages/order/cashier/cashier.vue b/pages/order/cashier/cashier.vue
index 5663edd..b4ba6f9 100644
--- a/pages/order/cashier/cashier.vue
+++ b/pages/order/cashier/cashier.vue
@@ -129,7 +129,7 @@
this.confirm();
},
// 支付
- confirm() {
+ confirm(event) {
if (this.clickContinue == true) {
this.clickContinue = false;
if (this.is_date_finish) return this.$msg('订单超时未支付');
@@ -143,6 +143,9 @@
this.show_pw = true;
return;
}
+ uni.showLoading({
+ title: '正在支付,请稍后'
+ })
this.getOpenid().then(res => {
var data = {
@@ -164,6 +167,7 @@
Authorization: this.token
}
}).then(res => {
+ uni.hideLoading()
res = res.data;
if (res.status) {
// this.formId = e.detail.formId || '';
@@ -184,6 +188,7 @@
this.setData({
loading: false
});
+ uni.hideLoading()
wx.showModal({
content: '支付失败',
showCancel: false
diff --git a/pages/order/confirm/confirm.vue b/pages/order/confirm/confirm.vue
index ddfa766..a8dce23 100644
--- a/pages/order/confirm/confirm.vue
+++ b/pages/order/confirm/confirm.vue
@@ -144,6 +144,7 @@
不使用优惠券
+
@@ -489,9 +490,10 @@
width: 750rpx;
height: max-content;
max-height: 70vh;
- overflow-y: scroll;
+ // overflow-y: scroll;
padding: 40rpx 32rpx;
background: #FFFFFF;
+ padding-bottom: 0rpx;
}
.coupon-circle1 {
width: 40rpx;
diff --git a/pages/shop/goodsdetail.vue b/pages/shop/goodsdetail.vue
index b702d3f..b997a48 100644
--- a/pages/shop/goodsdetail.vue
+++ b/pages/shop/goodsdetail.vue
@@ -63,15 +63,15 @@
优惠
-
- {{ item.title }}
-
+
+ {{ item.title }};
+
-
+
@@ -1001,6 +1001,7 @@
padding: 0;
width: 88rpx;
position: relative;
+ color: #555555;
&:first-child{
padding-left: 0;
}
@@ -1009,6 +1010,7 @@
width: 50rpx;
font-size: 40rpx;
line-height: 1;
+ color: #555555;
}
}
.btn1{