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 @@