From 18884519d406483968088defbf08f68a8e3b5472 Mon Sep 17 00:00:00 2001
From: Enzo <1284707383@qq.com>
Date: Wed, 18 Aug 2021 18:01:19 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5/=E6=88=91=E7=9A=84/=E6=8E=A8?=
=?UTF-8?q?=E8=8D=90=E7=80=91=E5=B8=83=E6=B5=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/lf-waterfall-my/lf-waterfall.vue | 159 +++++++++++++++++
.../lf-waterfall-recom/lf-waterfall.vue | 167 ++++++++++++++++++
components/lf-waterfall/lf-waterfall.vue | 16 +-
pages/index/index.vue | 15 +-
pages/recommList/index.vue | 19 +-
pages/user/user.vue | 6 +-
6 files changed, 360 insertions(+), 22 deletions(-)
create mode 100644 components/lf-waterfall-my/lf-waterfall.vue
create mode 100644 components/lf-waterfall-recom/lf-waterfall.vue
diff --git a/components/lf-waterfall-my/lf-waterfall.vue b/components/lf-waterfall-my/lf-waterfall.vue
new file mode 100644
index 0000000..f10f955
--- /dev/null
+++ b/components/lf-waterfall-my/lf-waterfall.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+ 已售{{item.sale}}
+
+
+
+ {{item.product.title}}
+
+
+
+
+ {{item.original_price}}
+
+
+
+
+
+
+
+ 已售{{item.sale}}
+
+
+
+ {{item.product.title}}
+
+
+
+
+ {{item.original_price}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/lf-waterfall-recom/lf-waterfall.vue b/components/lf-waterfall-recom/lf-waterfall.vue
new file mode 100644
index 0000000..cb0d288
--- /dev/null
+++ b/components/lf-waterfall-recom/lf-waterfall.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+ 已售{{item.sale}}
+
+
+
+ {{item.product.title}}
+
+
+
+
+ {{item.original_price}}
+
+
+
+
+
+
+
+ 已售{{item.sale}}
+
+
+
+ {{item.product.title}}
+
+
+
+
+ {{item.original_price}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/lf-waterfall/lf-waterfall.vue b/components/lf-waterfall/lf-waterfall.vue
index 60e294c..15f168f 100644
--- a/components/lf-waterfall/lf-waterfall.vue
+++ b/components/lf-waterfall/lf-waterfall.vue
@@ -1,6 +1,6 @@
-
+
@@ -52,14 +52,24 @@
}
},
- onLoad(){
+ computed: {
+ dataList() {
+ return this.list
+ }
+ },
+ onShow(){
+
+ },
+ destroyed() {
},
methods: {
onClick(id){
- console.log("aaaa");
this.$url('/pages/goodsDetail/index?goods_id='+id);
this.$emit('click');
+ },
+ clear() {
+ this.$refs.uWaterfall.clear();
}
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f2c9918..f124ceb 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -90,7 +90,7 @@
-
+
{{ loading_text }}
@@ -128,26 +128,14 @@
}
},
onShow() {
- // this.addRandomData();
this.getIndexData()
this.getFavourite()
},
methods: {
- // 瀑布流随机模拟数据
- addRandomData() {
- for(let i = 0; i < 10; i++) {
- let index = this.$u.random(0, this.list.length - 1);
- // 先转成字符串再转成对象,避免数组对象引用导致数据混乱
- let item = JSON.parse(JSON.stringify(this.list[index]))
- item.id = this.$u.guid();
- this.recomm_list.push(item);
- }
- },
//获取猜你喜欢
getFavourite() {
this.$http(this.API.API_FAVOURITE).then(res => {
this.recomm_list = res.data.data
- console.log(res)
}).catch(err => {
})
@@ -190,6 +178,7 @@
},
onPullDownRefresh(){
this.getIndexData()
+ this.getFavourite()
},
onShareAppMessage(){
let shareInfo = {
diff --git a/pages/recommList/index.vue b/pages/recommList/index.vue
index 7ca7ca5..417a8a0 100644
--- a/pages/recommList/index.vue
+++ b/pages/recommList/index.vue
@@ -6,12 +6,15 @@
-
+
-
+
{{tabItem.loadingText}}
+
@@ -20,15 +23,19 @@