From 040c5ce981950b8e337008ce37fe9f6242d59f79 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Mon, 18 Mar 2024 15:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E5=88=86?= =?UTF-8?q?=E9=94=80=E5=95=86=E5=BA=97=E9=93=BA=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8F=8A=E4=BB=A3=E7=90=86=E5=95=86=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E7=80=91=E5=B8=83=E6=B5=81?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E8=B0=83=E6=95=B4=E4=B8=BA=E3=80=90uv-waterf?= =?UTF-8?q?all=E3=80=91=E7=80=91=E5=B8=83=E6=B5=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/member/agent/myStore/myStore.vue | 116 ++++++++++++++---- .../member/distribution/myStore/myStore.vue | 116 ++++++++++++++---- 2 files changed, 182 insertions(+), 50 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/member/agent/myStore/myStore.vue b/CoreCms.Net.Uni-App/CoreShop/pages/member/agent/myStore/myStore.vue index fac9e8a9..93eaf463 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/member/agent/myStore/myStore.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/member/agent/myStore/myStore.vue @@ -58,32 +58,75 @@ - - - - - - - - {{item.name}} - - - {{item.price}}元 {{item.mktprice}}元 - - - 推荐 - - - 热门 + + + + + + + + + + + @@ -127,7 +170,12 @@ page: 1, //默认页码 searchKey: '请输入关键字搜索', shareUrl: this.$globalConstVars.shareUrl, - lvvpopref: false + lvvpopref: false, + list1: [],// 瀑布流第一列数据 + list2: [],// 瀑布流第二列数据 + leftGap: 10, + rightGap: 10, + columnGap: 10 } }, onShow: function () { @@ -146,7 +194,25 @@ this.getAgent(store); this.getGoods(); }, + computed: { + imageStyle(item) { + return item => { + const v = uni.upx2px(750) - this.leftGap - this.rightGap - this.columnGap; + const w = v / 2; + const rate = w / item.w; + const h = rate * item.h; + return { + width: w + 'px', + height: h + 'px' + } + } + } + }, methods: { + // 这点非常重要:e.name在这里返回是list1或list2,要手动将数据追加到相应列 + changeList(e) { + this[e.name].push(e.value); + }, // 显示modal弹出框 openPopup() { this.lvvpopref = true; diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/member/distribution/myStore/myStore.vue b/CoreCms.Net.Uni-App/CoreShop/pages/member/distribution/myStore/myStore.vue index b67cf74a..c59ed932 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/member/distribution/myStore/myStore.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/member/distribution/myStore/myStore.vue @@ -58,32 +58,75 @@ - - - - - - - - {{item.name}} - - - {{item.price}}元 {{item.mktprice}}元 - - - 推荐 - - - 热门 + + + + + + + + + + + @@ -126,7 +169,12 @@ page: 1, //默认页码 searchKey: '请输入关键字搜索', shareUrl: this.$globalConstVars.shareUrl, - lvvpopref: false + lvvpopref: false, + list1: [],// 瀑布流第一列数据 + list2: [],// 瀑布流第二列数据 + leftGap: 10, + rightGap: 10, + columnGap: 10 } }, onShow: function () { @@ -145,7 +193,25 @@ this.getDistribution(store); this.getGoods(); }, + computed: { + imageStyle(item) { + return item => { + const v = uni.upx2px(750) - this.leftGap - this.rightGap - this.columnGap; + const w = v / 2; + const rate = w / item.w; + const h = rate * item.h; + return { + width: w + 'px', + height: h + 'px' + } + } + } + }, methods: { + // 这点非常重要:e.name在这里返回是list1或list2,要手动将数据追加到相应列 + changeList(e) { + this[e.name].push(e.value); + }, // 显示modal弹出框 openPopup() { this.lvvpopref = true;