课程详情评论页完成

This commit is contained in:
田岩
2025-06-24 21:04:23 +08:00
parent 7cd537912a
commit c8c4e3285a
5 changed files with 89 additions and 53 deletions
+55 -23
View File
@@ -1,6 +1,7 @@
<template>
<view class="comment_div">
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false">
<view class="comment_div">
<view class="message_div" v-for="(item,index) in message_list">
<view class="head_div">
<image-preview v-if="item.userIconImgId" class="img-box img"
@@ -66,25 +67,33 @@
</view>
</view>
</view>
</view>
<uni-popup ref="popup" background-color="red">
<view class="bottom_reply_input_div">
<uv-input v-model="reply_data.bbsContent" placeholderStyle='color:#999999;font-size:26rpx'
:placeholder="reply_data.placeholder" :focus="true">
</uv-input>
<view class="" style="display: flex;flex-direction: column; margin:10rpx 20rpx;">
<view class="fl1"></view>
<uv-button class="bottom_reply_button" type="primary" :throttleTime="500"
@click="reply_send">回复</uv-button>
<view class="fl1"></view>
</view>
</view>
</uni-popup>
<view class="send_evaluate_div_height"></view>
</scroll-view>
<view class="send_evaluate_div">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum)">发布评价</uv-button>
</view>
</scroll-view>
<uni-popup ref="popup" background-color="red">
<view class="bottom_reply_input_div">
<uv-input v-model="reply_data.bbsContent" placeholderStyle='color:#999999;font-size:26rpx'
:placeholder="reply_data.placeholder" :focus="true">
</uv-input>
<view class="" style="display: flex;flex-direction: column; margin:10rpx 20rpx;">
<view class="fl1"></view>
<uv-button class="bottom_reply_button" type="primary" :throttleTime="500"
@click="reply_send">回复</uv-button>
<view class="fl1"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script setup>
@@ -162,11 +171,32 @@
</script>
<style lang="scss" scoped>
.scroll-view{
height: 50vh;
overflow: hidden;
border-radius: 24rpx;
.send_evaluate_div_height {
height: 170rpx;
}
.send_evaluate_div {
position: absolute;
bottom: 0rpx;
width: calc(100% - 80rpx);
padding-top: 10rpx;
padding-bottom: 30rpx;
background-color: #ffffff;
:deep(.uv-button-wrapper) {
.uv-button {
border-radius: 14rpx;
height: 92rpx;
}
}
}
.scroll-view {
position: relative;
height: calc(100vh - 88rpx - 162rpx - 256rpx - 50rpx);
overflow: hidden;
}
// 顶部随着输入法弹出的框
.bottom_reply_input_div {
width: 100%;
@@ -348,9 +378,11 @@
}
.comment_div {
padding: 44rpx 40rpx;
padding: 20rpx 40rpx;
background-color: #ffffff;
border-radius: 24rpx;
position: relative;
height: calc(100vh - 88rpx - 162rpx - 256rpx - 70rpx);
overflow: hidden;
}
</style>
@@ -49,11 +49,13 @@
<style lang="scss" scoped>
.course-info {
box-sizing: border-box;
width: 100%;
// width: 100%;
background-color: #ffffff;
border-radius: 22rpx;
padding-top: 38rpx;
padding-left: 38rpx;
// margin-left: 16rpx;
// margin-right: 16rpx;
}
.info-top {
display: flex;
@@ -37,7 +37,8 @@
padding-right: 52rpx;
border-radius: 22rpx;
justify-content: space-between;
// margin-left: 16rpx;
// margin-right: 16rpx;
.blue-ball {
padding-top: 16rpx;
margin-right: 12rpx;
+27 -26
View File
@@ -26,30 +26,30 @@
:active-style="{ color: '#323E57', 'font-weight': 600, 'font-size': '30rpx' }"
:inactive-style="{ color: '#666666', 'font-size': '30rpx' }"></uv-tabs>
</view>
<view class="course-info" v-if="tabAct == 0">
<introduceVue v-model="form"></introduceVue>
</view>
<view class="point" v-if="tabAct == 1">
<knowledge v-model="form"></knowledge>
</view>
<view class="evaluate" v-if="tabAct == 2">
<comment :crsNum="crsNum"></comment>
</view>
<view class="course-info" v-if="tabAct == 0">
<introduceVue v-model="form"></introduceVue>
</view>
<view class="point" v-if="tabAct == 1">
<knowledge v-model="form"></knowledge>
</view>
<view class="evaluate" v-if="tabAct == 2">
<comment :crsNum="crsNum"></comment>
</view>
</view>
</view>
<view class="btn-box font_pf">
<template v-if="[0,1].includes(tabAct)">
<uv-button type="primary"
@click="common.navigateTo('/pages/course/study?crsNum='+crsNum+'&crsId='+form.crsId)">去学习</uv-button>
<uv-button type="primary">去练习</uv-button>
<uv-button type="primary">去考试</uv-button>
</template>
<template v-if="tabAct == 2">
<view class="btn-box btn-box-height font_pf" v-if="[0,1].includes(tabAct)">
<uv-button type="primary"
@click="common.navigateTo('/pages/course/study?crsNum='+crsNum+'&crsId='+form.crsId)">去学习</uv-button>
<uv-button type="primary">去练习</uv-button>
<uv-button type="primary">去考试</uv-button>
<!-- <template v-if="tabAct == 2">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum)">发布评价</uv-button>
</template>
</template> -->
</view>
</view>
@@ -71,7 +71,7 @@
import introduceVue from './components/introduce.vue';
import knowledge from './components/knowledge.vue';
import comment from './components/comment.vue';
// tab栏
const tabList = ref([{
name: '课程介绍'
@@ -82,7 +82,7 @@
}]);
const form = ref({});
const crsNum = ref('');
const tabAct = ref(2);
const tabAct = ref(0);
const tabSwitch = (item) => {
tabAct.value = item.index;
};
@@ -101,12 +101,11 @@
</script>
<style lang="scss" scoped>
.detail-main {
background-color: #f5f5f5;
position: relative;
}
.detail-body {
box-sizing: border-box;
min-height: calc(100vh - 256rpx);
@@ -177,17 +176,20 @@
// }
}
.btn-box-height {
height: 187rpx;
}
.btn-box {
position: fixed;
bottom: 0;
height: 187rpx;
width: 100%;
display: flex;
padding-top: 37rpx;
justify-content: space-around;
background-color: #ffffff;
// background-color: red;
border: 2rpx solid #E5E5E5;
:deep(.uv-button-wrapper) {
flex: 1;
@@ -206,7 +208,6 @@
height: 92rpx;
}
}
}
.num-item {
+2 -2
View File
@@ -348,13 +348,13 @@
}
onShow(() => {
if(!common.isLogin()){
console.log('222')
common.navigateTo('/pages/login/login')
return
}
}
statistics_data['get_statistics_data']() // 获取统计数据
})
onMounted(async () => {
if(!common.isLogin()) return;
queryCrsInfoByLastnew().then(res => {
new_class_list.value = res.body
})