提交修改

This commit is contained in:
daihh
2022-05-30 23:03:25 +08:00
parent faa7afb65f
commit ab382aca7b
18 changed files with 539 additions and 401 deletions

View File

@@ -227,10 +227,12 @@
}
}
.xaudio-title{
padding: 0 40upx;
font-weight: bold;
font-size: 34rpx;
margin-top: 50rpx;
text-align: center;
word-break:break-all;
}
.btn-size{
width: 100rpx;

View File

@@ -1,8 +1,7 @@
<template>
<view>
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="coverImg" :maxCount="1">
<image :src="coverImage==''? '/static/temp/uploading.png':coverImage" mode="widthFix" style="width: 150rpx;height: 150rpx;">
<image :src="coverImage==''? '/static/images/uploading.png':coverImage" mode="widthFix" style="width: 150rpx;height: 150rpx;">
</image>
</u-upload>
</view>

View File

@@ -1,9 +1,12 @@
<template name="cropper">
<view>
<view style="position: relative;">
<image :src="imgSrc.imgSrc" class="my-avatar" mode="aspectFill" @click="fSelect" :style="imgStyle"></image>
<!-- 上传图片 -->
<canvas canvas-id="avatar-canvas" id="avatar-canvas" class="my-canvas" :style="{top: styleTop, height: cvsStyleHeight}"
disable-scroll="false"></canvas>
<view @click="fSelect" style="position:absolute;top:50%;left:50%;margin-left: -29px;margin-top: -29px;" v-if="imgSrc.imgSrc == ''">
<u-icon name="plus" color="#ccc" size="58"></u-icon>
</view>
<!-- 截取边框 -->
<canvas canvas-id="oper-canvas" id="oper-canvas" class="oper-canvas" :style="{top: styleTop, height: cvsStyleHeight}"
disable-scroll="false" @touchstart="fStart" @touchmove="fMove" @touchend="fEnd"></canvas>

View File

@@ -40,6 +40,7 @@ import apiLogin from '@/api/boe/login.js';
export default {
data() {
var testPassword = /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_!@#$%^&*`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\W_!@#$%^&*`~()-+=]+$)(?![0-9\W_!@#$%^&*`~()-+=]+$)[a-zA-Z0-9\W_!@#$%^&*`~()-+=]{8,16}$/;
//testPassword=/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).{1,9}$/;
var validatePass = (rule, value, callback) => {
if (!value) {
callback(new Error('请输入旧密码'));
@@ -61,7 +62,7 @@ export default {
if (this.passwordForm.confirmPass !== '') {
this.$refs.form.validateField('confirmPass');
}
callback();
callback(true);
}
};
var validatePass3 = (rule, value, callback) => {
@@ -72,7 +73,7 @@ export default {
} else if (value != this.passwordForm.newPass) {
callback(new Error('新密码和再次确认密码不一致!'));
} else {
callback();
callback(true);
}
};
return {
@@ -84,8 +85,8 @@ export default {
showHelp: true,
res: {},
rules: {
newPass: [{ validator: validatePass2, trigger: 'blur' }],
confirmPass: [{ validator: validatePass3, trigger: 'blur' }]
newPass: [{ validator: validatePass2, trigger: ['change'] }],
confirmPass: [{ validator: validatePass3, trigger: ['change'] }]
}
};
},
@@ -96,9 +97,7 @@ export default {
});
},
submit() {
this.$refs.ruleForm
.validate()
.then(res => {
this.$refs.ruleForm.validate().then(res => {
let params = {
oldPassword: this.model.oldPass,
newPassword: this.model.newPass,

View File

@@ -1,11 +1,14 @@
<template>
<view>
<page-title :showBack="true">更换头像</page-title>
<view style="text-align: center;padding: 20upx;color: #6b6b6b; ">点击选择图片</view>
<view style="margin-top: 50upx;text-align: center;width: 360upx;height: 360upx;margin: 0upx auto;background-color: #FFFFFF;">
<cropper selWidth="660rpx" selHeight="660rpx" @upload="uploadImg" :avatarSrc="imgurl" avatarStyle="width:50vw;height:50vw;">
<view style="text-align: center;padding: 20upx;color: #6b6b6b; ">点击选择修改头像图片</view>
<view style="margin-top: 50upx;text-align: center;width: 360upx;height: 360upx;margin: 0upx auto;background-color: #FFFFFF;position: relative;">
<cropper selWidth="660rpx" selHeight="660rpx" @upload="uploadImg" :avatarSrc="imgurl" avatarStyle="width:50vw;height:50vw;">
</cropper>
</view>
<!-- <view style="padding: 10px;color: #e20000;" v-if="!loading && imgurl==''">
您还没有设置头像请上传头像图片
</view> -->
<view v-if="isNew">
<view style="margin-top: 100upx;"><button style="width: 50%;" @click="submitUpdate" type="primary">提交修改</button> </view>
</view>
@@ -23,6 +26,7 @@
computed: mapGetters(['userInfo']),
data() {
return {
loading:true,
isNew:false,
imgurl:"",
filePath:"",
@@ -31,12 +35,10 @@
},
onShow() {
this.$store.dispatch('GetUserInfo').then(rs=>{
//this.userInfoObj=rs;
this.imgurl = rs.avatar;
this.aid = rs.aid;
this.loading=false;
})
// this.imgurl = this.userInfo.avatar;
// this.aid = this.userInfo.aid;
},
methods: {
//上传返回图片

View File

@@ -7,7 +7,7 @@
<view class="top-filter">
<view class="top-content">
<view class="top-content-options">
<view>
<view style="margin-right: 20upx;">
<text class="textbtn" @click="statusSelectShow = !statusSelectShow">状态</text>
</view>
<view class="center">
@@ -314,7 +314,9 @@ export default {
}
}
.sea-show{
padding: 20rpx;
// padding: 20rpx;
// padding-bottom: 10upx;
padding: 20upx 30upx 2upx 30upx;
.sea-active{
border: 1rpx solid #679cfc !important;
color: #679cfc;
@@ -342,7 +344,7 @@ export default {
align-items: center;
.center{
flex: 1;
margin: 0upx 0upx 0upx 12upx;
// margin: 0upx 0upx 0upx 12upx;
}
}
}
@@ -396,7 +398,7 @@ export default {
.textbtn {
background-color: #ffffff;
padding: 9px 10px;
padding: 18upx 20upx;
color: #666;
border-radius: 8upx;
font-size: 28upx;

View File

@@ -6,7 +6,7 @@
<view class="top-filter">
<view class="top-content">
<view class="top-content-options">
<view style="width: 100upx;">
<view style="margin-right: 20upx;">
<!-- <u-picker :show="statusSelectShow" @cancel="statusSelectShow = false" @confirm="chooseStatus" :columns="selectData" keyName="label"></u-picker> -->
<!-- <text class="textbtn" style="color:#666" @click="statusSelectShow = true">{{ statusBtn }}</text> -->
<text class="textbtn" style="color:#666;font-size: 28upx;" @click="statusSelectShow = !statusSelectShow">状态</text>
@@ -38,7 +38,7 @@
<view v-show="statusSelectShow" class="sea-show">
<text :class="[articleList.status == status.value? 'sea-active':'','sea-index']" v-for="(status,index) in selectData" :key="index" @click="chooseStatus(status)">{{status.label}}</text>
</view>
<view style="margin-top: 5upx;">
<view style="padding-top: 14upx;">
<!-- 文章内容 下面需要把样式提到class中-->
<view class="article_one" v-for="(item, index) of articleList.list" :key="item.id">
<view >
@@ -139,8 +139,9 @@ export default {
{ label: '草稿', value: 1 },
{ label: '待审核', value: 2 },
{ label: '未通过', value: 3 },
{ label: '已通过', value: 5 },
{ label: '已发布', value: 9 }
// { label: '已通过', value: 5 },
{ label: '已下架', value: 8 },
{ label: '已发布', value: 9 },
]
// ]
};
@@ -265,7 +266,7 @@ export default {
1:'<span style="color:#999">[草稿]<span>',
2:'<span style="color:#3E7FFF">[待审核]<span>',
3:'<span style="color:#FF3E3E">[未通过]<span>',
5:'<span style="color:#2AB28B">[已通过]<span>',
8:'<span style="color:#2AB28B">[已下架]<span>',
9:'<span style="color:#3E7FFF">[已发布]<span>'
}
return obj[status]
@@ -344,22 +345,23 @@ export default {
.top-content {
// padding: 5px 5px;
.top-content-options {
height: 40px;
// height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
line-height: 40px;
padding:20upx 30upx 10upx 30upx ;
.textbtn {
background-color: #ffffff;
color: #4f4f4f;
border-radius: 8upx;
font-size: 24upx;
}
padding:20upx 30upx 0 30upx ;
// .textbtn {
// background-color: #ffffff;
// color: #4f4f4f;
// border-radius: 8upx;
// font-size: 24upx;
// }
.input-search {
flex: 1;
// padding: 28upx 20upx;
margin: 0upx 20upx 0upx 12upx;
margin: 0upx 20upx 0upx 0;
.u-input {
background: #ffffff;
}
@@ -376,7 +378,7 @@ export default {
.textbtn {
background-color: #ffffff;
padding: 9px 10px;
padding: 18upx 20upx;
color: #4f4f4f;
border-radius: 8upx;
font-size: 24upx;
@@ -393,8 +395,11 @@ export default {
}
.uni-list {
.sea-show{
padding: 20rpx;
padding: 10rpx 30upx 0 30upx;
// padding-top: 10upx;
line-height: 60upx;
.sea-active{
border: 1rpx solid #679cfc !important;
color: #679cfc;

View File

@@ -43,9 +43,9 @@
<course-image :course="item" width="262upx" height="147upx"></course-image>
</view>
<view class="course-title">
<view style="height: 70upx;">
<span class="common" :class="contentTypeFilter(item.contentType).class">{{ contentTypeFilter(item.contentType).text }}</span>
<span style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></span>
<view class="course-name">
<text class="common" :class="contentTypeFilter(item.contentType).class">{{ contentTypeFilter(item.contentType).text }}</text>
<text style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></text>
</view>
<view class="course-content">
<view class="course-text">讲师{{ item.authorName }}</view>
@@ -598,6 +598,17 @@ export default {
height: 147upx;
margin-left: 10rpx;
padding-bottom: 10upx;
.course-name{
// height: 70upx;
display: -webkit-box;
// white-space:pre-wrap;
word-wrap: break-word;
word-break:break-all;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
}
.course-content {
display: flex;

View File

@@ -6,7 +6,7 @@
<view class="top-filter">
<view class="top-content">
<view class="top-content-options">
<view style="width: 100upx;">
<view style="margin-right: 20upx;">
<!-- <u-picker
:defaultIndex="[0]"
:show="statusSelectShow"
@@ -15,7 +15,7 @@
:columns="statusArray"
keyName="name"
></u-picker> -->
<text class="textbtn" style="font-size: 26upx;" @click="statusSelectShow = !statusSelectShow">状态</text>
<text class="textbtn" style="font-size: 28upx;" @click="statusSelectShow = !statusSelectShow">状态</text>
</view>
<view class="center" >
<!-- @search这个方法根本没有执行,没有触发条件,在搜索框回车时只是调用了onload里面的请求 -->
@@ -301,7 +301,9 @@ export default {
line-height: 48upx;
}
.sea-show{
padding: 20rpx;
// padding: 28rpx;
padding: 28upx 30upx;
padding-top: 0;
.sea-active{
border: 1rpx solid #679cfc !important;
color: #679cfc;
@@ -368,7 +370,7 @@ export default {
}
.center{
flex:1;
margin: 0upx 20upx 0upx 12upx;
margin: 0upx 20upx 0upx 0upx;
.u-input {
background: #ffffff;
}
@@ -454,7 +456,7 @@ export default {
.textbtn {
background-color: #ffffff;
padding: 9px 10px;
padding: 18upx 20upx;
color: #666;
border-radius: 8upx;
font-size: 28upx;

View File

@@ -10,7 +10,7 @@
</view>
<view class="top-content-options">
<!-- 是否已查看 -->
<view style="margin-right: 15rpx;">
<view style="margin-right: 20upx;">
<!-- <u-picker :show="statusSelectShow" @cancel="statusSelectShow = false" @confirm="chooseStatus" :columns="selectData" keyName="label"></u-picker> -->
<text class="textbtn" @click="statusSelectShow = !statusSelectShow">状态</text>
</view>
@@ -513,6 +513,7 @@ export default {
.sea-show{
padding: 20rpx;
padding-left: 28upx;
padding-bottom: 10upx;
.sea-active{
border: 1rpx solid #679cfc !important;
color: #679cfc;
@@ -562,20 +563,21 @@ export default {
}
.textbtn {
background-color: #ffffff;
padding: 8px 10px;
padding: 18upx 20upx;
color: #4f4f4f;
border-radius: 8upx;
font-size: 28upx;
}
.top-content-options{
height: 40px;
height: 34px;
display: flex;
align-items: center;
line-height: 40px;
padding: 28upx 0upx 0upx 28upx;
line-height: 34px;
padding: 20upx 0upx 0upx 28upx;
.input-search {
height: 34px;
padding-right: 10px;
flex: 1;
@@ -642,7 +644,7 @@ export default {
// background: linear-gradient(to bottom, #6BA0FC, #6297FD);
display: flex;
justify-content: space-between;
line-height: 50px;
line-height: 60px;
color: #373737;
.top-bar-center {
display: flex;
@@ -655,6 +657,7 @@ export default {
border-bottom: 2px solid #588afc;
// color: #5282eb;
font-size: 35upx;
font-weight: bold;
}
}
@@ -674,7 +677,7 @@ export default {
}
.input-search{
height: 34px;
.u-input{
background: #ffffff;
}
@@ -690,7 +693,7 @@ export default {
}
.course_box {
// margin-bottom: 10px;
margin-top: 19rpx;
margin-top: 14upx;
background-color: #ffffff;
padding: 19upx 40upx;

View File

@@ -20,7 +20,7 @@
<view class="sea-show" v-show="statusSelecShow">
<text v-for="(item,index) in typeArray" :key="index" :class="[item.value == query.type ?'sea-active':'','sea-index' ]" @click="Application(item.value)">{{item.name}}</text>
</view>
<view class="data" v-for="(item,index) in data" :key="index" >
<view class="data" style="margin-top: 20upx;" v-for="(item,index) in data" :key="index" >
<view class="data-item">
<view class="data-item-text" @click="toArticleDetail(item)">
<!-- <text> {{filterObjType(item.objType)}} </text> -->
@@ -289,6 +289,7 @@
}
.sea-show {
padding: 20upx 30upx;
padding-bottom: 0;
.sea-active {
border: 1rpx solid #679cfc !important;
@@ -305,20 +306,17 @@
}
}
.input-search{
padding:28upx 20upx;
padding:28upx 30upx 0 30upx;
display: flex;
.u-input{
background: #ffffff;
}
.top-ten {
width: 120upx;
height: 62upx;
// margin-top: 26upx;
// margin-left: 24upx;
background-color: #fff;
text-align: center;
line-height: 62upx;
background-color: #ffffff;
padding: 14upx 20upx;
color: #666;
border-radius: 8upx;
font-size: 28upx;
}
// /deep/.u-icon{
// span{
@@ -405,7 +403,7 @@
.data {
margin-bottom: 15rpx;
padding: 20upx 20upx;
padding: 20upx 30upx;
background-color: #fff;
.data-item {
padding-bottom: 30rpx;

View File

@@ -524,6 +524,7 @@ export default {
}
.sea-show{
padding: 20rpx 30upx;
padding-bottom: 0;
.sea-active{
border: 1rpx solid #679cfc !important;
color: #679cfc;
@@ -559,21 +560,15 @@ export default {
/deep/ .input-search {
margin-top: 4upx;
// padding-right: 10px;
flex: 1;
// margin-right: 50rpx;
// padding: 28upx 20upx;
.u-search {
height: 34px;
background: #ffffff;
border-radius: 8upx;
.u-search__content{
// border-width:0 !important;
}
}
// /deep/.u-icon {
// span {
// font-size: 50upx;
// color: #588afc;
// }
// }
}
}

View File

@@ -2,9 +2,9 @@
<view class="content" :class="{'active':active}">
<view style="padding: 60rpx 60rpx 0 30rpx;color: #8a8a8a;overflow: auto;">
<view style="text-align: center;font-size: 50upx;padding-bottom:50rpx ;">京东方大学堂内容发布须知</view>
<view style="line-height: 60upx;white-space:pre-line;">
<view>
<!-- <u-parse :content="context"></u-parse> -->
<text v-html="context"></text>
<view style="line-height: 50upx;white-space:pre-line;margin-bottom: 20upx;" v-for="(item,index) in context" :key="index">{{item}}</view>
<!-- <view style="display: flex;margin-bottom: 10rpx;">
<view style="margin-right: 10rpx;">
1.
@@ -30,7 +30,7 @@
</view>
</view> -->
</view>
<view style="height: 300px;"></view>
<view style="height: 50px;"></view>
</view>
<view class="tabbar-box-wrap">
<view class="tabbar-box">
@@ -66,7 +66,7 @@
data() {
return {
active: false,
context:'',
context:[],
};
},
onLoad() {
@@ -84,7 +84,8 @@
getprotocol() {
apiProtocol.query(1).then(res => {
if (res.status == 200) {
this.context = res.result.content;
let list = res.result.content.split('\n');
this.context = list;
}
})
},

View File

@@ -37,91 +37,90 @@
</view>
<view class="comments-items">
<!--内容确定了这部分样式要移到class中-->
<view v-for="(an, anidx) in answerList" :key="anidx" class="comments-item">
<view style="display: flex;justify-content: space-between;align-items: center;">
<view class="one-wrap">
<view v-for="(an, anidx) in answerList" :key="anidx" class="comment">
<view class="comment-top">
<view style="display: flex;">
<author v-if="an" :showInfo="true" :data="an"></author>
<view v-if="detailData.isResolve" style="margin-left: auto"><text v-if="an.isBest" style="color:#FFB30F;">最佳答案</text></view>
<view v-if="userInfo.aid==an.sysCreateAid" style="display: flex;"><u-icon @click="openBtns(an,anidx)" name="more-dot-fill" color="#979797" size="20"></u-icon></view>
<!-- <author-info :name="an.sysCreateBy" :avatar="an.avatar" :info="an.orgInfo" :showInfo="true"></author-info> -->
</view>
<view v-if="!detailData.isResolve && userInfo.aid==detailData.sysCreateAid">
<!-- <u-button v-if="!detailData.isResolve" text="设为最佳" @click="setBest(an)" type="warning" size="small"></u-button> -->
<view class="comment-time">
<view style="display: flex;">
<view v-if="detailData.isResolve">
<text v-if="an.isBest" style="color:#FFB30F;">最佳答案</text>
</view>
<view style="margin-left: 10px"><time-show :time="an.sysCreateTime"></time-show></view>
</view>
</view>
</view>
<view style="padding: 20upx 0upx 10upx 50upx;color: #4e4e4e;word-break: break-all;white-space: pre-wrap;">
{{ displayAll(an) }}
<text style="color: #00aaff; " v-if="an.content.length>minTextLen" @click="changeIsAll(an)">{{an.isAll?' 收起':' 全文'}}</text>
</view>
<view style="display: flex;justify-content: space-between;color: rgb(153, 153, 153);padding-left: 50upx;">
<time-show :time="an.sysCreateTime"></time-show>
<!-- <view style="padding-left: 50upx;padding-top: 20upx;color: #878787;font-size: 0.9em;">{{ an.sysCreateTime }}</view> -->
<view>
<!-- <view class="interact-bar-icon" v-if="isPraise"><image style="width:40upx;height: 40upx;" src="/static/images/icon/artice-praise-active.png" alt="" ></view> -->
<image @click="openReply(an,{})" style="width:30upx;height: 30upx;margin-right: 40upx;" src="/static/images/icon/comment.png" alt=""/>
<image v-if="an.isPraise" @click="removePraise(anidx)" style="width:30upx;height: 30upx;" src="/static/images/icon/artice-praise-active.png" alt=""/>
<image v-else @click="addPraise(anidx)" style="width:30upx;height: 30upx;" src="/static/images/icon/artice-praise.png" alt=""/>
<!-- <view class="interact-bar-txt">0</view> -->
<text style="margin-left: 8upx">{{an.praises}}</text>
<view class="comment-body" style="word-break: break-all;white-space: pre-wrap;">
<view class="comment-content">
{{ displayAll(an) }}
<text style="color: #00aaff;word-break: normal; " v-if="an.content.length>minTextLen" @click="changeIsAll(an)">{{an.isAll?' 收起':' 全文'}}</text>
</view>
</view>
<view class="twoLevelReply" v-if="an.answers && an.answers.length!=0">
<view v-for="(ele, replyIndex) in an.answers" :key="replyIndex" class="comments-item" style="border-bottom: 1px solid #e9e9e9; ">
<view style="display: flex;justify-content: space-between;align-items: center;">
<view class="one-wrap">
<view class="comment-btns">
<view style="display: flex;">
<u-icon style="margin-right: 15px;" @click="openReply(an,{})" name="chat" color="#979797" size="18" label="回复"></u-icon>
<u-icon v-if="an.isPraise" style="margin-right: 10px;" @click="removePraise(anidx)" name="thumb-up-fill" color="#979797" size="18" :label="an.praises"></u-icon>
<u-icon v-if="!an.isPraise" style="margin-right: 10px;" @click="addPraise(anidx)" name="thumb-up" color="#979797" size="18" :label="an.praises"></u-icon>
</view>
<view>
<u-icon v-if="userInfo.aid==an.sysCreateAid" @click="openBtns(an,anidx)" name="more-dot-fill" size="20"></u-icon>
</view>
</view>
<!--一级评论二级数据-->
<view v-if="an.answers && an.answers.length!=0" class="comment-replys">
<view v-for="(ele, replyIndex) in an.answers" :key="replyIndex" class="comment">
<view class="comment-top">
<view style="display: flex;">
<author v-if="ele" :showInfo="true" :data="ele"></author>
<text style="padding-left: 16upx;padding-top: 6upx;color: #979797;">评论</text>
<text style="padding-left: 16upx;padding-top: 6upx;color: #979797;">回复</text>
<text style="padding-left: 16upx;padding-top: 6upx;font-size: 26upx;">{{ele.replayName}}</text>
</view>
<view v-if="userInfo.aid==ele.sysCreateAid" style="display: flex;"><u-icon @click="openBtns(ele,replyIndex)" name="more-dot-fill" color="#979797" size="20"></u-icon></view>
<!-- <author-info :name="an.sysCreateBy" :avatar="an.avatar" :info="an.orgInfo" :showInfo="true"></author-info> -->
</view>
<!-- <view v-if="detailData.isResolve"><text v-if="an.isBest" style="color:#FFB30F;">最佳答案</text></view> -->
<!-- <view v-if="!detailData.isResolve && userInfo.aid==detailData.sysCreateAid">
<u-button v-if="!detailData.isResolve" text="设为最佳" @click="setBest(an)" type="warning" size="small"></u-button>
</view> -->
</view>
<view style="padding: 20upx 0upx 10upx 50upx;color: #4e4e4e;word-break: break-all;white-space: pre-wrap;">
{{ displayAll(ele) }}
<text style="color: #00aaff; white-space: nowrap;" v-if="ele.content.length>minTextLen" @click="changeIsAll(ele)">{{ele.isAll?' 收起':' 全文'}}</text>
</view>
<view style="display: flex;justify-content: space-between;color: rgb(153, 153, 153);padding-left: 50upx;">
<time-show :time="an.sysCreateTime"></time-show>
<!-- <view style="padding-left: 50upx;padding-top: 20upx;color: #878787;font-size: 0.9em;">{{ an.sysCreateTime }}</view> -->
<view>
<!-- <view class="interact-bar-icon" v-if="isPraise"><image style="width:40upx;height: 40upx;" src="/static/images/icon/artice-praise-active.png" alt="" ></view> -->
<image @click="openReply(ele,an)" style="width:30upx;height: 30upx;margin-right: 40upx;" src="/static/images/icon/comment.png" alt=""/>
<!-- <image v-if="an.isPraise" style="width:30upx;height: 30upx;" src="/static/images/icon/artice-praise-active.png" alt=""/>
<image v-else style="width:30upx;height: 30upx;" src="/static/images/icon/artice-praise.png" alt=""/> -->
<!-- <view class="interact-bar-txt">0</view> -->
<!-- <text style="margin-left: 8upx">{{an.praises}}</text> -->
</view>
</view>
<!--评论的二级显示-->
<view class="twoLevelReply" v-if="ele.answers && ele.answers.length!=0">
<view v-for="(row, rowIdx) in ele.answers" :key="rowIdx" class="comments-item">
<view style="display: flex;justify-content: space-between;align-items: center;">
<view class="one-wrap">
<view style="display: flex;">
<author v-if="row" :showInfo="true" :data="row"></author>
<text style="padding-left: 16upx;padding-top: 6upx;color: #979797;">评论</text>
<text style="padding-left: 16upx;padding-top: 6upx;font-size: 26upx;">{{row.replayName}}</text>
</view>
<view v-if="userInfo.aid==row.sysCreateAid" style="display: flex;"><u-icon @click="openBtns(row,rowIdx)" name="more-dot-fill" color="#979797" size="20"></u-icon></view>
</view>
<view class="comment-time">
<time-show :time="ele.sysCreateTime"></time-show>
</view>
<view style="padding: 20upx 0upx 10upx 50upx;color: #4e4e4e;word-break: break-all;white-space: pre-wrap;">
{{ displayAll(row) }}
<text style="color: #00aaff; white-space: nowrap;" v-if="row.content.length>minTextLen" @click="changeIsAll(row)">{{row.isAll?' 收起':' 全文'}}</text>
</view>
<view class="comment-body">
<view class="comment-content" style="word-break: break-all;white-space: pre-wrap;">
{{ displayAll(ele) }}
<text style="color: #00aaff; white-space: nowrap;" v-if="ele.content.length>minTextLen" @click="changeIsAll(ele)">{{ele.isAll?' 收起':' 全文'}}</text>
</view>
<view style="display: flex;justify-content: space-between;color: rgb(153, 153, 153);padding-left: 50upx;">
<time-show :time="an.sysCreateTime"></time-show>
<view class="comment-btns">
<view>
<image @click="openReply(row,ele)" style="width:30upx;height: 30upx;margin-right: 40upx;" src="/static/images/icon/comment.png" alt=""/>
<u-icon @click="openReply(ele,an)" name="chat" color="#979797" size="18" label="回复"></u-icon>
</view>
<view>
<u-icon v-if="userInfo.aid==ele.sysCreateAid" @click="openBtns(ele,replyIndex)" name="more-dot-fill" size="20"></u-icon>
</view>
</view>
<!--评论的二级显示-->
<view v-if="ele.answers && ele.answers.length!=0" class="comment-replys">
<view v-for="(row, rowIdx) in ele.answers" :key="rowIdx" class="comment">
<view class="comment-top">
<view style="display: flex;">
<author v-if="row" :showInfo="true" :data="row"></author>
<text style="padding-left: 16upx;padding-top: 6upx;color: #979797;">回复</text>
<text style="padding-left: 16upx;padding-top: 6upx;font-size: 26upx;">{{row.replayName}}</text>
</view>
<view class="comment-time">
<time-show :time="row.sysCreateTime"></time-show>
</view>
</view>
<view class="comment-body">
<view class="comment-content" style="word-break: break-all;white-space: pre-wrap;">
{{ displayAll(row) }}
<text style="color: #00aaff; white-space: nowrap;" v-if="row.content.length>minTextLen" @click="changeIsAll(row)">{{row.isAll?' 收起':' 全文'}}</text>
</view>
<view class="comment-btns">
<view>
<u-icon @click="openReply(row,ele)" name="chat" color="#979797" size="18" label="回复"></u-icon>
</view>
<view>
<u-icon v-if="userInfo.aid==row.sysCreateAid" @click="openBtns(row,rowIdx)" name="more-dot-fill" size="20"></u-icon>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
@@ -143,11 +142,13 @@
<view>
<view style="display: flex;justify-content: space-around;">
<view style="padding: 20rpx;flex: 1; white-space: pre-wrap; word-break: break-all;">
<u--textarea :height="120" v-model="answercontent" placeholder="请写下您的答案(200字以内),可以@提问者哦~" count maxlength="200"></u--textarea>
<u--textarea :height="120" v-model="answercontent" :placeholder="placeholder" count maxlength="200"></u--textarea>
</view>
<view style="padding: 20px 10px">
<view style="line-height: 82upx;text-align: center;margin-bottom: 20upx" @click="askQuestioner">@</view>
<u-button style="height: 60px;" @click="submitReply" type="primary" size="small" text="提交回答"></u-button>
<view style="line-height: 82upx;text-align: center;margin-bottom: 20upx" @click="askQuestioner">
<text v-if="replyLevel=='one'">@</text>
</view>
<u-button style="height: 60px;" @click="submitReply" type="primary" size="small" :text="replyLevel=='one'? '提交回答':'提交回复'"></u-button>
</view>
</view>
</view>
@@ -165,9 +166,9 @@
<!--编辑处理-->
<u-popup :show="btnsShow" @close="closeBtns">
<view>
<view class="big-button" v-if="!detailData.isResolve" @click="setBest()">设置为最佳答案</view>
<view @click="editAnswer()" class="big-button">编辑</view>
<view @click="delAnswer()" class="big-button" style="color: #db0000;">删除</view>
<view class="big-button" v-if="userInfo.aid==detailData.sysCreateAid && !detailData.isResolve && curItem.id && curItem.clevel==1" @click="setBest()">设置为最佳答案</view>
<view @click="editAnswer()" v-if="userInfo.aid==curItem.sysCreateAid && curItem.id && curItem.clevel==1" class="big-button">编辑</view>
<view @click="delAnswer()" v-if="userInfo.aid==curItem.sysCreateAid" class="big-button" style="color: #db0000;">删除</view>
<view @click="closeBtns()" class="big-button">取消</view>
</view>
</u-popup>
@@ -218,7 +219,18 @@ export default {
this.getData(this.questionId);
},
computed: {
...mapGetters(['userInfo'])
...mapGetters(['userInfo']),
placeholder(){
let txt='请写下您的答案(200字以内),可以@提问者哦~';
console.log(this.curItem.clevel,'this.curItem.clevel');
if(this.curItem && this.curItem.id){
//if(this.curItem.clevel>1){
txt='请写下您的回复(200字以内)';
//}
}
return txt;
}
},
onReachBottom(){
this.loadStatus='loading';
@@ -560,6 +572,7 @@ export default {
this.curParentId=item.id;//回复的parentId
this.curParent=parent;//回复的上级数据用于追加answers
this.curItem=item;
},
closeReply() {
this.answercontent='';
@@ -576,6 +589,7 @@ export default {
this.publishAnswer();
return;
}
let answercontent=''
if (this.answercontent.length < 1 ||this.answercontent.trim()=='@'+this.curItem.sysCreateBy) {
return uni.showToast({icon: 'none',title:"请输入回答"});
@@ -602,9 +616,11 @@ export default {
res.result.sex = null;
res.result.isAll = false;
this.curParentId='';
this.curParent={};
this.answercontent='';
this.loadUserInfos([res.result],[res.result.sysCreateAid]);
//console.log(this.curItem,'this.curItem');
//console.log(this.curParent,'this.curParent');
//if(this.curItem.id)
if(this.curItem.clevel<3){
if(!this.curItem.answers){
this.curItem.answers=[];
@@ -615,6 +631,9 @@ export default {
}
uni.showToast({icon: 'none',title:"回复成功"});
this.replyShow = false;
}else{
uni.showToast({icon: 'none',title:"回复失败"});
this.replyShow = false;
}
})
@@ -639,19 +658,17 @@ export default {
title:'',
}
apiPraises.save(postData).then(res=>{
this.loading=false;
if(res.status==200){
// if(res.result){
this.answerList[index].praises++;
if(res.status==200){
this.answerList[index].isPraise=true;
this.answerList[index].praises++;
this.$refs.interactToast.show({message:'点赞成功',type:'success'});
console.log(this.answerList[index],'content)')
//console.log(this.answerList[index],'content)')
this.messageSave(this.answerList[index].id,this.answerList[index].content,this.userInfo.name,this.answerList[index].sysCreateBy,this.answerList[index].sysCreateAid,'点赞了我的');
// }
}else{
this.$refs.interactToast.show({message:'点赞失败',type:'error'});
}
}else{
this.$refs.interactToast.show({message:'点赞失败',type:'error'});
}
this.loading=false;
})
},
removePraise(index){
@@ -660,17 +677,16 @@ export default {
}
this.loading=true;
apiPraises.remove(5,this.answerList[index].id).then(res=>{
if(res.status==200){
this.answerList[index].isPraise=false
if(this.answerList[index].praises>0){
this.answerList[index].praises--;
}
this.$refs.interactToast.show({message:'取消点赞成功',type:'success'});
}else{
this.$refs.interactToast.show({message:'取消点赞失败',type:'error'});
}
this.loading=false;
if(res.status==200){
// if(res.result){
this.answerList[index].praises--;
this.answerList[index].isPraise=false
this.$refs.interactToast.show({message:'取消点赞成功',type:'success'});
// }
// this.messageSave(this.answerList[index].id,this.answerList[index].title,this.userInfo.name,this.answerList[index].sysCreateBy,this.answerList[index].sysCreateAid,'点赞了我的');
}else{
this.$refs.interactToast.show({message:'取消点赞失败',type:'error'});
}
})
}
}
@@ -774,6 +790,38 @@ export default {
}
}
}
.comment{
padding-top: 20upx;
.comment-top{
display: flex;
justify-content: space-between;
line-height: 50upx;
.comment-avatar{
height: 50upx;
width: 50upx;
border-radius: 10%;
border: 1px solid #f3f3f3;
}
.comment-time{
color: #696969;font-size: 0.9em;
}
}
.comment-body{
padding: 6upx 0upx 0upx 60upx;
color: #373737;
.comment-content{
word-break:break-all;
padding: 0upx 10upx 10upx 0upx;
font-size: 28upx;
color: #333333;
}
.comment-btns{
display: flex;
justify-content: space-between;
padding-top: 10upx;
}
}
}
.big-button {
text-align: center;
line-height: 80upx;

View File

@@ -538,7 +538,8 @@
if(rs.status==200){
//let userIds=[];
//let userIds=[];
let courseIds=[];
rs.result.list.forEach(item=>{
item.name = this.$keywordActiveShow(item.name,this.course.params.keyword);
item.authorInfo={avatar:'',code:'',name:'',sex: null
@@ -668,7 +669,7 @@
//查询问答
let $this=this;
apiQa.pageList(this.qa.params).then(rs=>{
setTimeout(function(){ uni.hideLoading();},100);
setTimeout(function(){ uni.hideLoading();},100);
if(rs.status==200){
let userIds=[];
rs.result.list.forEach(item=>{
@@ -704,6 +705,7 @@
list.forEach(item=>{
res.result.some(author=>{
if(author.aid==item.sysCreateAid){
item.authorInfo={
avatar:author.avatar,
code:author.code,
name:author.name,

View File

@@ -11,11 +11,11 @@
<!-- 学习任务 -->
<view class="listbox" v-show="tabIndex===0">
<view class="listbox-top">
<view class="top-ten">
<!-- <u-picker v-model="loadstatus" :show="loadstatusSelecShow" @cancel="loadstatusSelecShow = false"
<view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
<!-- <u-picker v-model="loadstatus" :show="loadstatusSelecShow" @cancel="loadstatusSelecShow = false"
@confirm="loadchooseStatust" :columns="statustList" keyName="name"></u-picker> -->
<!-- <text class="textbtn" @click="loadstatusSelecShow = !loadstatusSelecShow">状态</text> -->
<text class="textbtn" @click="loadstatusSelecShow=!loadstatusSelecShow">状态</text>
<!-- <text class="textbtn" @click="loadstatusSelecShow = !loadstatusSelecShow">状态</text> -->
<text class="textbtn" @click="loadstatusSelecShow=!loadstatusSelecShow">状态</text>
</view>
<view class="searchView">
<u-search :clearabled="true" @search="loadBoeData(true)" @clear="loadBoeData(true)"
@@ -24,12 +24,14 @@
</view>
</view>
<view class="sea-show" v-show="loadstatusSelecShow">
<text v-for="(item,index) in statustList" :key="index" :class="[item.value === boeStatus?'sea-active':'','sea-index' ]" @click="loadchooseStatust(item.value)">{{item.name}}</text>
<text v-for="(item,index) in statustList" :key="index"
:class="[item.value === boeStatus?'sea-active':'','sea-index' ]"
@click="loadchooseStatust(item.value)">{{item.name}}</text>
</view>
<!-- <view class="sea-show" v-show="loadstatusSelecShow">
<!-- <view class="sea-show" v-show="loadstatusSelecShow">
<text v-for="(item,index) in statustList" :class="[item.value == boeStatus?'sea-active':'','sea-index' ]" @click="loadchooseStatust(item.value)">{{item.name}}</text>
</view> -->
<view class="course content" v-for="(task,idx) in couresList" :key="idx" @click="loaddetail(task)">
<view class="course content" v-for="(task,idx) in couresList" :key="idx" @click="loaddetail(task)">
<view class="course-info">
<!-- <view class="course-title two-line-ellipsis" style="margin-bottom: 20upx;"><text
style="font-size: 32upx;color: #343434; font-weight: bold;" v-html="task.cmtask_name"></text></view> -->
@@ -76,11 +78,13 @@
<text class="textbtn" @click="statusSelectShow = true">{{statusBtnName}}</text>
</view> -->
<!-- 自主学习类型查询 -->
<view class="top-ten" style="margin-right: 20upx;">
<!-- <u-picker v-model="statust" :show="statusSelecShow" @cancel="statusSelecShow = false"
<view class="top-ten" style="margin-top: 21px;margin-left: 13px;">
<!-- <u-picker v-model="statust" :show="statusSelecShow" @cancel="statusSelecShow = false"
@confirm="chooseStatust" :columns="typeArray" keyName="name"></u-picker>
<text class="textbtn" @click="statusSelecShow = true">{{statusBtns}}</text> -->
<text class="textbtn" @click="statusSelecShow=!statusSelecShow">类型</text>
<text class="textbtn" @click="statusSelecShow=!statusSelecShow;autonomyStatusShow=false">类型</text>
<text class="textbtn" style="margin:0 20upx;"
@click="autonomyStatusShow=!autonomyStatusShow;statusSelecShow=false">进度</text>
</view>
<view class="searchView" style="margin-left: 0;">
<u-search :clearabled="true" @search="searchData()" @clear="searchData()" placeholder="搜索关键字"
@@ -88,14 +92,16 @@
</view>
</view>
<view class="sea-show" v-show="statusSelecShow">
<text v-for="(item,tidx) in typeArray" :key="tidx" :class="[item.value == classType ?'sea-active':'','sea-index' ]" @click="Application(item.value)">{{item.name}}</text>
<text v-for="(item,tidx) in typeArray" :key="tidx"
:class="[item.value == classType ?'sea-active':'','sea-index' ]"
@click="Application(item.value)">{{item.name}}</text>
</view>
<view class="sea-show" v-show="autonomyStatusShow">
<text :class="[autonomy.status == 0?'sea-active':'','sea-index']" @click="autonomyStatus(0)">全部</text>
<text :class="[autonomy.status == 1?'sea-active':'','sea-index']" @click="autonomyStatus(1)">未开始</text>
<text :class="[autonomy.status == 2?'sea-active':'','sea-index']" @click="autonomyStatus(2)">进行中</text>
<text :class="[autonomy.status == 9?'sea-active':'','sea-index']" @click="autonomyStatus(9)">已完成</text>
</view>
<!-- <view class="course-info-text">
<text :class="[isSelect === 0?'isSelect':'info-text']" @click="autonomyStatus(0)">全部</text>
<text :class="[isSelect === 1?'isSelect':'info-text']" @click="autonomyStatus(1)">未开始</text>
<text :class="[isSelect === 2?'isSelect':'info-text']" @click="autonomyStatus(2)">进行中</text>
<text :class="[isSelect === 3?'isSelect':'info-text']" @click="autonomyStatus(3)">已完成</text>
</view> -->
<view v-if="studyList.length == 0 && couresList.length == 0 && isOne" class="zan-wu">
您还没有学习课程快去学习吧
</view>
@@ -123,7 +129,7 @@
{{c.teacherName}}
</view>
<!-- <view class="coures-button"> -->
<!-- <text class="toStudyText">
<!-- <text class="toStudyText">
<u-icon v-if="c.progress==100" @click.native.stop="toStudy(c)" :size="16" label="回顾"
:bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00" name="reload">
</u-icon>
@@ -132,28 +138,28 @@
</text> -->
<!-- </view> -->
</view>
<view class="rowbtn" >
<image @click.native.stop="rowbtn(c)" style="width: 100%;height: 100%;" src="../../static/images/icon/more.png" alt="">
<!-- <u-icon @click.native.stop="rowbtn(c)" color="#767676" labelColor="#767676" name="trash" label="删除" size="16" labelSize="12"></u-icon> -->
</view>
<!-- <view style="font-size: 22upx;color: #777980;" v-if="c.addTime">报名时间:{{ c.addTime }}</view> -->
<view class="coures-bottom coures-midd">
<view class="coures-staus">
<text v-html="displayWord(c)"></text>
</view>
<view class="rowbtn">
<image @click.native.stop="rowbtn(c)" style="width: 100%;height: 100%;"
src="../../static/images/icon/more.png" alt="">
</view>
<view class="coures-bottom coures-midd">
<view class="coures-staus">
<text v-html="displayWord(c)"></text>
</view>
<view class="coures-button">
<text class="toStudyText">
<u-icon v-if="c.progress==100" @click.native.stop="toStudy(c)" :size="16" label="回顾"
:bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00" name="reload">
<u-icon v-if="c.progress==100" @click.native.stop="toStudy(c)" :size="16"
label="回顾" :bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00"
name="reload">
</u-icon>
<u-icon v-else @click.native.stop="toStudy(c)" :size="16" label="播放" :bold="true"
:labelSize="11" labelColor="#FF8E00" color="#FF8E00" name="play-right"></u-icon>
<u-icon v-else @click.native.stop="toStudy(c)" :size="16" label="播放"
:bold="true" :labelSize="11" labelColor="#FF8E00" color="#FF8E00"
name="play-right"></u-icon>
</text>
</view>
</view>
</view>
</view>
</view>
</view>
@@ -187,7 +193,8 @@
</view>
<view class="btn-bai"
style="position: absolute;right: 0;color: #2A2C31;font-size: 36upx;font-weight: 600;">
{{ c.progress }}%</view>
{{ c.progress }}%
</view>
</view>
</view>
</view>
@@ -242,8 +249,7 @@
</u-modal>
<u-popup :show="btnsShow" @close="closeBtns">
<view>
<view @click="del()" class="big-button" style="color: #db0000;">删除</view>
<!-- <view @click="copy()" class="big-button">复制</view> -->
<view @click="del()" class="big-button" style="color: #db0000;">删除</view>
<view @click="closeBtns()" class="big-button">取消</view>
</view>
</u-popup>
@@ -305,8 +311,9 @@
},
data() {
return {
delData:{},
btnsShow: false,// 我报名的删除弹出
autonomyStatusShow: false,
delData: {},
btnsShow: false, // 我报名的删除弹出
xuanShow: false,
boeStatus: '',
authorInfo: {},
@@ -355,27 +362,26 @@
statust: '',
status: '',
loadstatus: '',
typeArray: [
typeArray: [{
name: '全部',
value: ''
},
{
name: '全部',
value: ''
},
{
name: '录播课',
value: 'online-course'
},
{
name: '线下课',
value: 'face-course'
},
{
name: '学习项目',
value: 'project'
}
name: '录播课',
value: 'online-course'
},
{
name: '线下课',
value: 'face-course'
},
{
name: '学习项目',
value: 'project'
}
],
statustList: [{
name: '全部',
value: ''
@@ -409,10 +415,10 @@
]
],
windowHeight: 0,
taskPageIndex:1,
taskPageSize:10,
taskHasMore:true,
taskCount:0,
taskPageIndex: 1,
taskPageSize: 10,
taskHasMore: true,
taskCount: 0,
}
},
onShow() {
@@ -425,29 +431,29 @@
},
onLoad() {
this.loadBoeData(true);
this.getLearning();//这里应该是切换时再调用
this.getLearning(); //这里应该是切换时再调用
//检查是否显示弹窗
let curTime=new Date();
curTime=parseInt(curTime.getTime()/1000);
let curTime = new Date();
curTime = parseInt(curTime.getTime() / 1000);
//console.log(curTime,'curTime');
let hasDlgTime=uni.getStorageSync('user_dlg_temp');
if(hasDlgTime){
let lastTime=parseInt(hasDlgTime);
let hasDlgTime = uni.getStorageSync('user_dlg_temp');
if (hasDlgTime) {
let lastTime = parseInt(hasDlgTime);
//console.log(lastTime,'lastTime2');
if(curTime>(lastTime+24*60*60)){
if (curTime > (lastTime + 24 * 60 * 60)) {
this.xuanShow = true;
//console.log('显示');
uni.setStorageSync('user_dlg_temp',curTime);
}else{
uni.setStorageSync('user_dlg_temp', curTime);
} else {
this.xuanShow = false;
this.showOneStady();
}
}else{
} else {
this.xuanShow = true;
uni.setStorageSync('user_dlg_temp',curTime);
uni.setStorageSync('user_dlg_temp', curTime);
}
let $this = this;
uni.getSystemInfo({
success: (res) => {
@@ -470,12 +476,12 @@
onReachBottom() {
this.loadStatus = 'loading'; //more,loading,noMore
let $this = this;
if(this.tabIndex==0){
if(this.taskHasMore){
if (this.tabIndex == 0) {
if (this.taskHasMore) {
this.taskPageSize++;
this.loadBoeData(false);
}
}
setTimeout(function() {
$this.loadStatus = 'noMore';
@@ -484,43 +490,63 @@
methods: {
rowbtn(row) {
this.delData = row;
console.log(row,'row',this.delData);
this.btnsShow = true;
},
del(){
// const $this=this
// uni.showModal({
// title: '提示',
// content: '您确定要删除此提问吗?',
// success: function (res) {
// if (res.confirm) {
apicourseStudy.deleteSignUp(this.delData.id,this.delData.courseId).then(res=>{
this.btnsShow = false;
if(res.status=200){
this.$refs.articleToast.show({message:'删除成功',type:'success'});
this.studyList.forEach((item,index)=>{
if(item.id===this.delData.id) {
this.studyList.splice(index,1);
}
})
// setTimeout(()=>{
// $this.loadBoeData(true);
// $this.getLearning(true);
// },1000)
// this.getLearning();
}else{
this.$refs.articleToast.show({message:'删除失败,请稍后再试',type:'error'});
del() {
if (this.delData.isOld) {
apiBoeCourse.delLearning(this.delData.kid).then(res => {
if (res.status == 200) {
this.$message({
type: 'success',
message: '删除成功!'
});
this.studyList.forEach((item, index) => {
if (item.id === this.delData.id) {
this.studyList.splice(index, 1);
}
})
// } else if (res.cancel) {
// }
// }
// });
this.studyData.forEach((it, i) => {
if (this.delData.id == it.id) {
this.studyData.splice(i, 1);
}
})
} else {
this.$message({
type: 'error',
message: res.message
});
}
});
} else {
apicourseStudy.deleteSignUp(this.delData.id, this.delData.courseId).then(res => {
this.btnsShow = false;
if (res.status = 200) {
this.$refs.articleToast.show({
message: '删除成功',
type: 'success'
});
this.studyList.forEach((item, index) => {
if (item.id === this.delData.id) {
this.studyList.splice(index, 1);
}
})
this.studyData.forEach((it, i) => {
if (this.delData.id == it.id) {
this.studyData.splice(i, 1);
}
})
} else {
this.$refs.articleToast.show({
message: '删除失败,请稍后再试',
type: 'error'
});
}
})
}
},
showOneStady(){
showOneStady() {
if (this.isOneStady === 0) {
this.getLastStudy();
}
@@ -563,37 +589,35 @@
})
},
autonomyStatus(num) {
this.isSelect = num;
// this.isSelect = num;
this.autonomy.status = num;
this.searchData();
},
closeBtns(){
this.btnsShow=false;
closeBtns() {
this.btnsShow = false;
},
searchData() {
// this.page.pageIndex = 1;
// this.isListOne = true;
let list = this.studyList;
// this.couresList = this.dataList;
if (this.isSelect == 0) {
this.autonomy.status = '';
} else {
this.autonomy.status = this.isSelect;
let list = this.studyData;
let type;
let wei;
if (this.autonomy.type == 'online-course') {
type = 20;
wei = 10;
}
if (this.autonomy.type == 0) {
this.autonomy.type = '';
}
if (this.autonomy.type === '' && this.autonomy.status === '' && this.autonomy.keyword === '') {
if (this.autonomy.type === 0 && this.autonomy.status === 0 && this.autonomy.keyword === '') {
this.studyList = this.studyData;
return;
}
if (this.autonomy.type !== '') {
list = list.filter(item => {
if (item.courseType === this.autonomy.type) {
if (item.courseType === this.autonomy.type || type === 20 || wei === 10) {
return item;
}
});
}
if (this.autonomy.status !== '') {
if (this.autonomy.status !== 0) {
list = list.filter(item => {
if (item.status == this.autonomy.status) {
return item;
@@ -617,8 +641,8 @@
},
loadBoeData(flag) {
if(flag){
this.taskPageIndex=1; //回到首页
if (flag) {
this.taskPageIndex = 1; //回到首页
}
let params = {
page: this.taskPageIndex,
@@ -637,11 +661,11 @@
// item.created_at = this.formatDate(item.created_at*1000);
});
this.couresList = res.result.list;
this.taskCount=res.result.count;
if(this.taskCount>this.taskPageIndex*this.taskPageSize){
this.taskHasMore=true;
}else{
this.taskHasMore=false;
this.taskCount = res.result.count;
if (this.taskCount > this.taskPageIndex * this.taskPageSize) {
this.taskHasMore = true;
} else {
this.taskHasMore = false;
}
if (this.isOne) {
this.value = res.result.count;
@@ -691,35 +715,37 @@
}
})
},
loadCouserTeacher(list,ids){ //临时解决方案,单独的查询课程教师
let that = this;
//先查课程关联教师iD
apiCoursePortal.getTeacherByCourseIDs(ids).then(cres => {
if(cres.status==200){
let userIds = [];
list.forEach((item,index)=>{
cres.result.some(courseTeahcer=>{
if(courseTeahcer.courseId==item.courseId){
if(courseTeahcer.teacherIds){
// userIds.push(courseTeahcer.teacherIds[0]);
// item.authorInfo.aid=courseTeahcer.teacherIds[0];
item.teacherName = courseTeahcer.names[0];
}
return true;
}else{
return false;
}
})
});
// that.loadCourseAuthorInfo(list,userIds);
}
})
loadCouserTeacher(list, ids) { //临时解决方案,单独的查询课程教师
let that = this;
//先查课程关联教师iD
apiCoursePortal.getTeacherByCourseIDs(ids).then(cres => {
if (cres.status == 200) {
let userIds = [];
list.forEach((item, index) => {
cres.result.some(courseTeahcer => {
if (courseTeahcer.courseId == item.courseId) {
if (courseTeahcer.teacherIds) {
// userIds.push(courseTeahcer.teacherIds[0]);
// item.authorInfo.aid=courseTeahcer.teacherIds[0];
item.teacherName = courseTeahcer.names[0];
}
return true;
} else {
return false;
}
})
});
// that.loadCourseAuthorInfo(list,userIds);
}
})
},
async getLearning() {
uni.showLoading({ title: '加载中...' });
uni.showLoading({
title: '加载中...'
});
this.loadStatus = 'loading';
// let classType = null;
let data = [];
let lear = {
pageIndex: 1, //第几页
@@ -728,23 +754,23 @@
// courseType: classType,
status: this.status,
}
if(this.classType == 'online-course' || this.classType == '') {
await apicourseStudy.myStudyList(lear).then(res => {
if (res.status == 200) {
// 我报名的接口
//console.log(res)
let courseIds=[];
res.result.list.forEach(item => {
item.teachersName='';
item.addTime = item.addTime.split(' ')[0];
courseIds.push(item.courseId);
})
//console.log(courseIds,'courseIds')
this.loadCouserTeacher(res.result.list,courseIds);
data.push(...res.result.list);
}
})
}
// if(this.classType == 'online-course' || this.classType == '') {
await apicourseStudy.myStudyList(lear).then(res => {
if (res.status == 200) {
// 我报名的接口
//console.log(res)
let courseIds = [];
res.result.list.forEach(item => {
item.teachersName = '';
item.addTime = item.addTime.split(' ')[0];
courseIds.push(item.courseId);
})
//console.log(courseIds,'courseIds')
this.loadCouserTeacher(res.result.list, courseIds);
data.push(...res.result.list);
}
})
// }
let learData = {
page: 1,
size: 200,
@@ -765,16 +791,25 @@
filterConversion(data) {
let list = [];
data.forEach((item, index) => {
let status = null;
if (item.status == '0') {
status = 1;
} else if (item.status == '1') {
status = 2;
} else if (item.status == '2') {
status = 9;
}
let num = item.completeProgress.replace('%', "");
item.completeProgress = Number(num);
list.push({
courseImage: item.cover[0].url,
courseName: item.title,
teachersName:'',
teachersName: '',
courseType: item.type,
id: item.id,
isOld: true,
progress: item.completeProgress,
status: item.status,
status: status,
})
})
return list;
@@ -849,12 +884,13 @@
this.boeStatus = e;
this.loadBoeData()
},
Application(e){
Application(e) {
this.classType = e;
// this.searchData();
this.getLearning();
this.autonomy.type = e;
this.searchData();
// this.getLearning();
},
displayWord(data) {
if (data.progress == 0) {
return '未开始'
@@ -877,8 +913,8 @@
font-size: 24upx;
color: #777980;
// position: relative;
// /deep/ .toStudyText{
// font-size: 8px;
// background: #EEEEEE;
@@ -892,35 +928,41 @@
// }
// }
}
.big-button{
.big-button {
text-align: center;
line-height: 80upx;
border-top: 1px solid #ebebeb;
}
.coures-midd{
.coures-midd {
position: relative;
display: flex;
.course-author {
// color: #777980;
font-size: 28upx;
flex: 1;
}
.coures-button{
.coures-button {
flex: 1;
.toStudyText {
position: absolute;
right: 0;
bottom:0;
bottom: 0;
// top: 28px;
padding: 6px 14px;
background-color: #EEEEEE;
border-radius: 40px;
}
}
.course-titles {
font-weight: bold;
font-size: 32upx;
color: #343434;
@@ -937,6 +979,7 @@
// box-sizing: border-box;
}
}
.xuan {
width: 325px;
margin: 0px auto;
@@ -969,7 +1012,7 @@
}
.sea-show {
padding: 20upx 30upx;
padding: 20upx 30upx 10upx 30upx;
.sea-active {
border: 1rpx solid #679cfc !important;
@@ -1091,16 +1134,18 @@
.box-title {
margin-left: 20upx;
.title-name{
.title-name {
overflow: hidden;
word-break:break-all;
word-break: break-all;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
}
uni-text {
color: #343434;
font-size: 32upx;
@@ -1157,7 +1202,7 @@
}
.one-line-ellipsis {
word-break:break-all;
word-break: break-all;
display: -webkit-box;
// white-space:pre-wrap;
overflow: hidden;
@@ -1227,11 +1272,11 @@
.top-ten {
// width: 120upx;
// height: 62upx;
margin-top: 26upx;
margin-top: 20upx;
margin-left: 24upx;
// background-color: #fff;
text-align: center;
line-height: 62upx;
// line-height: 62upx;
}
.searchView {
@@ -1285,32 +1330,34 @@
}
.content {
padding: 20upx 30upx;
margin-bottom: 10px;
margin-top: 10px;
border-radius: 7upx;
}
.rowbtn{
width: 20px;
height: 20px;
.rowbtn {
width: 30upx;
height: 30upx;
position: absolute;
top:0;
right: 0;
top: 0;
right:-10upx;
// margin-top: 10upx;
// margin-right: 25rpx;
}
.coures-bottom{
display: flex;
}
.coures-bottom {
display: flex;
}
.course {
// padding: 40upx 30upx;
.course-title {
font-weight: bold;
@@ -1321,13 +1368,13 @@
}
}
.course-info {
// display: flex;
// justify-content: space-between;
/deep/ .course-info-left {
display: flex;
@@ -1417,9 +1464,9 @@
.textbtn {
background-color: #ffffff;
padding: 8px 10px;
color: #4f4f4f;
padding: 16upx 20upx;
color: #666;
border-radius: 8upx;
font-size: 24upx;
font-size: 28upx;
}
</style>

View File

@@ -173,7 +173,7 @@
<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" @scrolltoupper="scrollLeft" @scrolltolower="scrollRight" @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)">
<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}}
@@ -245,7 +245,7 @@
</view>
</view>
<view >
<view v-for="(con,conIdx) in cata.children" :key="conIdx" class="catalog-con" @click="playContent(cata.section,con)">
<view v-for="(con,conIdx) in cata.children" :key="conIdx" class="catalog-con" @click="playContent(cata.section,con,conIdx,catIdx)">
<view class="catalog-con-name" :class="{'studying':curContent.id==con.id}">
<!-- <text>{{catIdx+1}}.{{conIdx+1}}, </text> -->
<!-- <text class="square-border">{{getConType(con.contentType)}}</text> -->
@@ -1020,7 +1020,28 @@
summaryCatalog() {
this.summarylogShow=false;
},
playContent(cata,con){
playContent(cata,con,conIndex,catIndex){
if(conIndex!=undefined && catIndex!=undefined) {
if(this.courseInfo.orderStudy) {
let hasIndex=-1;
this.scrollList.some((one,idx)=>{
if(one.id==con.id){
hasIndex=idx;
return true;
}
return false;
})
if(hasIndex>0){
let pre=this.scrollList[hasIndex-1];
if(pre.status!=9){
this.$refs.messager.show({message:'请按顺序学习',type:'error'});
return;
}
}
}
}
// console.log(con,'con');
if(this.videoPlayer){
//console.log('切换视频');
@@ -1037,7 +1058,7 @@
con.content=cfrs.result.previewFilePath;
//console.log(r.content);
}else{
$this.$message.error('加载pdf课件文件失败');
$this.$refs.messager.show({message:'加载pdf课件文件失败',type:'error'});
}
});
}
@@ -1242,13 +1263,11 @@
// line-height: 60rpx;
background-color: #f4f5f7;
.scroll-item-name{
width: 100%;
height: 76rpx;
// white-space: pre-wrap;
// word-break:break-all;
// line-height: 60rpx;
word-break:break-all;
line-height: 40rpx;
overflow: hidden;
white-space: pre-wrap;
text-overflow: ellipsis;

BIN
static/images/uploading.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB