|
@@ -97,19 +97,26 @@
|
|
|
<view style="width: 73%;height: 88rpx;margin-bottom: 15rpx;margin-left: 10% ;">
|
|
|
<u-input height="78" fixed="true" placeholder="您可以在这里输入答疑内容" type="textarea" :custom-style="inputStyle" v-model="value" />
|
|
|
</view>
|
|
|
- <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;">提交</view>
|
|
|
+ <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postContent">提交</view>
|
|
|
</view>
|
|
|
- <view v-for="(item, index) in menuList" style="background-color: #FFFFFF;">
|
|
|
+ <view v-for="(item, index) in answerList" style="background-color: #FFFFFF;">
|
|
|
<view class="chat_box">
|
|
|
- <view><image src="https://file-dev.xyyxt.net/oss/images/avatar/20210623/1624414559368_44562477.png" style="width: 64rpx;height: 64rpx;"></image></view>
|
|
|
- <view style="margin-left: 15rpx;">
|
|
|
- <view class="chat1">倪虹洁</view>
|
|
|
- <view class="chat2">2021/10/31 09:36:23</view>
|
|
|
- <view class="chat3">老师的课讲得太棒了!</view>
|
|
|
+ <view style="display: flex;">
|
|
|
+ <view><image :src="$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
|
|
|
+ <view style="margin-left: 15rpx;">
|
|
|
+ <view class="chat1">{{item.realname}}</view>
|
|
|
+ <view class="chat2">{{$method.timestampToTime(item.createTime)}}</view>
|
|
|
+ <view class="chat3">{{item.answerText}}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class="btnReply" @click="replyContent(item)" v-if="item.userId!=userInfo.userId">回复</view>
|
|
|
+ <view v-else class="btnDel" @click="delContent(item)">删除</view>
|
|
|
</view>
|
|
|
<u-line color="#D6D6DB" />
|
|
|
</view>
|
|
|
+ <view v-if="answerList.length==0" style="text-align: center;">
|
|
|
+ 暂无记录
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 播放前拍照start -->
|
|
@@ -203,9 +210,8 @@ export default {
|
|
|
gradeId:0,
|
|
|
chapterId:0,
|
|
|
moduleId:0,
|
|
|
- reMenuList: [
|
|
|
- ],
|
|
|
-
|
|
|
+ reMenuList: [],
|
|
|
+ answerList: []
|
|
|
};
|
|
|
},
|
|
|
onUnload() {},
|
|
@@ -215,6 +221,7 @@ export default {
|
|
|
this.goodsId = uni.getStorageSync('courseGoodsId');
|
|
|
this.courseDetail();
|
|
|
this.getGoodsDetail()
|
|
|
+ this.getAnswerList()
|
|
|
|
|
|
},
|
|
|
onShow() {},
|
|
@@ -252,6 +259,28 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ replyContent(item){
|
|
|
+
|
|
|
+ },
|
|
|
+ delContent(item){
|
|
|
+
|
|
|
+ },
|
|
|
+ postAnswer() {
|
|
|
+ let self = this;
|
|
|
+ this.$api.postAnswer({ courseId: this.courseId,answerText:this.value }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$u.toast('发布成功');
|
|
|
+ self.getAnswerList()
|
|
|
+ self.value = ''
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ postContent(){
|
|
|
+ if(!this.value){
|
|
|
+ this.$u.toast('请输入内容');
|
|
|
+ }
|
|
|
+ this.postAnswer()
|
|
|
+ },
|
|
|
postStudyRecord(status=0) {
|
|
|
let self = this;
|
|
|
let data = {
|
|
@@ -473,9 +502,17 @@ export default {
|
|
|
startVideo() {
|
|
|
this.startStatus = true;
|
|
|
},
|
|
|
+ getAnswerList() {
|
|
|
+ let self = this;
|
|
|
+ this.$api.answerList({ courseId: this.courseId }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ self.answerList = res.data.rows;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getReMenuList() {
|
|
|
let self = this;
|
|
|
- this.$api.menuList({ courseId: this.courseId,rebuild:1,gradeId:this.gradeId }).then(res => {
|
|
|
+ this.$api.reMenuList({ courseId: this.courseId,rebuild:1,gradeId:this.gradeId }).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
for (let i = 0; i < res.data.rows.length; i++) {
|
|
|
let item = res.data.rows[i];
|
|
@@ -521,6 +558,29 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scope>
|
|
|
+ .btnReply{
|
|
|
+ width: 80rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ background: #E3F0FF;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #007AFF;
|
|
|
+ }
|
|
|
+ .btnDel{
|
|
|
+ width: 80rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ background: #FFEDF0;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #FF2D55;
|
|
|
+ }
|
|
|
+ .btnReply{
|
|
|
+ width: 80rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ background: #E3F0FF;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
.photoBox{
|
|
|
.photoTop{
|
|
|
height: 74upx;
|
|
@@ -571,6 +631,7 @@ export default {
|
|
|
.chat_box {
|
|
|
display: flex;
|
|
|
padding: 20rpx;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
.chat3 {
|
|
|
font-size: 30rpx;
|