合并主分支前
This commit is contained in:
@@ -6,9 +6,9 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// 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.100:9200/pb/"; // 开发用电脑
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
|
||||
@@ -10,13 +10,14 @@
|
||||
<view class="item" v-for="(item,index) in certificateList" :key="index">
|
||||
<view class="flex_box flex_between align-items_box">
|
||||
<h3 style="font-size: 28rpx;">编号:{{item.certificateNo}}</h3>
|
||||
<text style="font-size: 26rpx; color: #999;">获得时间:{{item.createTime.substring(0, 10)}}</text>
|
||||
<text class="small_btn border_radius_10"
|
||||
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
|
||||
v-if="item.certificateUrlList.length <= 0"
|
||||
@click="showSubmit(item.id)">立即获取证书</text>
|
||||
|
||||
<text style="font-size: 26rpx; color: #999;">获得时间:{{item.createTime.substring(0, 10)}}</text>
|
||||
</view>
|
||||
<view class="flex_box flex_center" v-if="item.certificateUrlList.length <= 0" >
|
||||
<text class="small_btn border_radius_10"
|
||||
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
|
||||
@click="showSubmit(item.id)">立即获取证书</text>
|
||||
</view>
|
||||
|
||||
<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">
|
||||
<image @click="preveImg(item1)" :src="item1" mode="heightFix"></image>
|
||||
|
||||
@@ -70,8 +70,10 @@
|
||||
<!-- 自考入口 没有加入班级的时候暴漏入口-->
|
||||
<view class="selfStudyBox"
|
||||
v-if="course.canzk == '1' && librayList[curIndex] && (!classInfo.id || classInfo.state == '2' || selfStudyCertificate.length >= 0)">
|
||||
|
||||
<view style="padding: 20rpx;"
|
||||
v-if="(selfStudyCertificate.length == 0 || selfStudyPaperList.length > 0 && !testingPaper.id) && (!classInfo.id || classInfo.state == '2')">
|
||||
v-if="selfStudyCertificate.length > 0 || selfStudyCertificate.length == 0 && (!classInfo.id || classInfo.state == '2')">
|
||||
|
||||
<view class="">
|
||||
<view class="" style="line-height: 40rpx; font-size: 28rpx;"
|
||||
v-if="selfStudyCertificate.length == 0">
|
||||
@@ -107,10 +109,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class=" " style="margin-top: 20rpx; text-align: center;">
|
||||
|
||||
<!-- <view class=""> -->
|
||||
<!-- {{canJoinTestTime}} -->
|
||||
<!-- {{selfStudyPaperList.length % 2}} -->
|
||||
<template v-if="selfStudyCertificate.length <= 0 && (!classInfo.id || classInfo.state == '2')">
|
||||
|
||||
<template v-if="!testingPaper.id">
|
||||
<button @click="onPageJump('/pages/selfStudy/selfStudy',courseId)"
|
||||
style="padding: 0 20rpx" type="primary"
|
||||
@@ -168,8 +172,7 @@
|
||||
>></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- {{classInfo.id}} -->
|
||||
</view>
|
||||
<view class="classEntrance" v-if="classInfo.id">
|
||||
<view class="flex_box" style="justify-content: space-between;">
|
||||
<view class="flex_box classTitleBox">
|
||||
@@ -949,6 +952,7 @@
|
||||
.then(async (res) => {
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.linkClassList = res.result
|
||||
this.classInfo = {}
|
||||
} else {
|
||||
this.linkClassList = []
|
||||
// 查询是否有所在的班级
|
||||
|
||||
@@ -11,10 +11,31 @@
|
||||
<view class="scoreBox">
|
||||
本次考试卷面成绩为:<text class="score PM_font">{{exameResult.score}} 分</text>
|
||||
</view>
|
||||
<view class="" v-if="testPaper.type == '2'" style="margin: 20rpx 0; text-align: center;" >
|
||||
<template v-if="exameResult.score >= 60 && selfStudyCertificate.length > 0">
|
||||
<view class="">
|
||||
<view class="congritulations">
|
||||
<image src="../../static/icon/xunzhang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>恭喜!您本次考试获得了自考证书,请前往 我的->我的证书查看</text>
|
||||
<view class="" style="text-align: center;">
|
||||
<text class="small_btn border_radius_10"
|
||||
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
|
||||
@click="onPageJump('/pages/certificate/certificate')">查看证书</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text>很遗憾本次考试您没有获得自考证书,祝您下次考试旗开得胜!!</text>
|
||||
</template>
|
||||
</view>
|
||||
<view class="flex_box flex_between">
|
||||
<button type="primary" v-if="testPaper.type == '2'" size="mini" @click="goToCourse">返回课程</button>
|
||||
<button type="primary" v-else size="mini" @click="goToClass">返回班级</button>
|
||||
<button type="warn" size="mini" @click="goToPaper">查看试卷</button>
|
||||
<button type="primary" v-if="testPaper.type == '2'" @click="goToCourse">返回课程</button>
|
||||
<button type="primary" v-else @click="goToClass">返回班级</button>
|
||||
<button type="warn" @click="goToPaper">查看试卷</button>
|
||||
</view>
|
||||
<view class="result_imgBox">
|
||||
<image src="../../static/jiesuan_Icon.jpg" mode="widthFix"></image>
|
||||
@@ -146,7 +167,7 @@
|
||||
step: 8, /// 步长
|
||||
// questIndexList: [],
|
||||
nowPart: 1,
|
||||
|
||||
selfStudyCertificate:[],
|
||||
maxNumber: 0,
|
||||
minNumber: 0,
|
||||
noAnswerList: [],
|
||||
@@ -187,6 +208,49 @@
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setPaperEndTime']),
|
||||
// 查询证书情况
|
||||
async getCertificateInfo() {
|
||||
var list = undefined
|
||||
await $http.request({
|
||||
url: "common/userCertificate/getUserCertificateList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"type": '', //证书类型A a证 B b证 ZK自考
|
||||
"courseId": this.courseId //课程id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code != 0) {
|
||||
uni.showToast({
|
||||
title: res.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (res.code == 0) {
|
||||
res.certificateList.forEach(item => {
|
||||
item.certificateUrl && item.certificateUrl != '' ? item
|
||||
.certificateUrlList = item.certificateUrl.split(',') : item
|
||||
.certificateUrlList = []
|
||||
})
|
||||
list = res.certificateList
|
||||
}
|
||||
console.log('证书接口请求结果', res);
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: e.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
return list
|
||||
},
|
||||
async getServerTime() {
|
||||
var time = 0
|
||||
await $http.request({
|
||||
@@ -337,7 +401,7 @@
|
||||
},300)
|
||||
},
|
||||
// q请求提交试卷
|
||||
sumbitPaper(ids) {
|
||||
async sumbitPaper(ids) {
|
||||
let that = this
|
||||
if(that.flag){
|
||||
return
|
||||
@@ -346,7 +410,7 @@
|
||||
uni.showLoading({
|
||||
title:'正在交卷'
|
||||
})
|
||||
$http.request({
|
||||
await $http.request({
|
||||
url: "common/classExam/submitExamPaper",
|
||||
method: "POST",
|
||||
data: {
|
||||
@@ -356,7 +420,7 @@
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then(async res => {
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.code == 0) {
|
||||
@@ -365,23 +429,28 @@
|
||||
title: '交卷成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout( ()=>{
|
||||
setTimeout(async ()=>{
|
||||
that.exameResult = res.examPaper
|
||||
// this.timeup()
|
||||
that.showQuestIndex = false
|
||||
that.secondTimeDif = 0
|
||||
that.isOvertime = true
|
||||
uni.setStorage({
|
||||
key:'paperEndTime',
|
||||
data:{
|
||||
time: 0,
|
||||
examId: undefined
|
||||
},
|
||||
success: function () {
|
||||
console.log('时间存储成功');
|
||||
that.isOvertime = true
|
||||
if(that.testPaper.type == '2' && that.exameResult.score >= 60) {
|
||||
// if(that.exameResult.score >= 60){
|
||||
var newCertificate = await that.getCertificateInfo()
|
||||
console.log('5555555证书资料', newCertificate);
|
||||
that.selfStudyCertificate = []
|
||||
if (newCertificate && newCertificate.length > 0) {
|
||||
newCertificate.forEach(item => {
|
||||
if (item.classId != '' && item.classId > 0) {
|
||||
// this.classCertificate.push(item)
|
||||
} else {
|
||||
that.selfStudyCertificate.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// }
|
||||
}
|
||||
},300)
|
||||
|
||||
}else{
|
||||
@@ -633,7 +702,17 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.congritulations {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
text-align: center;
|
||||
margin: 10rpx auto;
|
||||
display: block;
|
||||
image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
.questIndx { overflow: hidden;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
@@ -11,6 +11,24 @@
|
||||
<view class="scoreBox">
|
||||
本次考试卷面成绩为:<text class="score PM_font">{{exameResult.score}} 分</text>
|
||||
</view>
|
||||
<view class="" style="margin: 20rpx 0; text-align: center;">
|
||||
<template v-if="exameResult.score >= 1 && selfStudyCertificate.length > 0">
|
||||
<view class="">
|
||||
<view class="congritulations">
|
||||
<image src="../../static/icon/xunzhang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>恭喜!您本次考试获得了自考证书,请前往 我的->我的证书查看</text>
|
||||
<text class="small_btn border_radius_10"
|
||||
style="display: block;font-size: 28rpx; color: #55aaff; border:1px solid #55aaff"
|
||||
@click="onPageJump('/pages/certificate/certificate')">查看证书</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text>很遗憾本次考试您没有获得自考证书,祝您下次考试旗开得胜!!</text>
|
||||
</template>
|
||||
</view>
|
||||
<view class="flex_box flex_between">
|
||||
<button type="primary" size="mini" @click="goToClass">返回课程</button>
|
||||
<button type="warn" size="mini" @click="goToPaper">查看试卷</button>
|
||||
@@ -169,6 +187,7 @@
|
||||
showQuestIndex:false,
|
||||
secondTimeDif:undefined,
|
||||
pagetitle:'', // 页面标题
|
||||
selfStudyCertificate:[],
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
@@ -356,7 +375,7 @@
|
||||
},300)
|
||||
},
|
||||
// q请求提交试卷
|
||||
sumbitPaper(ids) {
|
||||
async sumbitPaper(ids) {
|
||||
let that = this
|
||||
if(that.flag){
|
||||
return
|
||||
@@ -365,7 +384,7 @@
|
||||
uni.showLoading({
|
||||
title:'正在交卷'
|
||||
})
|
||||
$http.request({
|
||||
await $http.request({
|
||||
url: "common/classExam/submitExamPaper",
|
||||
method: "POST",
|
||||
data: {
|
||||
@@ -375,7 +394,7 @@
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
.then(async res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 0) {
|
||||
console.log('交卷结果',res);
|
||||
@@ -383,22 +402,26 @@
|
||||
title: '交卷成功',
|
||||
icon: 'success'
|
||||
})
|
||||
setTimeout( ()=>{
|
||||
setTimeout( async ()=>{
|
||||
that.exameResult = res.examPaper
|
||||
// this.timeup()
|
||||
that.showQuestIndex = false
|
||||
that.secondTimeDif = 0
|
||||
that.isOvertime = true
|
||||
uni.setStorage({
|
||||
key:'paperEndTime',
|
||||
data:{
|
||||
time: 0,
|
||||
examId: undefined
|
||||
},
|
||||
success: function () {
|
||||
console.log('时间存储成功');
|
||||
}
|
||||
})
|
||||
if(that.exameResult.score >= 1){
|
||||
var newCertificate = await that.getCertificateInfo()
|
||||
console.log('5555555证书资料', newCertificate);
|
||||
that.selfStudyCertificate = []
|
||||
if (newCertificate && newCertificate.length > 0) {
|
||||
newCertificate.forEach(item => {
|
||||
if (item.classId != '' && item.classId > 0) {
|
||||
// this.classCertificate.push(item)
|
||||
} else {
|
||||
that.selfStudyCertificate.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},300)
|
||||
}else{
|
||||
@@ -476,6 +499,11 @@
|
||||
console.log('noAnswerList', this.noAnswerList)
|
||||
// },300)
|
||||
},
|
||||
onPageJump(url, id) {
|
||||
uni.navigateTo({
|
||||
url: `${url}?id=${id}`,
|
||||
});
|
||||
},
|
||||
setDesc() {
|
||||
const letterArr = []
|
||||
// 字母A的code值是65,但因为已经到字母D了,所以直接从69E开始循环
|
||||
@@ -573,6 +601,49 @@
|
||||
},1000)
|
||||
});
|
||||
},
|
||||
// 查询证书情况
|
||||
async getCertificateInfo() {
|
||||
var list = undefined
|
||||
await $http.request({
|
||||
url: "common/userCertificate/getUserCertificateList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"type": '', //证书类型A a证 B b证 ZK自考
|
||||
"courseId": this.courseId //课程id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code != 0) {
|
||||
uni.showToast({
|
||||
title: res.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (res.code == 0) {
|
||||
res.certificateList.forEach(item => {
|
||||
item.certificateUrl && item.certificateUrl != '' ? item
|
||||
.certificateUrlList = item.certificateUrl.split(',') : item
|
||||
.certificateUrlList = []
|
||||
})
|
||||
list = res.certificateList
|
||||
}
|
||||
console.log('证书接口请求结果', res);
|
||||
uni.hideLoading()
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: e.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
return list
|
||||
},
|
||||
giveZero() {
|
||||
// 没有完成完成考试,记为0分
|
||||
},
|
||||
@@ -620,6 +691,17 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
.congritulations {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
text-align: center;
|
||||
margin: 10rpx auto;
|
||||
display: block;
|
||||
image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
.popup_box {
|
||||
padding-bottom: 20rpx;
|
||||
width: 85vw;
|
||||
|
||||
Reference in New Issue
Block a user