This commit is contained in:
@fawn-nine
2024-09-26 15:43:57 +08:00
parent 86a1f754c2
commit b2221666e1
13 changed files with 132 additions and 73 deletions

View File

@@ -6,19 +6,19 @@ if (process.env.NODE_ENV === 'development') {
// socketUrl = "ws://localhost:6001/"; // socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/"; // baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式 baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥 // baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/"; // baseUrl = "http://192.168.110.110:9200/pb/";
// socketUrl = "ws://8.129.186.35:6001/"; // socketUrl = "ws://8.129.186.35:6001/";
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// 生产环境11 // 生产环境11
// baseUrl = "http://59.110.212.44:9100/pb/"; // baseUrl = "http://192.168.110.100:9200/pb/" // 开发用电脑
// baseUrl = "https://testapi.nuttyreading.com/"; // baseUrl = "https://testapi.nuttyreading.com/";
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥 // baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
baseUrl = "https://api.nuttyreading.com/"; //1 baseUrl = "https://api.nuttyreading.com/"; // 正式环境
// baseUrl = "ws://twin-ui.com:6001/"; // baseUrl = "ws://twin-ui.com:6001/";
// socketUrl = "ws://twin-ui.com:6001/"; // socketUrl = "ws://twin-ui.com:6001/";
} }

View File

@@ -19,7 +19,7 @@
</view> </view>
<view class="imgBox flex_box flex_between" v-if="item.certificateUrlList.length > 0"> <view class="imgBox flex_box flex_between" v-if="item.certificateUrlList.length > 0">
<view class="img" v-for="(item1,index1) in item.certificateUrlList" :key="index1"> <view class="img" v-for="(item1,index1) in item.certificateUrlList" :key="index1">
<image @click="preveImg(item1)" :src="item1" mode="widthFix"></image> <image @click="preveImg(item1)" :src="item1" mode="heightFix"></image>
</view> </view>
<view class="info flex_box align-items_box"> <view class="info flex_box align-items_box">
<text class="small_btn border_radius_10 moreBtn" @click="showMore(item)">详细信息</text> <text class="small_btn border_radius_10 moreBtn" @click="showMore(item)">详细信息</text>
@@ -37,11 +37,11 @@
<h3>证书详情</h3> <h3>证书详情</h3>
</view> </view>
<view class="info"> <view class="info" style="line-height: 60rpx;">
<view>证书类型{{thisInfo.type}}</view> <view><text style="color: #999;">证书类型</text>{{thisInfo.type}}</view>
<view>获得时间{{thisInfo.createTime}}</view> <view><text style="color: #999;">获得时间</text>{{thisInfo.createTime}}</view>
<view class=""> <view class="">
获得途径{{thisInfo.title}}学习获得 <text style="color: #999;">获得途径</text>{{thisInfo.title}}学习获得
</view> </view>
</view> </view>
</view> </view>
@@ -352,7 +352,7 @@
.item{margin-bottom: 20rpx; .item{margin-bottom: 20rpx;
h3{font-weight: normal; margin: 20rpx 0;} h3{font-weight: normal; margin: 20rpx 0;}
} }
.img{width: 36%; overflow: hidden; .img{width: 36%; overflow: hidden; height: 300rpx;
image{width: 100%; height: 100%;} image{width: 100%; height: 100%;}
} }
.imgBox{ overflow: hidden; } .imgBox{ overflow: hidden; }

View File

