This commit is contained in:
lmj
2022-11-22 10:53:39 +08:00
parent ffb348a722
commit 34d8f88007
3 changed files with 21 additions and 8 deletions

View File

@@ -26,7 +26,7 @@
<view class="list-box">
<view class="list-box-index">
<view class="list-box-title course-bg-info">
课程排行榜
热门课程排行榜
</view>
<view class="list-box-text" v-for="(cou,index) in courseRankingList" @click="toCourseDetail(cou)">
<image v-if="index == 0" style="width:50upx;height: 50upx;vertical-align: middle;" src="../../static/images/ranking/listblue01.png" mode=""></image>

View File

@@ -548,11 +548,19 @@
url: '/pages/my/message'
})
},
toSearch(){
let pageUrl='/pages/resource/search';
uni.navigateTo({
url:pageUrl
})
toSearch(){
if(this.conType == 0){
let pageUrl='/pages/resource/search?type=' + 1;
uni.navigateTo({
url:pageUrl
})
}else{
let pageUrl='/pages/resource/search?type=' + this.conType;
uni.navigateTo({
url:pageUrl
})
}
},
changeList(){
this.dataName='list'+this.tabIndex+this.conType;
@@ -564,6 +572,8 @@
this.findArticleData();
} else if(this.conType == 4) {// 问答
this.findQaData();
}else if(this.conType == 0) {// 推荐默认课程
this.findCourseData();
}
}else{
if(this.conType== 1) {//课程
@@ -572,6 +582,8 @@
this.articleList=curData.list;
} else if(this.conType == 4) {// 问答
this.qaList=curData.list;
}else if(this.conType == 0) {// 推荐默认课程
this.courseList=curData.list;
}
}
},
@@ -580,7 +592,8 @@
this.noPageList= true,//判断接口是否还有数据
this.noDataList= true,//判断接口是否还有数据
this.changeList();
},
},
changeConType(item) {
console.log(item)
this.conType = item.type;
this.changeList();

View File

@@ -2,7 +2,7 @@
<!--搜索页-->
<view style="background-color: #fff;height: 100vh;">
<u-toast ref="messager"></u-toast>
<view style="margin:30upx 30upx; display: flex;">
<view style="padding-top: 30upx; margin: 0upx 30upx; display: flex;">
<u-icon @click="back()" name="arrow-left" color="#383838" size="22" style="margin-right: 10upx;"></u-icon>
<u-search
bgColor="#F2F5F7"