Commit 99b0d95d authored by 罗超's avatar 罗超

1

parent d636ab64
......@@ -152,4 +152,16 @@ export function getLearningGardenDetail(data) {
method: 'post',
data
})
}
/**
* 我的上课反馈分页
* @param {JSON参数} data
*/
export function getClassFeedBackList(data) {
return request({
url: "/AppletIndex/GeClassFeedBackPage",
method: 'post',
data
})
}
\ No newline at end of file
<template>
<view> </view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
setup(props) {},
};
</script>
\ No newline at end of file
......@@ -49,6 +49,9 @@
},
{
"path": "askForLeaveList" //请假列表
},
{
"path": "feedback" //课程反馈
}
]
},
......
<template>
<view>
<van-empty description="暂无数据" v-if="dataList.length === 0" />
<scroll-view
:scroll-top="0"
scroll-y="true"
class="scroll-box"
@scrolltolower="lower"
v-if="dataList.length > 0"
>
<view
v-for="(item, index) in dataList"
:key="index"
class="list-item flex flex_between_center"
@click="jumpPage(item.FeedBackId)"
>
<view class="feedback-info flex flex_start_center">
<image :src="item.TeacherIcon" class="info-headimg" />
<view class="grow">
<view class="teacher-name">{{ item.TeacherName }}</view>
<view class="rate">
<van-rate
:value="item.Score"
icon="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
void-icon=""
size="24rpx"
/>
</view>
</view>
<view class="feedback-all"> {{ item.CreatetimeStr }} </view>
</view>
<view class="two_line feedback-text"> {{ item.Comment }}</view>
<view class="flex">
<view
v-for="(item1, index1) in item.PhotoList"
:key="index1"
class="feedback-img"
>
<image
:src="item1"
style="width: 100%; height: 100%"
v-if="index1 === 0 || index1 === 1 || index1 === 2"
/>
<view
class="layer flex flex_center_center"
v-if="item.PhotoList.length > 3 && index1 === 2"
>+{{ item.PhotoList.length - 3 }}</view
>
</view>
</view>
</view>
<Loadmore :state="pageState" />
</scroll-view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import { getClassFeedBackList } from "../../api/index";
export default {
components: {
Loadmore,
},
setup(props) {
let data = reactive({
msg: {
pageIndex: 1,
pageSize: 10,
},
dataList: [],
pageState: "more",
pageCount: 0,
});
let methods = {
async getList() {
let res = await getClassFeedBackList(data.msg);
if (res) {
if (data.msg.PageIndex === 1) {
data.dataList = res.Data.PageData;
} else {
data.dataList = [...res.Data.PageData, ...data.dataList];
}
data.pageCount = res.Data.PageCount;
if (data.msg.pageIndex >= res.Data.PageCount) {
data.pageState = "none";
} else {
data.pageState = "more";
}
}
},
lower(e) {
if (data.msg.pageIndex < data.PageCount) {
data.pageState = "loading";
data.msg.pageIndex++;
that.getList();
} else {
data.pageState = "none";
}
},
};
let that = methods;
onMounted(() => {
that.getList();
});
return {
...toRefs(data),
...methods,
};
},
onLoad() {
uni.setNavigationBarTitle({
title: "课程反馈",
});
},
};
</script>
<style scoped>
.scroll-box {
height: 100vh;
width: 100%;
box-sizing: border-box;
padding: 15rpx 30rpx;
margin-top: 10rpx;
background-color: #fff;
}
.list-item {
height: 430rpx;
box-sizing: border-box;
padding: 30rpx 0;
}
.feedback-info {
height: 60rpx;
}
.info-headimg {
width: 60rpx;
height: 60rpx;
background-color: #c4a1a1;
border-radius: 50%;
margin-right: 20rpx;
}
.teacher-name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.feedback-all {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.feedback-text {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #111111;
margin: 20rpx 0;
}
.feedback-img {
width: 210rpx;
height: 210rpx;
border-radius: 20rpx;
background-color: #eee;
margin-right: 30rpx;
}
.feedback-img:nth-child(3n) {
margin-right: 0rpx !important;
}
.layer {
width: 100%;
height: 100%;
background-color: #cbd9ed;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
</style>
\ No newline at end of file
......@@ -110,20 +110,20 @@ export default {
if (res) {
if (res.Code == 1) {
data.dataList = res.Data;
let Remark = ''
if(res.Data.TotalScore>0&&res.Data.TotalScore<=60){
Remark='要加油哦'
}
if(res.Data.TotalScore>60&&res.Data.TotalScore<=90){
Remark='不错哦'
}
if(res.Data.TotalScore>90){
Remark='你好棒'
}
let Remark = "";
if (res.Data.TotalScore > 0 && res.Data.TotalScore <= 60) {
Remark = "要加油哦";
}
if (res.Data.TotalScore > 60 && res.Data.TotalScore <= 90) {
Remark = "不错哦";
}
if (res.Data.TotalScore > 90) {
Remark = "你好棒";
}
that.initCanvas(
res.Data.TotalScore,
Remark,
res.Data.ExamScore
res.Data.Publish.ExamScore
);
}
}
......@@ -148,6 +148,7 @@ export default {
let end = (score / tatalScore) * (2.25 - 0.75) + 0.75;
let ctx = uni.createCanvasContext("firstCanvas");
ctx.beginPath();
console.log(end);
ctx.arc(110, 110, 86, 0.75 * Math.PI, end * Math.PI);
ctx.lineWidth = 7;
ctx.lineCap = "round";
......@@ -183,7 +184,7 @@ export default {
this.Exam_Student_Id = options.Exam_Student_Id;
}
this.getPaperDetail();
this.initCanvas(100, "再接再厉", 100);
// this.initCanvas(100, "再接再厉", 100);
},
};
</script>
......
......@@ -109,6 +109,54 @@
<text v-if="indexData.ClassPlan.TimeStatusStr === 2">下课</text>
</view>
</view>
<view class="title" v-if="data.indexData.FeedBackList[0].length > 0">
课程反馈
</view>
<view class="feedback" v-if="data.indexData.FeedBackList[0].length > 0">
<view class="feedback-info flex flex_start_center">
<image src="" class="info-headimg" />
<view class="grow">
<view class="teacher-name">{{
data.indexData.FeedBackList[0].TeacherName
}}</view>
<view class="rate">
<van-rate
:value="data.indexData.FeedBackList[0].Score"
:count="data.indexData.FeedBackList[0].Score"
icon="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
void-icon=""
size="24rpx"
/>
</view>
</view>
<view
class="feedback-all"
@click="jumpPage('/pages/course/feedback')"
>
全部<van-icon name="arrow" style="margin-left: 30rpx" />
</view>
</view>
<view class="two_line feedback-text">
{{ data.indexData.FeedBackList[0].Comment }}</view
>
<view class="flex">
<view
v-for="(item, index) in data.indexData.FeedBackList[0].PhotoList"
:key="index"
>
<image
:src="item"
class="feedback-img"
v-if="index === 0 || index === 1 || index === 2"
></image>
<view
class="layer flex flex_center_center"
v-if="item.PhotoList.length > 3 && index === 2"
>+{{ item.PhotoList.length - 3 }}</view
>
</view>
</view>
</view>
<van-cell-group :border="false">
<van-cell title="我的考试" title-class="title" :border="false">
<view
......@@ -186,9 +234,6 @@ import {
import { getIndexInfo } from "../../api/index";
import { desensitization } from "../../utils/index";
export default {
name: "",
props: {},
components: {},
setup(props) {
let { proxy } = getCurrentInstance();
proxy.$isLogin();
......@@ -307,7 +352,6 @@ export default {
3,
-4
);
that.getIndexdata();
});
let that = methods;
return {
......@@ -615,4 +659,55 @@ export default {
top: 38rpx;
right: 20rpx;
}
.feedback {
margin: 30rpx 0;
}
.feedback-info {
height: 60rpx;
}
.info-headimg {
width: 60rpx;
height: 60rpx;
background-color: #c4a1a1;
border-radius: 50%;
margin-right: 20rpx;
}
.teacher-name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.feedback-all {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.feedback-text {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #111111;
margin: 20rpx 0;
}
.feedback-img {
width: 210rpx;
height: 210rpx;
border-radius: 20rpx;
background-color: #eee;
margin-right: 30rpx;
}
.feedback-img:nth-child(3n) {
margin-right: 0rpx !important;
}
.layer {
width: 210rpx;
height: 210rpx;
background-color: #cbd9ed;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment