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) => {