mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-16 14:26:46 +08:00
@@ -101,6 +101,10 @@ export default {
|
|||||||
type:String,
|
type:String,
|
||||||
default:'right'
|
default:'right'
|
||||||
},
|
},
|
||||||
|
isCrowd:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
answers:{
|
answers:{
|
||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:false
|
default:false
|
||||||
@@ -182,6 +186,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
handleComment() {
|
handleComment() {
|
||||||
|
if(!this.isCrowd){
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$emit('handle-comment');
|
this.$emit('handle-comment');
|
||||||
},
|
},
|
||||||
messageSave(refId,title,sendName,acceptName,acceptId,typeText){
|
messageSave(refId,title,sendName,acceptName,acceptId,typeText){
|
||||||
@@ -472,6 +479,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addFavorite(){
|
addFavorite(){
|
||||||
|
if(!this.isCrowd){
|
||||||
|
return
|
||||||
|
}
|
||||||
if(this.type==0){
|
if(this.type==0){
|
||||||
console.log('未设置type值,1表课程,2表文章,3表案例,4表问答')
|
console.log('未设置type值,1表课程,2表文章,3表案例,4表问答')
|
||||||
return;
|
return;
|
||||||
@@ -532,6 +542,9 @@ export default {
|
|||||||
this.inputShow=false;
|
this.inputShow=false;
|
||||||
},
|
},
|
||||||
addShare(){
|
addShare(){
|
||||||
|
if(!this.isCrowd){
|
||||||
|
return
|
||||||
|
}
|
||||||
//分享
|
//分享
|
||||||
this.$refs.comShare.openShare();
|
this.$refs.comShare.openShare();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import apiMessage from '@/api/system/message.js';
|
import apiMessage from '@/api/system/message.js';
|
||||||
|
import apiCourseStudy from '@/api/modules/courseStudy.js';
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
items:{
|
items:{
|
||||||
@@ -65,6 +66,8 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
returnRouter(item) {
|
returnRouter(item) {
|
||||||
|
console.log(item.pageParams,'aaa')
|
||||||
|
console.log(item,'bbb')
|
||||||
if(!item.isRead){
|
if(!item.isRead){
|
||||||
apiMessage.updateIsRead([item.id]).then(res=>{
|
apiMessage.updateIsRead([item.id]).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
@@ -82,9 +85,20 @@
|
|||||||
url: '/pages/resource/qaDetail?id=' + item.pageParams
|
url: '/pages/resource/qaDetail?id=' + item.pageParams
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/study/courseStudy?id=' + item.pageParams
|
// url: '/pages/study/courseStudy?id=' + item.pageParams
|
||||||
});
|
// });
|
||||||
|
apiCourseStudy.hasSignup(item.pageParams).then(rs => {
|
||||||
|
if (rs.status == 200) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/study/courseStudy?id=' + item.pageParams
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/resource/courseDetail?id=' + item.pageParams
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (item.refType == 2) {
|
if (item.refType == 2) {
|
||||||
@@ -96,9 +110,20 @@
|
|||||||
url: '/pages/resource/qaDetail?id=' + item.refId
|
url: '/pages/resource/qaDetail?id=' + item.refId
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/study/courseStudy?id=' + item.refId
|
// url: '/pages/study/courseStudy?id=' + item.refId
|
||||||
});
|
// });
|
||||||
|
apiCourseStudy.hasSignup(item.refId).then(rs => {
|
||||||
|
if (rs.status == 200) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/study/courseStudy?id=' + item.refId
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/resource/courseDetail?id=' + item.refId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
import { mapState, mapActions } from 'vuex';
|
import { mapState, mapActions } from 'vuex';
|
||||||
import apiShares from '@/api/modules/shares.js';
|
import apiShares from '@/api/modules/shares.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
|
import apiCourseStudy from '@/api/modules/courseStudy.js';
|
||||||
export default {
|
export default {
|
||||||
computed: mapState(['resourceTab']),
|
computed: mapState(['resourceTab']),
|
||||||
data() {
|
data() {
|
||||||
@@ -257,9 +258,20 @@ export default {
|
|||||||
})
|
})
|
||||||
citem.isRead = true;
|
citem.isRead = true;
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/study/courseStudy?id=' + citem.id
|
// url: '/pages/study/courseStudy?id=' + citem.id
|
||||||
});
|
// });
|
||||||
|
apiCourseStudy.hasSignup(citem.id).then(rs => {
|
||||||
|
if (rs.status == 200) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/study/courseStudy?id=' + citem.id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/resource/courseDetail?id=' + citem.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
// if (citem.contentType == 10) {
|
// if (citem.contentType == 10) {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/resource/microDetail?id=' + citem.objId
|
// url: '/pages/resource/microDetail?id=' + citem.objId
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!--底部-->
|
<!--底部-->
|
||||||
<!--底部-->
|
<!--底部-->
|
||||||
<interact-fixed v-if="courseInfo.id != ''" ref="fiexdbar" :type="1" :users="teachers" :data="courseInfo" :comments="isComments" @handle-comment="handleComment" @comment-success="refreshComments" :praises="false">
|
<interact-fixed v-if="courseInfo.id != ''" ref="fiexdbar" :type="1" :isCrowd="isCrowd" :users="teachers" :data="courseInfo" :comments="isComments" @handle-comment="handleComment" @comment-success="refreshComments" :praises="false">
|
||||||
<view class="" v-if="tabIndex !== 2">
|
<view class="" v-if="tabIndex !== 2">
|
||||||
<template v-if="isCrowd">
|
<template v-if="isCrowd">
|
||||||
<view v-if="studyId == ''">
|
<view v-if="studyId == ''">
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ import cellGroup from '../../uni_modules/uview-ui/libs/config/props/cellGroup'
|
|||||||
loadStatus:'more',
|
loadStatus:'more',
|
||||||
count:0,
|
count:0,
|
||||||
pages:0,
|
pages:0,
|
||||||
params:{pageIndex:1,pageSize:10,keyword:'',publish:true,device:2,},
|
params:{pageIndex:1,pageSize:10,keyword:'',publish:true,device:2,userId:''},
|
||||||
pageIndex:1,
|
pageIndex:1,
|
||||||
list:[]
|
list:[]
|
||||||
},
|
},
|
||||||
@@ -581,6 +581,8 @@ import cellGroup from '../../uni_modules/uview-ui/libs/config/props/cellGroup'
|
|||||||
//查询课程
|
//查询课程
|
||||||
let $this=this;
|
let $this=this;
|
||||||
let dataList = [];
|
let dataList = [];
|
||||||
|
this.course.params.userId = this.userInfo.aid
|
||||||
|
console.log(this.userInfo.aid,'aaaaa')
|
||||||
await apiCoursePortal.courseSearch(this.course.params).then(rs=>{
|
await apiCoursePortal.courseSearch(this.course.params).then(rs=>{
|
||||||
setTimeout(function(){ uni.hideLoading();},100);
|
setTimeout(function(){ uni.hideLoading();},100);
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
|
|||||||
Reference in New Issue
Block a user