From f0846a003e6d766d215217f9cd9bafeb9c3a1d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Mon, 28 Jun 2021 16:54:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B7=BB=E5=8A=A0]=20=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C=E6=88=91=E7=9A=84=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E9=AA=A8=E6=9E=B6?= =?UTF-8?q?=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/collect/index.vue | 50 ++++++------ pages/goodsDetail/index.vue | 153 ++++++++++++++++++------------------ 2 files changed, 106 insertions(+), 97 deletions(-) diff --git a/pages/collect/index.vue b/pages/collect/index.vue index ff79c9d..9652273 100644 --- a/pages/collect/index.vue +++ b/pages/collect/index.vue @@ -1,30 +1,32 @@ @@ -37,7 +39,8 @@ loadingText: '正在加载中', page: 1, isPage: true, - pageSize: 20 + pageSize: 20, + skeletonLoading: true } }, onLoad(){ @@ -46,6 +49,7 @@ methods: { getCollectList(){ this.$http(this.API.API_COLLECT_LIST).then(res => { + this.skeletonLoading = false; this.isPage = res.data.has_more_page; let list = res.data.items.map(item => { item.is_collect = true; // 默认都收藏了 @@ -60,6 +64,8 @@ }else{ this.list.push(...list); } + }).catch(err => { + this.skeletonLoading = false; }) }, // 切换收藏状态 diff --git a/pages/goodsDetail/index.vue b/pages/goodsDetail/index.vue index ecd00c9..f675a66 100644 --- a/pages/goodsDetail/index.vue +++ b/pages/goodsDetail/index.vue @@ -1,99 +1,100 @@