From 6e01a07d0d68bee53eabaf7a2089133c68871c8d Mon Sep 17 00:00:00 2001 From: tanjy888 <424491071@qq.com> Date: Tue, 26 Aug 2025 13:48:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AE=9E=E7=8E=B0=E8=B4=AD=E7=89=A9=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/product/list.vue | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/pages/product/list.vue b/pages/product/list.vue index 711d115..87d76d7 100644 --- a/pages/product/list.vue +++ b/pages/product/list.vue @@ -132,6 +132,16 @@ + + + + + {{ goodsNum }} + + @@ -150,6 +160,8 @@ import TpSearch from "@/components/tp-search/tp-search"; export default { data() { return { + goodsNum: 0, + options: {}, viewtype: 1, @@ -238,7 +250,16 @@ export default { "shopInfo", "userInfo", "hasLogin", + "cartNum", ]), + watch: { + cartNum: { + handler(newVal) { + this.goodsNum = newVal; + }, + immediate: true, + }, + }, mounted() { this.initReturnPos(); @@ -352,6 +373,11 @@ export default { "forceUserInfo", "getUserInfo", ]), + gopage(url){ + this.$.navigateTo({ + url + }); + }, initReturnPos: function () { let view = uni.createSelectorQuery().in(this).select(".movableArea"); let that = this; @@ -614,4 +640,61 @@ export default { .active { background-color: #c0a080; } + + .diy_goods_carts { + position: fixed; + right: 24rpx; + bottom: 240rpx; + z-index: 100; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + flex: 1; + color: #666; + text-align: center; + background: #fff; + border-radius: 100%; + padding: 12rpx; + box-shadow: 2rpx 4rpx 20rpx rgba(0,0,0,0.3); + + .icon { + width: 48rpx; + height: 48rpx; + display: block; + } + + .desc { + font-size: 24rpx; + line-height: 14rpx; + } + + .icon_badge { + display: block; + position: absolute; + right: -5px; + top: -5px; + text-align: center; + line-height: 24rpx; + font-size: 24rpx; + padding: 4rpx 10rpx; + border-radius: 20rpx; + color: #fff; + background: #dd524d; + } + + .box { + position: relative; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 10rpx; + } + + &.current { + color: #dd524d; + font-weight: 900; + } + }