This commit is contained in:
daihh
2022-11-22 11:24:00 +08:00
13 changed files with 40 additions and 21 deletions

View File

@@ -12,7 +12,7 @@
{{course.name}}
</view>
<view class="course-text">
{{course.teacher}} | {{formatUserNumber(course.studys || course.studies)}}人已学
<text style="margin-right: 6upx;" v-if="course.teacher">{{course.teacher}} |</text> {{formatUserNumber(course.studys || course.studies)}}人已学
</view>
<view class="course-type">
<text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text>

View File

@@ -11,7 +11,7 @@
<view v-if="praises" @click="addPraise()" class="interact-bar-item">
<image v-if="isPraise" class="pto-img" src="../../static/images/icon/bar-praise-active.png" size="24"></image>
<image v-else class="pto-img" src="../../static/images/icon/bar-praise.png" size="24"></image>
<text style="font-size: 15px;color: #999999;margin-left: 8upx;">{{data.praises}}</text>
<text style="font-size: 15px;color: #999999;margin-left: 8upx;">{{data.praises == 0 ? '':data.praises}}</text>
</view>
<view v-if="favorites" class="interact-bar-item">
<image class="pto-img" src="../../static/images/icon/bar-favorite.png" size="24"></image>

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>
@@ -67,8 +67,7 @@
</view>
<view class="articl-box">
<view class="articl-box-index" v-for="ar in arlDataList" @click="toArticleDetail(ar)">
<image v-if="ar.coverurl == ''" style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" src="../../static/images/course.png" mode=""></image>
<image v-else style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" :src="fileUrl+ar.coverurl" mode=""></image>
<image style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" :src="fileUrl+ar.coverurl" mode=""></image>
<view class="box-index">
<view class="box-index-title" style="height:90upx">
{{ar.title}}

View File

@@ -160,6 +160,7 @@
})
},
allRead(){
this.flag = false;
if(this.items.length == 0) {
return
}

View File

@@ -13,7 +13,7 @@ Vue.prototype.$keywordActiveShow=function(str,keyword){
if(!str||str.indexOf(keyword)===-1||keyword==''){
return str
}
return str.replace(keyword,`<span style="color:#FF8E00">${keyword}</span>`)
return str.replace(keyword,`<span style="color:#387DF7 ">${keyword}</span>`)
}

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

@@ -83,7 +83,7 @@
</view>
</view>
</view>
<uni-load-more v-show="this.articleList.count>articleList.pageSize" :status="loadStatus"></uni-load-more>
<uni-load-more v-show="articleList.count>0" :status="loadStatus"></uni-load-more>
</view>
</template>
@@ -165,8 +165,8 @@ export default {
this.flagLoading = false;
uni.hideLoading();
if (rs.status == 200) {
this.articleList.count = rs.result.count;
if (rs.result.list.length != 0) {
this.articleList.count = rs.result.count;
let userIds = [];
rs.result.list.forEach(item => {
item.name=''
@@ -224,7 +224,6 @@ export default {
});
},
chooseStatus(e) {
console.log(e,'e')
if(this.flagLoading) {
return;
}

View File

@@ -28,7 +28,7 @@
</view>
</view>
</view>
<view>
<view style="margin-top: 60upx;margin: 0 auto;">
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>

View File

@@ -223,7 +223,7 @@ export default {
}, 100);
},
withdraw(item){
apiShares.deleteshares(item.id).then(res=>{
apiShares.deleteshares(item.shareId).then(res=>{
if(res.status == 200){
uni.showToast({
icon:'success',

View File

@@ -149,6 +149,7 @@ export default {
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
item.question.shareId=item.shareId;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
@@ -253,6 +254,7 @@ export default {
if(res.status==200){
}
})
citem.isRead = true;
}
uni.navigateTo({
url: '/pages/study/courseStudy?id=' + citem.id
@@ -269,10 +271,11 @@ export default {
},
toArticleDetail(item) {
if(!item.isRead){
apiShares.updateIsRead(item.id).then(res=>{
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
}
})
item.isRead = true;
}
uni.navigateTo({
url: '/pages/resource/articeDetail?id=' + item.id
@@ -280,10 +283,11 @@ export default {
},
toQaDetail(item) {
if(!item.isRead){
apiShares.updateIsRead(item.id).then(res=>{
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
}
})
}
uni.navigateTo({
url: '/pages/resource/qaDetail?id=' + item.id

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"

View File

@@ -1807,6 +1807,9 @@
text-overflow: ellipsis;
}
}
.catalog-con:last-child{
border: none;
}
.catalog-con{
display: flex;
justify-content: space-between;

View File

@@ -335,7 +335,7 @@
{name: '已完成',value: 2}
],
autonomyStatustList: [
{name: '全部',value: ''},
{name: '全部',value: 0},
{name: '未开始',value: 1},
{name: '进行中',value: 2},
{name: '已完成',value: 9}