@@ -113,7 +113,7 @@
<!-- end --> <!-- end -->
<template v-if="librayList[curIndex]"> <template v-if="librayList[curIndex]">
<view :class="['endBox',(userMsg.vip == 1 || userMsg.vip == 2) ? 'vipBgColor':'']" <view :class="['endBox',(userMsg.vip == 1 || userMsg.vip == 2) ? 'vipBgColor':'']"
v-if="librayList[curIndex].isBuy == 1 || userMsg.vip != 0"> v-if="librayList[curIndex].isBuy == 1 || userMsg.vip == 2 || userMsg.vip == 1">
<!-- 已经可以观看的情况 --> <!-- 已经可以观看的情况 -->
<view class="box"> <view class="box">
<view class="flexbox" v-if="userMsg.vip == 1 || userMsg.vip == 2"> <view class="flexbox" v-if="userMsg.vip == 1 || userMsg.vip == 2">
@@ -181,7 +181,7 @@
</view> </view>
<view class="shitingTag"> <view class="shitingTag">
<u-icon <u-icon
v-if="librayList[curIndex].isBuy == 0 && userMsg.vip == 0 && item.isAudition == 0" v-if="librayList[curIndex].isBuy == 0 && (userMsg.vip == 0 || userMsg.vip == 3) && item.isAudition == 0"
name="lock" color="#258feb" size="28"></u-icon> name="lock" color="#258feb" size="28"></u-icon>
</view> </view>
@@ -1294,12 +1294,6 @@
this.pageTitle = this.course.title; this.pageTitle = this.course.title;
this.librayList = [...res.data.catalogues]; this.librayList = [...res.data.catalogues];
console.log('获取课程详情=》',res.data); console.log('获取课程详情=》',res.data);
// for (let i = 0; i < that.librayList.length; i++) {
// var list = await that.getChapterList(that.librayList[i]);
// console.log("list at line 1222:", list);
// that.courseList[i] = [...list];
// // console.log("that.courseList at line 1238:", that.courseList);
// }
that.$forceUpdate(); that.$forceUpdate();
if (this.librayList.length > 0) { if (this.librayList.length > 0) {
if(this.catalogueId){ if(this.catalogueId){

View File

@@ -32,7 +32,7 @@
<view class="newBox"> <view class="newBox">
<view :class="['item','flexbox', userMsg.vip != '0'&& item.isBuy != 1 ? 'blueBorder':'']" v-for="(item, index) in MyCourseList.list" :key="index" <view :class="['item','flexbox', userMsg.vip != '0'&& item.isBuy != 1 ? 'blueBorder':'']" v-for="(item, index) in MyCourseList.list" :key="index"
> >
<view class="vipTag" v-if="userMsg.vip != '0' && item.isBuy != 1"> <view class="vipTag" v-if="(userMsg.vip == '1' || userMsg.vip == '2') && item.isBuy != 1">
VIP畅学 VIP畅学
</view> </view>
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> --> <!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
@@ -505,16 +505,18 @@
// console.log('正在执行,未完成') // console.log('正在执行,未完成')
// return // return
// } // }
this.MyCourseList.flag = true var data = {
$http.request({
url: "medical/course/getUserCourseBuy",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"limit": 10, "limit": 10,
"title": this.searchValue, "title": this.searchValue,
"medicalId": this.medicalId, "medicalId": this.medicalId,
"page": this.MyCourseList.page "page": this.MyCourseList.page
}, }
console.log('搜索的内容',data);
this.MyCourseList.flag = true
$http.request({
url: "medical/course/getUserCourseBuy",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头 header: { //默认 无 说明:请求头
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },

View File

@@ -99,6 +99,7 @@
<script> <script>
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import permission from "@/js_sdk/wa-permission/permission.js" import permission from "@/js_sdk/wa-permission/permission.js"
import debounce from "@/common/debounce.js";
import { import {
mapState, mapState,
mapMutations mapMutations
@@ -368,6 +369,7 @@
this.fileList2.splice(event.index, 1) this.fileList2.splice(event.index, 1)
}, },
async onSubmit() { async onSubmit() {
debounce(async () => {
this.$refs.form.validate().then(async res => { this.$refs.form.validate().then(async res => {
let data = await this.getHtml(); let data = await this.getHtml();
var _data = data.html.replace(/<.*?>/g, "") var _data = data.html.replace(/<.*?>/g, "")
@@ -448,6 +450,7 @@
icon: 'none' icon: 'none'
}) })
}) })
},300)
} }
}, },
//页面隐藏 //页面隐藏

View File

@@ -19,7 +19,7 @@
<view class="className"> <view class="className">
<h3>{{thisClass.title}}</h3> <h3>{{thisClass.title}}</h3>
<text class="tuichu" v-if="thisClass.state == 0 && isHave" @click="outClass()">退出班级</text> <text class="tuichu" v-if="thisClass.state == '0' && isHave" @click="outClass()">退出班级</text>
</view> </view>
<view class="otherItems flex_box"> <view class="otherItems flex_box">
<view v-if="thisClass.state == '0'"> <view v-if="thisClass.state == '0'">
@@ -184,7 +184,7 @@
</view> </view>
<!-- 课程列表 --> <!-- 课程列表 -->
<view class="" v-if="tabId == '0'"> <view class="" v-if="tabId == '0'">
<uni-section class="mb-10 nobg nopad" title="班内课程" type="line"></uni-section> <!-- <uni-section class="mb-10 nobg nopad" title="班内课程" type="line"></uni-section> -->
<view class="newBox" v-show="courses.length > 0 "> <view class="newBox" v-show="courses.length > 0 ">
<view class="item flexbox" v-for="(item, index) in courses" :key="index" <view class="item flexbox" v-for="(item, index) in courses" :key="index"
@click="onPageJump('/pages/course/courseDetail',item.id)"> @click="onPageJump('/pages/course/courseDetail',item.id)">
@@ -221,6 +221,10 @@
<!-- 班内同学 --> <!-- 班内同学 -->
<template v-if="tabId == '2'"> <template v-if="tabId == '2'">
<template v-if="students.length> 0"> <template v-if="students.length> 0">
<view class="" style=" overflow: hidden; margin:20rpx 0">
<text style="font-size: 26rpx; color: #666;"> {{students.length}} 名学员</text>
<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title=""></uni-section> -->
</view>
<view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')"> <view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="newBox flexbox"> <view class="newBox flexbox">
<view :class="['item']" v-for="(item, index) in students" :key="index"> <view :class="['item']" v-for="(item, index) in students" :key="index">
@@ -244,7 +248,7 @@
</view> </view>
<sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId" <sutdent-score-list :students="students" :classModel="classModel" :tabId="tabId"
:thisClass="thisClass" @chooseStudent="chooseStudent" :thisClass="thisClass" @chooseStudent="chooseStudent"
v-if="(thisClass.state == '3' || thisClass.state == '2')"></sutdent-score-list> v-if="(thisClass.state == '3' || thisClass.state == '2') && students.length > 0"></sutdent-score-list>
</template> </template>
<view class="" v-else> <view class="" v-else>
<u-divider text="暂无学员加入"></u-divider> <u-divider text="暂无学员加入"></u-divider>
@@ -759,12 +763,13 @@
} }
} }
}, },
onPullDownRefresh() { async onPullDownRefresh() {
// this.curTagIndex = 0 // this.curTagIndex = 0
console.log('this.tabId------', this.tabId); console.log('this.tabId------', this.tabId);
this.getClassInfo() this.getClassInfo()
this.getScore() this.getScore()
var ll = await this.getPaperList()
// this.pPage = 0 // this.pPage = 0
// this.taskList = [] // this.taskList = []
// this.getList() // this.getList()
@@ -1034,6 +1039,7 @@
}, },
}) })
.then(async (res) => { .then(async (res) => {
console.log('课程购买情况',res);
if (res.code == 0) { if (res.code == 0) {
if (res.msg != '') { if (res.msg != '') {
msg = res.msg msg = res.msg
@@ -1107,7 +1113,7 @@
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
// console.log('获取试卷列表', res); console.log('获取试卷列表', res);
this.paperList = res.examPaper this.paperList = res.examPaper
if (this.paperList.length > 0) { if (this.paperList.length > 0) {
var _list = [...this.paperList] var _list = [...this.paperList]
@@ -1753,8 +1759,7 @@
}) })
.then(async res => { .then(async res => {
if (res.code == 0) { if (res.code == 0) {
// this.isHave = true
this.isHave = true
uni.showToast({ uni.showToast({
title: `加入成功!`, title: `加入成功!`,
icon: 'success' icon: 'success'
@@ -1763,13 +1768,18 @@
this.getClassInfo() this.getClassInfo()
this.buyCourseMsg = await this.checkUserCourse() this.buyCourseMsg = await this.checkUserCourse()
}, 200) }, 200)
}else{
uni.showToast({
title: res.errMsg,
icon: 'none'
})
} }
}).catch(e => { }).catch(e => {
console.log(e, '数据报错') console.log(e, '数据报错')
// this.status = 3 // this.status = 3
uni.showToast({ uni.showToast({
title: `加入失败`, title: e.errMsg,
icon: 'error' icon: 'none'
}) })
}); });
}, },
@@ -1870,7 +1880,7 @@
}) })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
that.isHave = true // that.isHave = true
uni.showToast({ uni.showToast({
title: `退出成功!`, title: `退出成功!`,
icon: 'success' icon: 'success'
@@ -2009,7 +2019,17 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/style/mixin.scss"; @import "@/style/mixin.scss";
::v-deep .xueyuanTitle {
.uni-section-header {
float: left;
}
.uni-section-content {
float: right;
margin-top: 20rpx;
font-size: 26rpx;
}
}
.score { .score {
color: #55aaff; color: #55aaff;
font-size: 30rpx !important; font-size: 30rpx !important;

View File

@@ -142,12 +142,14 @@
<!-- 学员列表 --> <!-- 学员列表 -->
<view class="" v-if="tabId == '2'"> <view class="" v-if="tabId == '2'">
<template v-if="students.length> 0 "> <template v-if="students.length> 0 ">
<view class="" style=" overflow: hidden; margin: 20rpx 0;">
<text style="font-size: 26rpx; color: #666;"> {{students.length}} 名学员</text>
<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section> -->
</view>
<template v-if="(thisClass.state == '0' || thisClass.state == '1')"> <template v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="classMateBox"> <view class="classMateBox">
<view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</view>
<view class=" tips"> <view class=" tips">
<view class="flex_box"> <view class="flex_box">
<view class="item flex_box"> <view class="item flex_box">
@@ -389,6 +391,7 @@
<script> <script>
import sutdentScoreList from "./components/sutdent_score_list.vue"; import sutdentScoreList from "./components/sutdent_score_list.vue";
import debounce from "@/common/debounce.js";
import { import {
ref, ref,
onMounted onMounted
@@ -870,9 +873,10 @@
}, },
// 改变班级状态 // 改变班级状态
changeClassStatu(statusCode) { changeClassStatu(statusCode) {
debounce(async () => {
let that = this let that = this
that.opClass(statusCode) that.opClass(statusCode)
},300)
}, },
// 考试周和结班状态下,学员的信息 // 考试周和结班状态下,学员的信息
async getStudentScoreList() { async getStudentScoreList() {
@@ -919,6 +923,9 @@
}, },
// 班级操作 // 班级操作
opClass(statusCode) { opClass(statusCode) {
uni.showLoading({
title:'正在处理'
})
$http.request({ $http.request({
url: "common/class/updateClassState", url: "common/class/updateClassState",
method: "POST", method: "POST",
@@ -931,6 +938,7 @@
}, },
}) })
.then(res => { .then(res => {
uni.hideLoading()
if (res.code == 0) { if (res.code == 0) {
// that.isHave = true // that.isHave = true
uni.showToast({ uni.showToast({
@@ -951,11 +959,12 @@
}) })
} }
}).catch(e => { }).catch(e => {
uni.hideLoading()
console.log(e, '数据报错') console.log(e, '数据报错')
uni.showToast({ uni.showToast({
title: res.errMsg, title: res.errMsg,
icon: 'none', icon: 'none',
duration: 300 duration: 3000
}) })
}); });
}, },

View File

@@ -34,12 +34,14 @@
<!-- 学员列表 --> <!-- 学员列表 -->
<view class="" v-if="tabId == '2'"> <view class="" v-if="tabId == '2'">
<template v-if="students.length> 0 "> <template v-if="students.length> 0 ">
<view class="" style=" overflow: hidden; margin: 20rpx 0;">
<text style="font-size: 26rpx; color: #666;"> {{students.length}} 名学员</text>
<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section> -->
</view>
<template v-if="(thisClass.state == '0' || thisClass.state == '1')"> <template v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="classMateBox"> <view class="classMateBox">
<view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title="">
{{students.length}} 名学员</uni-section>
</view>
<view class=" tips"> <view class=" tips">
<view class="flex_box"> <view class="flex_box">
<view class="item flex_box"> <view class="item flex_box">

View File

@@ -1,10 +1,10 @@
<template> <template>
<view class=""> <view class="">
<view class="" > <view class="" >
<view class="classMateBox" v-show="students.length> 0 "> <view class="classMateBox" v-if="students.length> 0 ">
<view class="" style=" overflow: hidden;"> <view class="" style=" overflow: hidden;">
<uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" > <!-- <uni-section v-if="students.length> 0 " class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" >
{{students.length}} 名学员</uni-section> {{students.length}} 名学员</uni-section> -->
</view> </view>
<!-- <view class=" tips"> <!-- <view class=" tips">
<view v-if="thisClass.state == '2'" class=" zhiliang flex_box flex_between align-items_box" style="margin-top: 20rpx;"> <view v-if="thisClass.state == '2'" class=" zhiliang flex_box flex_between align-items_box" style="margin-top: 20rpx;">

View File

@@ -115,6 +115,7 @@
<script> <script>
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import debounce from "@/common/debounce.js";
import { import {
mapState,mapMutations mapState,mapMutations
} from "vuex"; } from "vuex";
@@ -300,6 +301,7 @@
}, },
// 获取交卷数据 // 获取交卷数据
sumitAnswer() { sumitAnswer() {
debounce(async () => {
let that = this let that = this
that.wantSubmit = true that.wantSubmit = true
// this.noAnswerList = await this.getNoAnswerList() // this.noAnswerList = await this.getNoAnswerList()
@@ -319,10 +321,13 @@
}else{ }else{
that.sumbitPaper() that.sumbitPaper()
} }
},300)
}, },
// q请求提交试卷 // q请求提交试卷
sumbitPaper(ids) { sumbitPaper(ids) {
uni.showLoading({
title:'正在交卷'
})
let that = this let that = this
$http.request({ $http.request({
url: "common/classExam/submitExamPaper", url: "common/classExam/submitExamPaper",
@@ -335,7 +340,7 @@
}, },
}) })
.then(res => { .then(res => {
// uni.hideLoading() uni.hideLoading()
if (res.code == 0) { if (res.code == 0) {
console.log('交卷结果',res); console.log('交卷结果',res);
uni.showToast({ uni.showToast({
@@ -392,6 +397,7 @@
this.haveAnswerList = this.gethaveAnswerList() this.haveAnswerList = this.gethaveAnswerList()
}, },
showNextQuestion() { showNextQuestion() {
debounce(async () => {
// 下一题 // 下一题
this.curIndex1++ this.curIndex1++
// this.curQuestion.answerIds = [] // this.curQuestion.answerIds = []
@@ -402,8 +408,10 @@
// console.log('+++++++++++++++', this.testPaper, ); // console.log('+++++++++++++++', this.testPaper, );
this.noAnswerList = this.getNoAnswerList() this.noAnswerList = this.getNoAnswerList()
this.haveAnswerList = this.gethaveAnswerList() this.haveAnswerList = this.gethaveAnswerList()
},300)
}, },
clickOption(item, index) { clickOption(item, index) {
// debounce(async () => {
console.log('item', item, index, this.curIndex1); console.log('item', item, index, this.curIndex1);
if (this.curQuestion.type == 0) { if (this.curQuestion.type == 0) {
this.questionList[this.curIndex1].answerIds = [item.id] this.questionList[this.curIndex1].answerIds = [item.id]
@@ -431,6 +439,7 @@
console.log('this.testPaper.',this.noAnswerList,this.haveAnswerList); console.log('this.testPaper.',this.noAnswerList,this.haveAnswerList);
this.saveQuestAnswer(this.examId,this.curIndex1+1,this.curQuestion.answerIds.join(',')) this.saveQuestAnswer(this.examId,this.curIndex1+1,this.curQuestion.answerIds.join(','))
console.log('noAnswerList', this.noAnswerList) console.log('noAnswerList', this.noAnswerList)
// },300)
}, },
setDesc() { setDesc() {
const letterArr = [] const letterArr = []

View File

@@ -10,8 +10,8 @@
<view class="item " v-for="(item, index) in taskList" @click="clickReply(item)"> <view class="item " v-for="(item, index) in taskList" @click="clickReply(item)">
<view class="leve1 flex_box"> <view class="leve1 flex_box">
<view class="pp" style="flex: 1;" v-html="item.content"></view> <view class="pp" style="flex: 1;" v-html="item.content"></view>
<text v-if="item.scoreSuccess == '0'" class="red light"></text> <text v-if="item.scoreSuccess == 0 && classState != '2'" class="red light"></text>
<text v-else class="score" style="padding-left: 10rpx;">{{item.score}}</text> <text v-if="item.scoreSuccess > 0" class="score" style="padding-left: 10rpx;">{{item.score}}</text>
<!-- <text v-if="" class="blue light"></text> --> <!-- <text v-if="" class="blue light"></text> -->
</view> </view>
<view :class="['leve2']"> <view :class="['leve2']">
@@ -46,12 +46,18 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<!-- <view class="date">
日期{{curReplay.createTime}}
</view> -->
<view class="score" v-show="curReplay.scoreSuccess >= 1"> <view class="score" v-show="curReplay.scoreSuccess >= 1">
分数{{curReplay.score}} 分数{{curReplay.score}}
</view> </view>
<view class="score noscore" v-show="curReplay.scoreSuccess == 0"> <view class="score noscore" v-if="curReplay.scoreSuccess == 0 && (classState == '1' || classState == '3')">
未开始评分 未开始评分
</view> </view>
<view class="" style="color: #999; font-size: 26rpx; margin-top: 20rpx;" v-if="curReplay.scoreSuccess == 0 && (classState == '0' || classState == '2')">
不可评分
</view>
<template v-if="(roleCode.includes('4') || roleCode.includes('5')) && curReplay.scoreSuccess < 1 && (classState == '3' || classState == '1')"> <template v-if="(roleCode.includes('4') || roleCode.includes('5')) && curReplay.scoreSuccess < 1 && (classState == '3' || classState == '1')">
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;"> <view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
<view class="scoreBox flex_box"> <view class="scoreBox flex_box">

View File

@@ -133,6 +133,7 @@
<script> <script>
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import debounce from "@/common/debounce.js";
import { import {
mapState,mapMutations mapState,mapMutations
} from "vuex"; } from "vuex";
@@ -207,6 +208,7 @@
}) })
}, },
onHandleClickBuy(){ // 确定开始考试 onHandleClickBuy(){ // 确定开始考试
debounce(async () => {
this.protocolShow = false this.protocolShow = false
if (this.testPaper.length <= 0) { if (this.testPaper.length <= 0) {
this.pagetitle = '获取试卷' this.pagetitle = '获取试卷'
@@ -218,6 +220,7 @@
duration:3000 duration:3000
}) })
} }
},300)
}, },
// 获取服务器时间 // 获取服务器时间
async getServerTime() { async getServerTime() {
@@ -327,6 +330,7 @@
}, },
// 获取交卷数据 // 获取交卷数据
sumitAnswer() { sumitAnswer() {
debounce(async () => {
let that = this let that = this
// this.noAnswerList = await this.getNoAnswerList() // this.noAnswerList = await this.getNoAnswerList()
if(this.noAnswerList.length > 0){ if(this.noAnswerList.length > 0){
@@ -345,10 +349,13 @@
}else{ }else{
that.sumbitPaper() that.sumbitPaper()
} }
},300)
}, },
// q请求提交试卷 // q请求提交试卷
sumbitPaper(ids) { sumbitPaper(ids) {
uni.showLoading({
title:'正在交卷'
})
let that = this let that = this
$http.request({ $http.request({
url: "common/classExam/submitExamPaper", url: "common/classExam/submitExamPaper",
@@ -416,6 +423,7 @@
this.haveAnswerList = this.gethaveAnswerList() this.haveAnswerList = this.gethaveAnswerList()
}, },
showNextQuestion() { showNextQuestion() {
debounce(async () => {
// 下一题 // 下一题
this.curIndex1++ this.curIndex1++
// this.curQuestion.answerIds = [] // this.curQuestion.answerIds = []
@@ -426,8 +434,10 @@
// console.log('+++++++++++++++', this.testPaper, ); // console.log('+++++++++++++++', this.testPaper, );
this.noAnswerList = this.getNoAnswerList() this.noAnswerList = this.getNoAnswerList()
this.haveAnswerList = this.gethaveAnswerList() this.haveAnswerList = this.gethaveAnswerList()
},300)
}, },
clickOption(item, index) { clickOption(item, index) {
// debounce(async () => {
console.log('item', item, index, this.curIndex1); console.log('item', item, index, this.curIndex1);
if (this.curQuestion.type == 0) { if (this.curQuestion.type == 0) {
this.testPaper[this.curIndex1].answerIds = [item.id] this.testPaper[this.curIndex1].answerIds = [item.id]
@@ -454,6 +464,7 @@
console.log('this.testPaper.',this.testPaper.id); console.log('this.testPaper.',this.testPaper.id);
this.saveQuestAnswer(this.examId,this.curIndex1+1,this.curQuestion.answerIds.join(',')) this.saveQuestAnswer(this.examId,this.curIndex1+1,this.curQuestion.answerIds.join(','))
console.log('noAnswerList', this.noAnswerList) console.log('noAnswerList', this.noAnswerList)
// },300)
}, },
setDesc() { setDesc() {
const letterArr = [] const letterArr = []
@@ -549,6 +560,9 @@
icon: 'none', icon: 'none',
duration: 3000 duration: 3000
}) })
setTimeout(()=>{
this.goToClass()
},1000)
}); });
}, },
giveZero() { giveZero() {

View File

@@ -270,7 +270,7 @@
}, },
//页面显示 //页面显示
onShow() { onShow() {
this.closeMusic() // this.closeMusic()
this.getCountyCode() this.getCountyCode()
this.getSettlement() this.getSettlement()
}, },