This commit is contained in:
@fawn-nine
2024-09-20 17:32:09 +08:00
parent f8f03010c7
commit 7a87130202
3 changed files with 311 additions and 258 deletions

View File

@@ -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/";

View File

@@ -46,38 +46,38 @@
</view>
<!-- v-if="thisClass.state == '2'" -->
<template v-if="isHave">
<view class="pingfenBox testBox" v-if="thisClass.state == '2'">
<view class="pingfenBox testBox" v-if="thisClass.state == '3' || thisClass.state == '2'">
<view class="scoreTitle">
<view class="titles flex_box">
<text>成绩</text>
<!-- <uni-icons type="help" size="18" color="#fff"
@click="showTestTips = true"></uni-icons> -->
<text></text><uni-icons type="help" size="18" color="#fff"
@click="showTestTips = true"></uni-icons>
</view>
</view>
<!-- v-if="thisClass.state == '3'" -->
<view class="optionsBox">
<!-- v-show="thisClass.state == '2'" -->
<view class="chengji zong" style="text-align: center;">
<view class="chengji zong" style="text-align: center;" v-if="this.classModel.isExam == 1 && paperList.length > 0 || this.classModel.isExam == 0 ">
<view style="margin-top: 20rpx;">总成绩
<text class="scoreNumber greenScore">{{performanceScore.userScore}}</text>
<view class="">
<view class="" style="margin: 20rpx 0;">
<text class="c999">{{performanceScore.examScore}}分考试分 <uni-icons type="eye"
<view class="" style="margin: 10rpx 0;">
<text class="c999" v-if="performanceScore.examScore">{{performanceScore.examScore}}分考试分 <uni-icons type="eye"
size="20" color="#999" @click="showPaperList = true"></uni-icons></text>
<text class="c999">{{performanceScore.usualScore}}分平时表现分</text>
<text v-if="performanceScore.examScore && performanceScore.usualScore"></text>
<text class="c999" v-if="performanceScore.usualScore"> {{performanceScore.usualScore}}分平时表现分</text>
</view>
</view>
</view>
<view>
<view v-if="performanceScore.userScore >= 60">
恭喜您获得
<text class="yellowScore" v-if=" performanceScore.userScore >= 70"> A </text>
<text class="blueScore" v-else-if="performanceScore.userScore >= 60 && performanceScore.userScore < 70"> B </text>
<text class="small_btn border_radius_10 zhengshu" @click="showSubmit">{{certificate && certificate.id ? '查看证书' : '生成证书'}}</text>
<text class="blueScore"
v-else-if="performanceScore.userScore >= 60 && performanceScore.userScore < 70"> B
</text>
<text class="small_btn border_radius_10 zhengshu"
@click="showSubmit">{{certificate && certificate.id ? '查看证书' : '生成证书'}}</text>
</view>
<template v-if="performanceScore.userScore < 60">
<view class="flex_box flex_center align-items_box">
<text style="margin-top: 20rpx; text-align: center;">很遗憾您的成绩未达标</text>
<view class="" style="margin-top: 20rpx; text-align: center;"
<view class="flex_box flex_center align-items_box" style="justify-content: center;">
<text style="text-align: center;">很遗憾您的成绩未达标</text>
<view class="" style="text-align: center;"
v-if="newCLass && newCLass.id">
<text class="small_btn chongxiu border_radius_10"
@click="onPageJump('/pages/miniClass/classInfo',newCLass.id)">加入新班级重修</text>
@@ -85,16 +85,7 @@
</view>
</template>
</view>
</view>
</view>
<view class="pingfenBox testBox" v-if="(thisClass.state == '3') && classModel.isExam == 1">
<view class="scoreTitle">
<view class="titles flex_box">
<text>笔试分</text><uni-icons type="help" size="18" color="#fff"
@click="showTestTips = true"></uni-icons>
</view>
</view>
<view class="optionsBox" v-if="thisClass.state == '3'">
<view class="optionsBox" v-if="thisClass.state == '3' && classModel.isExam == 1" style="margin-top: 20rpx;">
<view class=" ">
<view class="">
<!-- -->
@@ -119,23 +110,25 @@
style="color: #666; justify-content: space-around !important">
<view class="flex_box align-items_box">
<text><text class="PM_font mainTxt"
style="font-size: 60rpx; ">{{paperSore}}</text>
</text>
<view class="">
<h3>笔试成绩</h3>
</view>
<view>
<text class="PM_font mainTxt"
style="font-size: 60rpx; color: #55aaff !important;">{{paperSore}}</text>
</view>
<uni-icons type="eye" size="20" color="#999"
@click="showPaperList = true"></uni-icons>
</view>
<view class="" v-if="paperList.length == 1">
<text class="small_btn retake border_radius_10" @click="goTest()">再考一次</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="pingfenBox"
v-if="thisClass.state != '0' && tijiaoTitleList.length > 0">
<view class="pingfenBox" v-if="thisClass.state != '0' && tijiaoTitleList.length > 0">
<view class="scoreTitle">
<view class="titles flex_box">
<text>表现分</text><uni-icons type="help" size="18" color="#fff"
@@ -167,7 +160,8 @@
</view>
<view v-if="classModel.isExam == 1 && thisClass.state == '2'">
<text class="ciyao">考试分</text>
<text class="ciyao"><i class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view>
</view>
</view>
@@ -258,16 +252,16 @@
<view class="courseTab border_radius_10" v-if="questionsList.length > 1">
<view class="flex_box flex_between">
<!-- <view > -->
<text
:class="['item','border_radius_10',curCourseId == item.id ? 'cur' :'']"
@click="clickCourseTab(index,item.id)"
v-for="(item, index) in tabCourseList" :key="index">{{item.title}}</text>
<text :class="['item','border_radius_10',curCourseId == item.id ? 'cur' :'']"
@click="clickCourseTab(index,item.id)" v-for="(item, index) in tabCourseList"
:key="index">{{item.title}}</text>
<!-- </view> -->
</view>
</view>
<!-- 班内任务 --><!-- 医案 --> <!-- 心得 --><!-- 思考题 -->
<view class="" v-if="tijiaoTitleId != '3'">
<view class="" style="margin-bottom: 20rpx;" v-if="tijiaoTitleId == 2 && thisClass.state == '1' && roleCode.includes('0')">
<view class="" style="margin-bottom: 20rpx;"
v-if="tijiaoTitleId == 2 && thisClass.state == '1' && roleCode.includes('0')">
<view class="noanser">
<view class="">
<text>快来添加一条记录吧~</text>
@@ -344,17 +338,21 @@
<u-divider text="暂无数据"></u-divider>
</view> -->
</view>
<template v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length > 0">
<template
v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length > 0">
<view>
<view class="submitRecode questionbox">
<view class="newBox">
<view class="item " v-for="(item, index) in questionsList[curCourseIndex].chapterList"
@click="jumpToVideoPage(item)"
>
<view class="item "
v-for="(item, index) in questionsList[curCourseIndex].chapterList"
@click="jumpToVideoPage(item)">
<view class=" flex_box">
<view class="pp" style="flex: 1; font-size: 28rpx;" v-html="item.title"></view>
<text v-if="item.reply == null" style="color: #ff9277; font-size: 26rpx;">未作答</text>
<text v-else class="" style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text>
<view class="pp" style="flex: 1; font-size: 28rpx;" v-html="item.title">
</view>
<text v-if="item.reply == null"
style="color: #ff9277; font-size: 26rpx;">未作答</text>
<text v-else class=""
style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text>
</view>
<!-- <view class="questJUmp">前往所在章节</view> -->
</view>
@@ -362,7 +360,8 @@
</view>
</view>
</template>
<view class="" v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length == 0">
<view class=""
v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length == 0">
<u-divider text="本门课程暂无思考题可提交"></u-divider>
</view>
</view>
@@ -492,11 +491,14 @@
</view>
<view class="flex_box align-items_box item">
<text class="mr20rpx">证书照片</text>
<image @click="preveImg(submitInfo.photo)" class="mr20rpx" v-if="submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null"
<image @click="preveImg(submitInfo.photo)" class="mr20rpx"
v-if="submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null"
:src="submitInfo.photo" mode="widthFix" style="width:100rpx; height:140rpx;"></image>
<text class="mr20rpx" v-else>未上传</text>
<text class="small_btn border_radius_10" v-if="!submitInfo.photo || submitInfo.photo != '' || submitInfo.photo != null"
@click="onPageJump('/pages/mine/userInfo/persData')" style="display: block; height: 30px;">{{submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null ? '去修改' : '去上传'}}</text>
<text class="small_btn border_radius_10"
v-if="!submitInfo.photo || submitInfo.photo != '' || submitInfo.photo != null"
@click="onPageJump('/pages/mine/userInfo/persData')"
style="display: block; height: 30px;">{{submitInfo.photo && submitInfo.photo != '' && submitInfo.photo != null ? '去修改' : '去上传'}}</text>
</text>
</view>
</view>
@@ -959,8 +961,10 @@
},
// 全角字符串转半角
async convertToHalfWidth(str) {
const fullWidthChars = "!"#$%&'()*+,-./【】0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
const halfWidthChars = "!\"#$%&'()*+,-./[]0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
const fullWidthChars =
"!"#$%&'()*+,-./【】0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
const halfWidthChars =
"!\"#$%&'()*+,-./[]0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
let result = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
@@ -980,7 +984,9 @@
await $http.request({
url: "common/class/getUserCourseBuy",
method: "POST",
data: {"classId": this.classId},
data: {
"classId": this.classId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
@@ -1187,8 +1193,8 @@
},
// 生成证书
createCertificate() {
if(this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != ''
&& this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != ''){
if (this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != '' &&
this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != '') {
} else {
uni.showModal({
@@ -1276,13 +1282,13 @@
this.getNewCLassInfo()
} else {
// >= 60
if(this.thisClass.state == '2' ){
// if (this.thisClass.state == '2') {
var certificate = await this.getCertificateInfo()
if (certificate && certificate.length > 0 && certificate[0].id) {
this.certificate = certificate[0]
}
console.log('this.certificate', certificate);
}
// }
}
} else {
@@ -2048,7 +2054,8 @@
margin-bottom: 20rpx;
}
.zhengshu { margin-left: 20rpx;
.zhengshu {
margin-left: 20rpx;
color: #ffaa7f;
font-size: 28rpx;
border: 1px solid #ffaa7f
@@ -2066,9 +2073,11 @@
.blueScore {
color: #00aaff;
}
.yellowScore {
color: #ffaa00;
}
.redScore {
color: #ff8a8c;
}
@@ -2119,12 +2128,19 @@
}
}
}
.stickyyy{padding: 20rpx; color: #fff; background-color: #ff9277;}
.stickyyy {
padding: 20rpx;
color: #fff;
background-color: #ff9277;
}
.chengji {
padding-top: 20rpx;
margin-top: 20rpx;
border-top: 1px solid #eee;
}
.chengji.zong {
margin-top: 0;
padding-top: 0;
@@ -2168,7 +2184,12 @@
}
}
.questJUmp{font-size: 28rpx; text-align: center; color: #55aaff;}
.questJUmp {
font-size: 28rpx;
text-align: center;
color: #55aaff;
}
.submitRecode {
// padding: 20rpx;
@@ -2248,9 +2269,13 @@
}
}
}
.questionbox {
.leve1{ border: none !important}
.leve1 {
border: none !important
}
}
.zhedie {
@include bov(2);
}
@@ -2309,15 +2334,32 @@
}
}
.courseTab {
margin-bottom: 20rpx; padding: 8rpx;
background:#c6d1d5; line-height: 50rpx; overflow: hidden;
.item{ display: block; text-align: center; height: 50rpx; font-size: 26rpx; width: 100%;
padding:0 6rpx;@include toe(); box-sizing: border-box;
margin-bottom: 20rpx;
padding: 8rpx;
background: #c6d1d5;
line-height: 50rpx;
overflow: hidden;
.item {
display: block;
text-align: center;
height: 50rpx;
font-size: 26rpx;
width: 100%;
padding: 0 6rpx;
@include toe();
box-sizing: border-box;
// text{ }
}
.item.cur{ @include mshadow(6px,1);background-color: #fff; }
.item.cur {
@include mshadow(6px, 1);
background-color: #fff;
}
}
.mainContent {
color: #333;
padding: 0 20rpx;
@@ -2500,12 +2542,15 @@
}
}
}
.alcentertt {
justify-content: space-around !important;
}
.alcenterss {
justify-content: center !important;
}
.otherItems {
// border: 1px solid #dadada;
padding: 20rpx;
@@ -2624,6 +2669,7 @@
}
.optionsBox {}
.btn_box_certificate {
margin-top: 70rpx;
padding-bottom: 20rpx;
@@ -2636,17 +2682,24 @@
border-radius: 50rpx;
}
}
.retake {
border: 1px solid #55aa00;
color: #55aa7f;
}
.mr20rpx {
margin-right: 20rpx;
}
.userinfoPup {
.tips {
// .item{justify-content: space-around;}
}
.small_btn{color: #55aaff; border: #55aaff 1px solid ;}
.small_btn {
color: #55aaff;
border: #55aaff 1px solid;
}
}
</style>

View File

@@ -75,7 +75,7 @@
</view>
<text class="score">{{item.examScore}}</text>
</view>
<view v-if="thisClass.state == '2'">
<view >
<view class="ciyao">
总分
</view>
@@ -84,7 +84,7 @@
</template>
</template>
<!-- -->
<template v-if="classModel.isExam == 1 && thisClass.state == '2'" >
<template v-if="classModel.isExam == 1 && item.classExamUsers.length > 0" >
<view v-if="item.userScore >= 60 && item.userScore < 70"
:class="['PM_font','zhengshu','Bzheng']"
></view>