From aba4b73e15b7c4fc1bbedec0066372e06ccea0f2 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Mon, 3 Mar 2025 10:22:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/base/tabbar.vue | 7 + components/product/productItem copy.vue | 257 +++++++++++++++ components/product/productItem.vue | 183 +++++++---- pages/index/center copy.vue | 521 ++++++++++++++++++++++++++++++ pages/index/center.vue | 104 ++++-- pages_order/auth/wxUserInfo.vue | 2 +- pages_order/components/product/submit.vue | 15 +- pages_order/order/createOrder.vue | 46 +-- pages_order/product/productDetail.vue | 19 +- static/image/cart/1.png | Bin 0 -> 1933 bytes static/image/center/1.png | Bin 1032 -> 2539 bytes static/image/center/2.png | Bin 1742 -> 4965 bytes static/image/center/4.png | Bin 2147 -> 4198 bytes static/image/center/7.png | Bin 912 -> 2884 bytes static/image/center/8.png | Bin 2236 -> 4842 bytes static/image/center/9.png | Bin 0 -> 4224 bytes static/image/center/address.png | Bin 0 -> 4050 bytes static/image/center/logout.png | Bin 0 -> 4091 bytes static/image/tabbar/cart-active.png | Bin 0 -> 3598 bytes static/image/tabbar/cart.png | Bin 0 -> 3398 bytes 20 files changed, 1041 insertions(+), 113 deletions(-) create mode 100644 components/product/productItem copy.vue create mode 100644 pages/index/center copy.vue create mode 100644 static/image/cart/1.png create mode 100644 static/image/center/9.png create mode 100644 static/image/center/address.png create mode 100644 static/image/center/logout.png create mode 100644 static/image/tabbar/cart-active.png create mode 100644 static/image/tabbar/cart.png diff --git a/components/base/tabbar.vue b/components/base/tabbar.vue index 44d43e0..9c70362 100644 --- a/components/base/tabbar.vue +++ b/components/base/tabbar.vue @@ -49,6 +49,13 @@ "title": "订单", key: 'order', }, + { + "selectedIconPath": "/static/image/tabbar/cart-active.png", + "iconPath": "/static/image/tabbar/cart.png", + "pagePath": "/pages/index/cart", + "title": "购物车", + key: 'cart', + }, { "selectedIconPath": "/static/image/tabbar/user-center-active.png", "iconPath": "/static/image/tabbar/user-center.png", diff --git a/components/product/productItem copy.vue b/components/product/productItem copy.vue new file mode 100644 index 0000000..0cc1da5 --- /dev/null +++ b/components/product/productItem copy.vue @@ -0,0 +1,257 @@ + + + + + \ No newline at end of file diff --git a/components/product/productItem.vue b/components/product/productItem.vue index 0cc1da5..5ff872e 100644 --- a/components/product/productItem.vue +++ b/components/product/productItem.vue @@ -30,56 +30,60 @@ --> - - - ¥{{ item.price }} - /元每件 - - - ¥{{ item.oldPrice }} - /元 - - - - - - - - ¥{{ item.silverPrice }} - /元每件 + + + + ¥{{ item.price }} + /元每件 + + + ¥{{ item.oldPrice }} + /元 + - - - - - - - - - ¥{{ item.goldPrice }} - /元每件 - - - - - - - - - ¥{{ item.diamondPrice }} - /元每件 - - - - + + + + + + + ¥{{ item.silverPrice }} + /元每件 + + + + + + + + + + ¥{{ item.goldPrice }} + /元每件 + + + + + + + + + ¥{{ item.diamondPrice }} + /元每件 + + + + + + @@ -151,7 +155,7 @@ \ No newline at end of file diff --git a/pages/index/center.vue b/pages/index/center.vue index 27af34e..09884a8 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -96,53 +96,53 @@ - + 我的订单 - + 我的团队 - + 联系客服 - + 邀请好友 - + 合伙人招募 - + 会员权益 - + 优惠券 - + 帮助与反馈 - + 我的地址 - + 礼包列表 - + 退出登录 @@ -445,31 +445,95 @@ margin: 0rpx 20rpx 20rpx 20rpx; background: white; border-radius: 20rpx; - padding: 20rpx; + padding: 30rpx 20rpx; box-sizing: border-box; + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05); .server-title { - margin-bottom: 20rpx; - font-size: 34rpx; + margin-bottom: 30rpx; + font-size: 36rpx; + font-weight: 600; + color: #333; + position: relative; + padding-left: 20rpx; + + &::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 8rpx; + height: 32rpx; + background: $uni-color; + border-radius: 4rpx; + } } .box { display: flex; width: 100%; - margin-bottom: 20rpx; - + margin-bottom: 30rpx; + gap: 20rpx; .boxs { - width: 25%; + width: 23%; display: flex; flex-direction: column; justify-content: center; align-items: center; + padding: 20rpx 0; + border-radius: 16rpx; + transition: all 0.3s ease; + position: relative; + overflow: hidden; + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(227, 68, 26, 0.05); + opacity: 0; + transition: opacity 0.3s ease; + z-index: 1; + } + + &:active { + transform: scale(0.95); + + &::after { + opacity: 1; + } + } image { - width: 60rpx; - height: 60rpx; + width: 70rpx; + height: 70rpx; display: block; - margin: 0rpx auto 10rpx auto; + margin: 0rpx auto 16rpx auto; + position: relative; + z-index: 2; + transition: transform 0.3s ease; + } + + .title { + font-size: 26rpx; + color: #333; + position: relative; + z-index: 2; + transition: color 0.3s ease; + } + + &:active { + image { + transform: translateY(-4rpx); + } + + .title { + color: $uni-color; + } } } diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue index 069fc37..fa13612 100644 --- a/pages_order/auth/wxUserInfo.vue +++ b/pages_order/auth/wxUserInfo.vue @@ -4,7 +4,7 @@ --> - 陌美人 + {{ configList.logo_name }} 申请获取你的头像、昵称 diff --git a/pages_order/components/product/submit.vue b/pages_order/components/product/submit.vue index f4b2ea0..46dc382 100644 --- a/pages_order/components/product/submit.vue +++ b/pages_order/components/product/submit.vue @@ -12,14 +12,22 @@ + + - 我要送礼 + @click="$emit('addCart')"> + 加入购物车 {{ submiitTitle }} @@ -74,6 +82,7 @@ display: flex; flex-direction: column; justify-content: center; + margin: 0 20rpx; &::after{ border: 0; } diff --git a/pages_order/order/createOrder.vue b/pages_order/order/createOrder.vue index 3b41b36..5802df2 100644 --- a/pages_order/order/createOrder.vue +++ b/pages_order/order/createOrder.vue @@ -334,25 +334,27 @@ let data = {} let api = '' + // 不是送礼 + if(this.type != 'give'){ + + let list = [] + this.payOrderProduct.forEach(n => { + list.push({ + num: n.num, + shopId: n.shopId || n.id, + }) + }) + data = { + addressId, + payType : this.payMethod, + list: JSON.stringify(list), + } + + api = 'createSumOrder' - // if (this.payOrderProduct[0].shopId || this.payOrderProduct[0].type == 2) { //普通商品 - - // let list = [] - // this.payOrderProduct.forEach(n => { - // list.push({ - // num: n.num, - // shopId: n.shopId || n.id, - // }) - // }) - // data = { - // addressId, - // list: JSON.stringify(list), - // } - // api = 'createSumOrder' - - // this.deleteCart(this.payOrderProduct.map(n => n.id).join(',')) + this.deleteCart(this.payOrderProduct.map(n => n.id).join(',')) - // } else { //体验、常规商品 + } else { //体验、常规商品 data = { addressId, num: this.payOrderProduct[0].num, @@ -362,7 +364,7 @@ memberNum : 1, } api = 'createOrder' - // } + } if(this.coupon.id){ data.couponId = this.coupon.id @@ -375,10 +377,10 @@ if (res.code == 200) { if(this.payMethod == 1){ - uni.showToast({ - title: '下单成功', - icon: 'none' - }) + // uni.showToast({ + // title: '下单成功', + // icon: 'none' + // }) this.paySuccess(res) return } diff --git a/pages_order/product/productDetail.vue b/pages_order/product/productDetail.vue index f037841..9e606b5 100644 --- a/pages_order/product/productDetail.vue +++ b/pages_order/product/productDetail.vue @@ -1,11 +1,11 @@