完善订单模块
This commit is contained in:
@ -186,6 +186,7 @@
|
||||
},
|
||||
created() {
|
||||
this.getCartNum()
|
||||
this.getCartListFun()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getCartNum']),
|
||||
@ -241,8 +242,7 @@
|
||||
showCartPopup() {
|
||||
if (this.cartLists.length > 0) {
|
||||
this.showCart = true
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.$toast({
|
||||
title: '请先添加商品'
|
||||
});
|
||||
@ -285,30 +285,29 @@
|
||||
|
||||
// 获取购物车列表数据
|
||||
getCartListFun() {
|
||||
console.log("1>>>", 1);
|
||||
|
||||
getCartList().then((res) => {
|
||||
if (res.code == 1) {
|
||||
console.log("res>>>", res);
|
||||
|
||||
let {
|
||||
lists,
|
||||
total_amount
|
||||
} = res.data;
|
||||
// let cartType = 0;
|
||||
|
||||
// if (lists.length == 0) {
|
||||
// cartType = 2;
|
||||
// } else {
|
||||
// cartType = 1;
|
||||
// }
|
||||
|
||||
this.cartLists = lists;
|
||||
|
||||
// this.cartType = cartType;
|
||||
// // let cartType = 0;
|
||||
|
||||
// // if (lists.length == 0) {
|
||||
// // cartType = 2;
|
||||
// // } else {
|
||||
// // cartType = 1;
|
||||
// // }
|
||||
|
||||
// this.cartLists = list;
|
||||
// console.log(">>>", this.cartLists);
|
||||
|
||||
// // this.cartType = cartType;
|
||||
this.totalPrice = total_amount
|
||||
// this.isShow = true;
|
||||
this.getCartNum();
|
||||
// // this.isShow = true;
|
||||
// this.getCartNum();
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -415,7 +414,7 @@
|
||||
|
||||
.main-wrap {
|
||||
position: relative;
|
||||
padding: 0 20rpx;
|
||||
padding: 0 20rpx 160rpx;
|
||||
.goods {
|
||||
.info {
|
||||
width: 100%;
|
||||
@ -432,7 +431,7 @@
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
bottom: calc(env(safe-area-inset-bottom) + 10rpx);
|
||||
height: 100rpx;
|
||||
background-color: #212526;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user