diff --git a/components/course-list/course-list.vue b/components/course-list/course-list.vue
index 8452ec6..c6b5656 100644
--- a/components/course-list/course-list.vue
+++ b/components/course-list/course-list.vue
@@ -12,7 +12,7 @@
{{course.name}}
- {{course.teacher}} | {{formatUserNumber(course.studys || course.studies)}}人已学
+ {{course.teacher}} | {{formatUserNumber(course.studys || course.studies)}}人已学
{{sysTypeName(course.sysType1)}}
diff --git a/components/interact-bar/interact-bar.vue b/components/interact-bar/interact-bar.vue
index cdebe01..5bcadc0 100644
--- a/components/interact-bar/interact-bar.vue
+++ b/components/interact-bar/interact-bar.vue
@@ -11,7 +11,7 @@
- {{data.praises}}
+ {{data.praises == 0 ? '':data.praises}}
diff --git a/components/recommend-index/recommend-index.vue b/components/recommend-index/recommend-index.vue
index 8e9f51f..3902bf9 100644
--- a/components/recommend-index/recommend-index.vue
+++ b/components/recommend-index/recommend-index.vue
@@ -26,7 +26,7 @@
- 课程排行榜
+ 热门课程排行榜
@@ -67,8 +67,7 @@
-
-
+
{{ar.title}}
diff --git a/components/system-news/system-news.vue b/components/system-news/system-news.vue
index 9740837..278c730 100644
--- a/components/system-news/system-news.vue
+++ b/components/system-news/system-news.vue
@@ -160,6 +160,7 @@
})
},
allRead(){
+ this.flag = false;
if(this.items.length == 0) {
return
}
diff --git a/main.js b/main.js
index 9e8486a..ce6631d 100644
--- a/main.js
+++ b/main.js
@@ -13,7 +13,7 @@ Vue.prototype.$keywordActiveShow=function(str,keyword){
if(!str||str.indexOf(keyword)===-1||keyword==''){
return str
}
- return str.replace(keyword,`${keyword}`)
+ return str.replace(keyword,`${keyword}`)
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 56f43c8..274226f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -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) {
+ changeConType(item) {
+ console.log(item)
this.conType = item.type;
this.changeList();
},
diff --git a/pages/my/myArticles.vue b/pages/my/myArticles.vue
index 41a74a1..ddd4301 100644
--- a/pages/my/myArticles.vue
+++ b/pages/my/myArticles.vue
@@ -83,7 +83,7 @@
-
+
@@ -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;
}
diff --git a/pages/my/myAssesses.vue b/pages/my/myAssesses.vue
index 94f4440..dfd2a80 100644
--- a/pages/my/myAssesses.vue
+++ b/pages/my/myAssesses.vue
@@ -28,7 +28,7 @@
-
+
diff --git a/pages/my/myShares.vue b/pages/my/myShares.vue
index f5abfd0..55eaa90 100644
--- a/pages/my/myShares.vue
+++ b/pages/my/myShares.vue
@@ -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',
diff --git a/pages/my/toMeShares.vue b/pages/my/toMeShares.vue
index 1fcbe2d..448168a 100644
--- a/pages/my/toMeShares.vue
+++ b/pages/my/toMeShares.vue
@@ -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
diff --git a/pages/resource/search.vue b/pages/resource/search.vue
index 08efea9..f2b9113 100644
--- a/pages/resource/search.vue
+++ b/pages/resource/search.vue
@@ -2,7 +2,7 @@
-
+