From 4819da8b9d3aa1d3716ef335c14bf8ade279f2e7 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Sat, 4 Jan 2025 10:03:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=96=9C=E6=AC=A2=E4=BB=A5=E5=8F=8A=E8=BF=BD?= =?UTF-8?q?=E5=89=A7=E6=95=B0=E9=87=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/me/index.vue | 61 +++++++++------------------------------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/pages/me/index.vue b/pages/me/index.vue index c4dbf47..d68813e 100644 --- a/pages/me/index.vue +++ b/pages/me/index.vue @@ -293,9 +293,6 @@ isShoMoney: true, //是否显示余额 avatar: '../../static/images/logo.png', img: '../../static/images/me/huiyuan.png', - swiperList: [{ - imageUrl: '../../static/images/me/banner.png', - }], isLogin: false, userName: '未登录', isVIP: false, @@ -319,7 +316,6 @@ } }, onLoad() { - this.getBannerList() }, onPullDownRefresh() { $cache_user.clear() @@ -380,8 +376,7 @@ this.isLogin = true this.userName = uni.getStorageSync('userName') this.isVIP = uni.getStorageSync('isVIP') - this.getMyLoveNum() - this.getMyFansNum() + this.getCollectVideoSummary() } else { this.isLogin = false this.isVIP = false @@ -459,38 +454,25 @@ } }, - //获取我喜欢的数量 - getMyLoveNum() { + + /** + * 获取我喜欢的数量/追剧数量 + */ + getCollectVideoSummary() { let data = { } - this.$Request.getT('/app/courseCollect/selectByUserId', { - page: 1, - limit: 999, - classify: 2 - }).then(res => { + this.$Request.getT('app/courseCollect/collectVideoSummary').then(res => { if (res.code === 0) { - this.myLoveNum = res.data.totalCount + this.myLoveNum = res.data.likecCount + this.myZhui = res.data.collectCount } else { this.myLoveNum = 0 - } - }) - }, - //获取我追剧的数量 - getMyFansNum() { - - this.$Request.getT('/app/courseCollect/selectByUserId', { - page: 1, - limit: 999, - classify: 1 - }).then(res => { - if (res.code === 0) { - this.myZhui = res.data.totalCount - } else { this.myZhui = 0 } }) }, + /** * 获取积分 */ @@ -634,28 +616,7 @@ }) } - }, - // 获取轮播图列表 - getBannerList() { - this.$u.api.bannerList({ - classify: '3' - }).then(res => { - if (res.code === 0 && res.data) { - let arr = [] - res.data.forEach(ret => { - if (ret.state === 1) { - arr.push(ret) - } - }) - this.swiperList = arr - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }); - } - }) - }, + } } } From abb08018d3e938d4645eb71970f4523dd91597d9 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Sat, 4 Jan 2025 10:06:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=88=E4=BD=9C=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E5=96=9C=E6=AC=A2=E6=95=B0=E9=87=8F=E5=AD=97=E6=AE=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/me/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/me/index.vue b/pages/me/index.vue index d68813e..6713702 100644 --- a/pages/me/index.vue +++ b/pages/me/index.vue @@ -464,7 +464,7 @@ } this.$Request.getT('app/courseCollect/collectVideoSummary').then(res => { if (res.code === 0) { - this.myLoveNum = res.data.likecCount + this.myLoveNum = res.data.likeCount this.myZhui = res.data.collectCount } else { this.myLoveNum = 0