From a6ae7f39b1abaa2a4a23eead0b3cdf603d59d6e3 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Tue, 11 Jun 2024 22:53:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E6=88=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/index.vue | 94 +++++++++++++++++++++++++++++++----------- pages/goods/detail.vue | 2 +- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/pages/cart/index.vue b/pages/cart/index.vue index dd27e81..7b74fb1 100644 --- a/pages/cart/index.vue +++ b/pages/cart/index.vue @@ -20,33 +20,40 @@ - - + + + {{ '123456789' || item.goods.merchant.shop_name }} + - - - - - - {{ item.goods.goods_name }} + + + - - - {{ props.value.name }} - + + - - - - {{ item.goods.skuInfo.goods_price?Number(item.goods.skuInfo.goods_price):item.goods.skuInfo.goods_price }} + + + {{ item.goods.goods_name }} + + + + {{ props.value.name }} + - - + + + + {{ item.goods.skuInfo.goods_price?Number(item.goods.skuInfo.goods_price):item.goods.skuInfo.goods_price }} + + + + @@ -240,6 +247,13 @@ totalPrice: '0.00' } }, + computed: { + storeVersion() { + const version = uni.getStorageSync('storeVersion') == 1 ? 1 : 0; + console.log(version); + return version; + } + }, watch: { // 监听选中的商品 checkedIds: { @@ -449,7 +463,13 @@ app.getCartList() app.handleToggleMode() }) - } + }, + + toShop(item) { + uni.navigateTo({ + url: `/pages/shopList/shopPage?id=${item.goods.merchant_id}`, + }) + }, } } @@ -633,10 +653,34 @@ .cart-item { background: #fff; border-radius: 12rpx; - display: flex; - align-items: center; padding: 30rpx 16rpx; margin-bottom: 24rpx; + .merchant-name { + font-size: 30rpx; + color: #333; + font-weight: bold; + >text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: calc(100% - 73rpx); + } + >image { + margin-left: 10rpx; + width: 13rpx; + height: 24rpx; + flex-shrink: 0; + &:first-child { + width: 40rpx; + height: 40rpx; + margin-right: 10rpx; + } + } + } + >view { + display: flex; + align-items: center; + } .item-radio { width: 56rpx; diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 34e48b8..15673c4 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -138,7 +138,7 @@ - +