loadmore 7.27

This commit is contained in:
2020-07-27 17:59:47 +08:00
parent 100f31c6f9
commit 6eabd3a575
17 changed files with 421 additions and 58 deletions

View File

@@ -42,17 +42,6 @@ export default {
// this.loadStatus = "nomore";
// this.tpage--;
// })
// this.$parent.callback({ page: this.tpage }).then(length => {
// if(length == 0) {
// this.tpage--;
// this.status = 'nomore';
// } else {
// this.status = 'loading';
// }
// }).catch(() => {
// this.loadStatus = "nomore";
// this.tpage--;
// })
}
}
};

View File

@@ -96,6 +96,7 @@ export default {
if(res.errCode == 0) {
this.$emit("refreshOrderList", { reload: 'again' });
}
this.$u.toast(res.message);
})
},
toOtherPage(url) {

View File

@@ -14,12 +14,10 @@
</swiper>
<!-- 加载更多 -->
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20"></u-loadmore>
<!-- <loadmore ref="loadmore" @callback="getGoodsRecommend" bgColor="#FFF" :page="page"></loadmore> -->
</view>
</template>
<script>
import item from "./item";
import loadmore from "@/components/loadmore/index";
export default {
name:"list",
data() {
@@ -36,10 +34,10 @@ export default {
},
components: {
item,
loadmore
},
watch: {
current(index) {
this.page = 1;
const id = this.classifyList[index].gc_id;
this.getGoodsRecommend({gc_id: id});
}
@@ -68,8 +66,6 @@ export default {
this.loadStatus = "nomore";
this.page--;
})
// this.$refs.loadmore.reachBottom();
// this.getGoodsRecommend(this.classifyList[this.current].gc_id);
},
getGoodsClassRecommend(gc_id) {
this.$u.api.getGoodsClassRecommend().then(res => {
@@ -77,7 +73,6 @@ export default {
// 初始化 current
this.current = 0;
this.classifyList = res.data.gc_recommend;
// this.getGoodsRecommend(this.classifyList[0].gc_id);
}
})
},