From 27e4e817c8a2c2f57c9b09b48d10a688ef1cccd4 Mon Sep 17 00:00:00 2001
From: mixtan <424491071@qq.com>
Date: Sun, 27 Jul 2025 11:27:46 +0800
Subject: [PATCH] =?UTF-8?q?update:=20=20=E6=A8=A1=E6=9D=BF1=E5=95=86?=
=?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E6=94=AF=E6=8C=81=E4=B8=80=E9=94=AE?=
=?UTF-8?q?=E5=8A=A0=E8=B4=AD=EF=BC=9B=E5=88=86=E7=B1=BB=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=8A=A0=E8=B4=AD=E6=8C=89=E9=92=AE=E8=A2=AB=E6=8C=A1=E4=BD=8F?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/product-list.vue | 143 +++++++++++++++++--------------
components/themes/shoptheme1.vue | 28 +++++-
pagesub/index/store.vue | 6 +-
3 files changed, 104 insertions(+), 73 deletions(-)
diff --git a/components/product-list.vue b/components/product-list.vue
index 2784e26..32e2859 100644
--- a/components/product-list.vue
+++ b/components/product-list.vue
@@ -246,7 +246,6 @@
"
>
-
-
-
- {{ item.product_unit_price_range }}
+
+
+
+
+ {{ number_format(item.product_unit_points) }}
+
+
+
+
+ {{ item.product_unit_sp }}
+
+
-
-
-
-
-
- {{ number_format(item.product_unit_points) }}
-
-
-
-
- {{ item.product_unit_sp }}
-
-
-
+
+
{{ __("已售") }}
-
+
+
+
+
-
+
+
+ {{ item.product_unit_price_range }}
+
+
+
+
+
+
+
@@ -1879,12 +1879,12 @@ export default {
this.onCloseFilter();
},
-addCart2(){
- uni.showToast({
- icon: 'error',
- title: this.$.__("商品库存不足")
- });
-},
+ addCart2() {
+ uni.showToast({
+ icon: "error",
+ title: this.$.__("商品库存不足"),
+ });
+ },
//列表购物车
addCart: async function (e) {
@@ -2241,10 +2241,20 @@ addCart2(){
}
}
+.m-product-name2{
+ line-height: 1 !important;
+ height: auto !important;
+ overflow:visible;
+}
+
/*全部商品 end*/
.m-product-price1 {
- display: flex;
- justify-content: space-between;
+ display: block;
+ .goods_item {
+ position: relative;
+ display: flex;
+ justify-content: space-between;
+ }
label {
font-weight: initial;
@@ -2637,6 +2647,7 @@ addCart2(){
}
.money {
+ width: 100%;
font-size: 14px;
}
diff --git a/components/themes/shoptheme1.vue b/components/themes/shoptheme1.vue
index fead08a..ff383a5 100644
--- a/components/themes/shoptheme1.vue
+++ b/components/themes/shoptheme1.vue
@@ -2,12 +2,12 @@
-
+
@@ -30,6 +30,7 @@
+
@@ -99,7 +100,11 @@
return {}
},
created: function() {},
- methods: {}
+ methods: {
+ handleAddcard(data, event){
+ this.$emit('addCart', data)
+ }
+ }
}
@@ -110,4 +115,21 @@
// @import '../../styles/layout.scss';
// @import '../../styles/store_themes.scss';
// @import '../../styles/store_tpl.scss';
+ .m-product-info{
+ width: auto;
+}
+ .m-product-price{
+ position: relative;
+ width: auto;
+}
+ .btn_addcard{
+ position: absolute;
+ right: 20rpx;
+ bottom: 8rpx;
+ width: 40rpx;
+ height: 40rpx;
+ background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc1.png) center no-repeat;
+ background-size: cover;
+}
+
diff --git a/pagesub/index/store.vue b/pagesub/index/store.vue
index d9a31df..90b9774 100644
--- a/pagesub/index/store.vue
+++ b/pagesub/index/store.vue
@@ -103,7 +103,7 @@
-
+
@@ -683,7 +683,7 @@ export default {
this.$.gopage(url)
},
- async addCart(item, event) {
+ async addCart(item) {
var that = this;
var params = {
item_id: item.item_id,
@@ -693,8 +693,6 @@ export default {
SKU_Id: item.item_id,
};
- event.stopPropagation()
-
await this.$store.dispatch(`addCart`, {
params: params,
callback: (data, status, msg, code) => {