mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 11:26:47 +08:00
提交修改
This commit is contained in:
@@ -37,7 +37,10 @@
|
|||||||
<text class="desrow-value">{{tea.teacherName}}</text>
|
<text class="desrow-value">{{tea.teacherName}}</text>
|
||||||
<text class="desrow-value">({{tea.orgInfo}})</text>
|
<text class="desrow-value">({{tea.orgInfo}})</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: #387DF7;;">+关注</view>
|
<view @click="followUser(tea)" style="color: #387DF7;;">
|
||||||
|
<text v-if="tea.followed">已关注</text>
|
||||||
|
<text v-else>+关注</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -74,36 +77,66 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else >
|
<view v-else >
|
||||||
<view v-if="scrollItemWidth>0" class="main-cata-active">
|
<view v-if="courseInfo.type==10">
|
||||||
<scroll-view scroll-x :scroll-y="false" style="height:115px;white-space: nowrap;overflow: hidden;" :scroll-left="scrollInfo.scrollLeft" @scroll="scrollHandler">
|
<view v-if="scrollItemWidth>0" class="main-cata-active">
|
||||||
<!-- <view class="mycrollcontent" style="display: flex;justify-content:flex-start;"> -->
|
<scroll-view scroll-x :scroll-y="false" style="min-height:180upx;white-space: nowrap;overflow: hidden;" :scroll-left="scrollInfo.scrollLeft" @scroll="scrollHandler">
|
||||||
<view v-for="(con,conIdx) in scrollList" :key="conIdx" style="display: inline-block;" :id="con.id" @click="playContent(con.cataName,con,conIdx,0)">
|
<!-- <view class="mycrollcontent" style="display: flex;justify-content:flex-start;"> -->
|
||||||
<!---->
|
<view v-for="(con,conIdx) in contentList" :key="conIdx" style="display: inline-block;" :id="con.id" @click="playContent('',con,conIdx,0)">
|
||||||
<view :style="{width:scrollItemWidth+'px'}" class="scroll-item" :class="{'studying':curContent.id==con.id}">
|
<!---->
|
||||||
<view class="scroll-item-sec">{{con.cataName}}
|
<view :style="{width:scrollItemWidth+'px'}" class="scroll-item" :class="{'studying':curContent.id==con.id}">
|
||||||
<!-- <text v-if="con.cataStatus && con.cataStatus==1" class="status-tag" :class="statusClass(con.cataStatus)">未开始</text>
|
<view class="scroll-item-con">
|
||||||
<text v-if="con.cataStatus && con.cataStatus==2" class="status-tag" :class="statusClass(con.cataStatus)">进行中</text>
|
<view class="scroll-item-name">
|
||||||
<text v-if="con.cataStatus && con.cataStatus==9" class="status-tag" :class="statusClass(con.cataStatus)">已完成</text> -->
|
{{con.contentName}}
|
||||||
</view>
|
|
||||||
<view class="scroll-item-con">
|
|
||||||
<view class="scroll-item-name">
|
|
||||||
{{con.contentName}}
|
|
||||||
</view>
|
|
||||||
<!-- <view class="scroll-item-type">
|
|
||||||
<view class="square-border">
|
|
||||||
<view :class="statusClass(con.status)">
|
|
||||||
{{getConType(con.contentType)}}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<text v-if="con.status==1" class="status-tag" :class="statusClass(con.status)">未开始</text>
|
<!-- <view class="scroll-item-type">
|
||||||
<text v-if="con.status==2" class="status-tag" :class="statusClass(con.status)">进行中</text>
|
<view class="square-border">
|
||||||
<text v-if="con.status==9" class="status-tag" :class="statusClass(con.status)">已完成</text>
|
<view :class="statusClass(con.status)">
|
||||||
</view> -->
|
{{getConType(con.contentType)}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text v-if="con.status==1" class="status-tag" :class="statusClass(con.status)">未开始</text>
|
||||||
|
<text v-if="con.status==2" class="status-tag" :class="statusClass(con.status)">进行中</text>
|
||||||
|
<text v-if="con.status==9" class="status-tag" :class="statusClass(con.status)">已完成</text>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<!-- </view> -->
|
||||||
<!-- </view> -->
|
</scroll-view>
|
||||||
</scroll-view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view v-if="scrollItemWidth>0" class="main-cata-active">
|
||||||
|
<scroll-view scroll-x :scroll-y="false" style="height:115px;white-space: nowrap;overflow: hidden;" :scroll-left="scrollInfo.scrollLeft" @scroll="scrollHandler">
|
||||||
|
<!-- <view class="mycrollcontent" style="display: flex;justify-content:flex-start;"> -->
|
||||||
|
<view v-for="(con,conIdx) in scrollList" :key="conIdx" style="display: inline-block;" :id="con.id" @click="playContent(con.cataName,con,conIdx,0)">
|
||||||
|
<!---->
|
||||||
|
<view :style="{width:scrollItemWidth+'px'}" class="scroll-item" :class="{'studying':curContent.id==con.id}">
|
||||||
|
<view class="scroll-item-sec">{{con.cataName}}
|
||||||
|
<!-- <text v-if="con.cataStatus && con.cataStatus==1" class="status-tag" :class="statusClass(con.cataStatus)">未开始</text>
|
||||||
|
<text v-if="con.cataStatus && con.cataStatus==2" class="status-tag" :class="statusClass(con.cataStatus)">进行中</text>
|
||||||
|
<text v-if="con.cataStatus && con.cataStatus==9" class="status-tag" :class="statusClass(con.cataStatus)">已完成</text> -->
|
||||||
|
</view>
|
||||||
|
<view class="scroll-item-con">
|
||||||
|
<view class="scroll-item-name">
|
||||||
|
{{con.contentName}}
|
||||||
|
</view>
|
||||||
|
<!-- <view class="scroll-item-type">
|
||||||
|
<view class="square-border">
|
||||||
|
<view :class="statusClass(con.status)">
|
||||||
|
{{getConType(con.contentType)}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text v-if="con.status==1" class="status-tag" :class="statusClass(con.status)">未开始</text>
|
||||||
|
<text v-if="con.status==2" class="status-tag" :class="statusClass(con.status)">进行中</text>
|
||||||
|
<text v-if="con.status==9" class="status-tag" :class="statusClass(con.status)">已完成</text>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- </view> -->
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -129,7 +162,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!--评论-->
|
<!--评论-->
|
||||||
<view v-if="tabIndex==2" class="pinglun">
|
<view v-show="tabIndex==2" class="pinglun">
|
||||||
<comments ref="comments" v-if="courseId && courseId!=''" :objType="1" :objId="courseId"></comments>
|
<comments ref="comments" v-if="courseId && courseId!=''" :objType="1" :objId="courseId"></comments>
|
||||||
<interact-fixed ref="fiexdbar" :type="1" :data="courseInfo" :users="teachers" :praises="false" :comments="false" @comment-success="refreshComments" @share-success="shareSuccess"></interact-fixed>
|
<interact-fixed ref="fiexdbar" :type="1" :data="courseInfo" :users="teachers" :praises="false" :comments="false" @comment-success="refreshComments" @share-success="shareSuccess"></interact-fixed>
|
||||||
</view>
|
</view>
|
||||||
@@ -230,7 +263,8 @@
|
|||||||
import apiVideoStudy from "@/api/modules/videoStudy.js";
|
import apiVideoStudy from "@/api/modules/videoStudy.js";
|
||||||
import apiCourseGrade from "@/api/modules/courseGrade.js";
|
import apiCourseGrade from "@/api/modules/courseGrade.js";
|
||||||
import apiCourseFile from "@/api/modules/courseFile.js";
|
import apiCourseFile from "@/api/modules/courseFile.js";
|
||||||
import apiUser from '@/api/system/user.js'
|
import apiUser from '@/api/system/user.js';
|
||||||
|
import apiUserFollow from '@/api/phase2/userfollow.js'
|
||||||
import apiResOwner from '@/api/modules/resowner.js'
|
import apiResOwner from '@/api/modules/resowner.js'
|
||||||
import apiPraises from "@/api/modules/praises.js";
|
import apiPraises from "@/api/modules/praises.js";
|
||||||
import apiTrample from "@/api/modules/trample.js";
|
import apiTrample from "@/api/modules/trample.js";
|
||||||
@@ -393,16 +427,21 @@
|
|||||||
let userIds = [];
|
let userIds = [];
|
||||||
//let ctoUsers = [];
|
//let ctoUsers = [];
|
||||||
rs.result.teachers.forEach(item => {
|
rs.result.teachers.forEach(item => {
|
||||||
// item.aid='';
|
item.followed=false;
|
||||||
item.name= '';
|
item.name= '';
|
||||||
item.orgInfo= '';
|
item.orgInfo= '';
|
||||||
item.avatar= '';
|
item.avatar= '';
|
||||||
item.code= '';
|
item.code= '';
|
||||||
item.sex=null;
|
item.sex=null;
|
||||||
userIds.push(item.teacherId);
|
userIds.push(item.teacherId);
|
||||||
//ctoUsers.push({ aid: item.teacherId, name: item.teacherName });
|
//检查是否已关注
|
||||||
|
apiUserFollow.has(item.teacherId).then(followRs=>{
|
||||||
|
if(followRs.status==200 && followRs.result){
|
||||||
|
item.followed=true;
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
//this.toUsers = ctoUsers;
|
|
||||||
$this.loadAuthorInfo(rs.result.teachers, userIds);
|
$this.loadAuthorInfo(rs.result.teachers, userIds);
|
||||||
$this.teachers=rs.result.teachers;
|
$this.teachers=rs.result.teachers;
|
||||||
}
|
}
|
||||||
@@ -642,6 +681,30 @@
|
|||||||
this.isTrample=true;
|
this.isTrample=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
followUser(tea){
|
||||||
|
//实现关注处理
|
||||||
|
if(tea.followed){
|
||||||
|
apiUserFollow.remove(tea.teacherId).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
tea.followed=false;
|
||||||
|
this.$refs.messager.show({message:'取消关注',type:'success'});
|
||||||
|
}else{
|
||||||
|
this.$refs.messager.show({message:rs.message,type:'error'});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
apiUserFollow.save(tea.teacherId).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
tea.followed=true;
|
||||||
|
this.$refs.messager.show({message:'关注成功',type:'success'});
|
||||||
|
}else{
|
||||||
|
this.$refs.messager.show({message:rs.message,type:'error'});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
changeTab(idx){
|
changeTab(idx){
|
||||||
this.tabIndex=idx;
|
this.tabIndex=idx;
|
||||||
@@ -839,7 +902,7 @@
|
|||||||
border-bottom: 4upx solid #007DFF;
|
border-bottom: 4upx solid #007DFF;
|
||||||
}
|
}
|
||||||
.tabrow-item{
|
.tabrow-item{
|
||||||
margin-right: 20upx;
|
margin-right: 30upx;
|
||||||
line-height: 60upx;
|
line-height: 60upx;
|
||||||
text{
|
text{
|
||||||
padding-bottom: 10upx;
|
padding-bottom: 10upx;
|
||||||
@@ -929,7 +992,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
.scroll-item{
|
.scroll-item{
|
||||||
// height: 125px;
|
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
.scroll-item-sec{
|
.scroll-item-sec{
|
||||||
height: 20px;
|
height: 20px;
|
||||||
@@ -948,7 +1010,7 @@
|
|||||||
display:inline-flex;
|
display:inline-flex;
|
||||||
border-radius: 8upx;
|
border-radius: 8upx;
|
||||||
padding: 20upx;
|
padding: 20upx;
|
||||||
// height: 60rpx;
|
min-height: 100upx;
|
||||||
// line-height: 60rpx;
|
// line-height: 60rpx;
|
||||||
background-color: #f4f5f7;
|
background-color: #f4f5f7;
|
||||||
.scroll-item-name{
|
.scroll-item-name{
|
||||||
|
|||||||
Reference in New Issue
Block a user