提交 517aaa24 编写于 作者: chendeli's avatar chendeli

add

上级 8d47241c
......@@ -47,7 +47,7 @@ export default {
data () {
return {
list:[],
pageNo:1,
pageNo:2,
isDisabled:false,
pageSize:10,
title:'为您推荐',
......@@ -62,6 +62,7 @@ export default {
ptop:20,
popHeight:0,
menuptop:0,
isReauestBack:true,
}
},
props:{
......@@ -89,7 +90,7 @@ export default {
mounted(){
this.list = this.parmData;
this.pageNo = this.adjustPageNo;
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
......@@ -180,13 +181,14 @@ export default {
//滑动加载更多
loadMore(){
let _this = this;
// alert(_this.pageNo);
if(!_this.noMore){
_this.pageNo += 1;
if(_this.isReauestBack){
_this.isLoading = true;
_this.loading = true;
//埋点
this.pageBurialPoin({
menuLevel:1,
......@@ -256,37 +258,26 @@ export default {
token:_this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
if(res.data == null || !res.data){
if(res.data == null || res.data.length == 0){
res.data = [];
_this.isLoading = false;
_this.noMore = true;
_this.loading = true;
_this.isReauestBack = false;
}else{
_this.isReauestBack = true;
_this.list = [..._this.list ,...res.data];
_this.isLoading = true;
_this.noMore = false;
_this.loading = false;
_this.pageNo += 1;
}
// if(type == 'loadMore'){
// _this.list = [..._this.list ,...res.data];
// }
// else{
// _this.list = res.data || [];
// }
}
///_this.clientHeight = 'auto'
},function(){
_this.isLoading = false;
_this.noMore = false;
_this.loading = false;
})
}
}
......
......@@ -15,7 +15,7 @@
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id)">
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
......@@ -100,7 +100,7 @@ export default {
},
//收藏 取消收藏
collectFun(status,id){
collectFun(status,id,name){
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
......@@ -109,7 +109,7 @@ export default {
functionCode:'f_new_course',
actionCode:'c_collect',
labelId:id,
/// labelValue :item.name,
labelValue :name,
})
let _this = this,
parm = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册