Commit f0f33742 authored by zhengke's avatar zhengke

1

parent 95fff39c
......@@ -34,4 +34,16 @@ export function submitPaper(data) {
method: 'post',
data
})
}
/**
* 记录考试时间
* @param {JSON参数} data
*/
export function SetStuExamStartTime(data) {
return request({
url: '/AppletIndex/SetStuExamStartTime',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -9,4 +9,16 @@ export function getMyStudyCourseList(data) {
method: 'post',
data
})
}
/**
* 获取我的课程章节列表
* @param {JSON参数} data
*/
export function GetMyStudyCourseChapterList(data) {
return request({
url: '/AppletIndex/GetMyStudyCourseChapterList',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -73,7 +73,10 @@
computed,
onMounted,
} from "vue";
import { getPaperDetail } from "../../api/exam";
import {
getPaperDetail,
SetStuExamStartTime
} from "../../api/exam";
export default {
props: {
ExamStatus: Number,
......@@ -94,6 +97,18 @@
EnterExam() {
if (!data.canClick) return
ctx.emit("hideNotice");
methods.SetStartTime();
},
async SetStartTime(){
let msg = {
PublishId:props.msg.PublishId,
GuestId:props.msg.GuestId,
PaperId:props.msg.PaperId
};
let res = await SetStuExamStartTime(msg);
if (res.Code == 1) {
}
},
getNowTime() {
let dateTime;
......
......@@ -14,7 +14,9 @@
"style": {
"navigationStyle": "custom"
}
}, {
},{
"path": "pages/study/courseList"
},{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom"
......
<style scoped>
.studyCourse {
/* width: 100%; */
/* height: 100vh; */
background: #F5F5F5;
padding: 32rpx;
}
.Course_Top {
display: flex;
justify-content: space-between;
align-items: center;
}
.CourseBan {
color: #111111;
font-size: 34rpx;
}
.CourseTotal {
font-size: 23rpx;
color: #999999;
}
.Course_Bottom {
min-height: 80vh;
background-color: #FFFFFF;
border-radius: 24rpx;
margin-top: 32rpx;
}
.Course_List {
width: 100%;
height: auto;
border-bottom:1px solid #F5F5F5;
}
.CourseList_One {
height: 200rpx;
display: flex;
align-items: center;
background-color: #FFFFFF;
padding:0 30rpx;
}
.Course_Name {
color: #111111;
font-weight: bold;
font-size: 30rpx;
}
.Course_Index {
color: #C1C1C1;
font-size: 22rpx;
margin-top: 28rpx;
}
.Course_SeName{
width:50%;
margin:0 20rpx;
}
.Course_Two{
background-color: #EBEBEB;
height:200rpx;
width:100%;
display: flex;
align-items: center;
}
.Course_Two>view{
flex:0 0 33.3%;
text-align: center;
}
.Course_Two img{
width:90rpx;
height:90rpx;
}
.Course_Opera{
color: #666666;
font-size:22rpx;
text-align: center;
margin-top:5rpx;
}
</style>
<template>
<view class="studyCourse">
<view class="Course_Top">
<view class="CourseBan">《韩语兴趣入门班》</view>
<view class="CourseTotal">共 226课</view>
</view>
<view class="Course_Bottom">
<view class="Course_List" v-for="(item,index) in ChapterList" :key="index">
<view class="CourseList_One" @click="getReview(index)">
<view>
<van-circle v-model="currentRate" layer-color="#E4E5FB" :size="70" color="#4C50E7" :rate="100" :speed="100" :text="getSpeed(currentRate)" />
</view>
<view class="Course_SeName">
<view class="Course_Name">{{item.ChapterTree.ChapterName}}</view>
<view class="Course_Index">{{item.ChapterTree.ChapterNo}}</view>
</view>
<view>
<van-rate v-model="value" :size="20" :disabled="true" color="#ffd21e" :count="3" void-icon="star" void-color="#eee" />
</view>
</view>
<view class="Course_Two" v-if="item.isShow">
<view>
<view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/review.png" alt="" />
</view>
<view class="Course_Opera">课程回顾</view>
</view>
<view>
<view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/fuxi.png" alt="" />
</view>
<view class="Course_Opera">复习</view>
</view>
<view>
<view>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/ceshi.png" alt="" />
</view>
<view class="Course_Opera">测试</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
provide,
} from "vue";
import {
GetMyStudyCourseChapterList, //课程列表
} from "../../api/study.js";
export default {
components: {},
onLoad(options) {
uni.setNavigationBarTitle({
title: "所有单词",
});
},
setup(props) {
let data = reactive({
ChapterList: [], //课程列表
statusBarHeight: 0,
currentRate: 90,
value:2
})
let methods = {
async getChapterList() {
let msg = {
ClassId:5,
CourseId:1
};
let res = await GetMyStudyCourseChapterList(msg);
if (res.Code == 1) {
console.log(res)
data.ChapterList = res.Data;
data.ChapterList.forEach(x=>{
x.isShow=false
})
}
},
getSpeed(score){
if(score<100){
return score+'%'
}else{
return '已学完'
}
},
//点击展开
getReview(index){
data.ChapterList.forEach((x,i)=>{
if(index!=i){
x.isShow=false;
}
})
data.ChapterList[index].isShow=!data.ChapterList[index].isShow;
}
}
onMounted(() => {
that.getChapterList() //我的课程章节列表
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
})
let that = methods;
return {
...toRefs(data),
...methods,
};
}
}
</script>
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