修改我的页面喜欢以及追剧数量接口
This commit is contained in:
parent
ffdcec41c8
commit
4819da8b9d
|
|
@ -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'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue