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

@@ -17,7 +17,7 @@
</view>
<view class="mainContent" v-if="thisClass.id">
<view class="className" >
<view class="className">
<h3>{{thisClass.title}}</h3>
<text class="tuichu" v-if="thisClass.state == 0 && isHave" @click="outClass()">退出班级</text>
</view>
@@ -46,55 +46,46 @@
</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 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"
size="20" color="#999" @click="showPaperList = true"></uni-icons></text>
<text class="c999">{{performanceScore.usualScore}}分平时表现分</text>
</view>
<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: 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 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>
</view>
</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"
@@ -166,9 +159,10 @@
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</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>
</view>
<text class="ciyao">考试分</text>
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view>
</view>
</view>
</template>
@@ -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">
<view >
<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>
@@ -481,22 +480,25 @@
<view class="flex_box align-items_box item">
<text class="mr20rpx">证书姓名</text>
<text class="mr20rpx">
{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? submitInfo.name : '未设置'}}
{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? submitInfo.name : '未设置'}}
</text>
<text class="small_btn border_radius_10"
v-if="!submitInfo.name || submitInfo.name != '' || submitInfo.name != null"
@click="onPageJump('/pages/mine/userInfo/persData')" style="display: block; height: 30px;">
{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? '去修改' : '去设置'}}
v-if="!submitInfo.name || submitInfo.name != '' || submitInfo.name != null"
@click="onPageJump('/pages/mine/userInfo/persData')" style="display: block; height: 30px;">
{{submitInfo.name && submitInfo.name != '' && submitInfo.name != null ? '去修改' : '去设置'}}
</text>
</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"
:src="submitInfo.photo" mode="widthFix" style="width:100rpx; height:140rpx;"></image>
<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>
@@ -525,12 +527,12 @@
export default {
data() {
return {
buyCourseMsg:'',
buyCourseMsg: '',
fileList1: [],
questionsList:[],
curCourseId:undefined,
curCourseIndex:0,
tabCourseList:[],
questionsList: [],
curCourseId: undefined,
curCourseIndex: 0,
tabCourseList: [],
showCropper: false,
submitInfo: {
img: undefined, // 证件图
@@ -645,13 +647,13 @@
{
name: '班内心得',
id: '2'
},{
name: '思考题',
}, {
name: '思考题',
id: '3'
},
],
tijiaoTitleId: '0',
tijiaoTitleIndex:0,
tijiaoTitleIndex: 0,
taskList: [], // 任务列表
taskHaveMore: false, // 是否还有更多
myExperience: '1',
@@ -665,7 +667,7 @@
firstLoad: true, // 是否是第一次请求
blankNumber: 0,
paperList: [],
scrollTop:0,
scrollTop: 0,
bgiStyle: {
background: '#fff'
},
@@ -680,7 +682,7 @@
examId: undefined,
ingPaper: undefined, // 正在进行中的试卷信息
newCLass: undefined, // 同模型的待开班班级
certificate:undefined, // 证书
certificate: undefined, // 证书
// stickyBgColor:'#ff9277',
}
},
@@ -693,7 +695,7 @@
plus.screen.lockOrientation("portrait-primary")
// #endif
this.classId = e.id
console.log('this.classId',this.classId );
console.log('this.classId', this.classId);
this.getUserRole()
this.getUserInfo()
uni.$on('refreshData', () => {
@@ -719,7 +721,7 @@
onPullDownRefresh() {
// this.curTagIndex = 0
console.log('this.tabId------',this.tabId);
console.log('this.tabId------', this.tabId);
this.getClassInfo()
this.getScore()
this.pPage = 0
@@ -730,11 +732,11 @@
async onShow() {
console.log('this.curTagIndex', this.curTagIndex);
var ss = await this.getClassInfo()
if(this.thisClass.state == '0' && this.isHave){
if (this.thisClass.state == '0' && this.isHave) {
this.buyCourseMsg = await this.checkUserCourse()
}
// this.curTagIndex = 0
if(this.thisClass.state != '0'){
if (this.thisClass.state != '0') {
this.getScore()
}
if (this.thisClass.state == '3' || this.thisClass.state == '2') {
@@ -762,14 +764,14 @@
// var planEndTimeDate = new Date(historyPaper.planEndTime)
// paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
paperEndTime = historyPaper.planEndTime
console.log('+++++++++',paperEndTime);
console.log('+++++++++', paperEndTime);
this.examId = historyPaper.id
} else {
this.examId = undefined
paperEndTime = 0
}
severNowTime = await this.getServerTime()
console.log('//////////////', paperEndTime, severNowTime);
console.log('//////////////', paperEndTime, severNowTime);
if (severNowTime > -1 && paperEndTime - severNowTime > 0) {
var secondTimeDif = paperEndTime - severNowTime
this.timeDif.hour = parseInt((secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
@@ -783,9 +785,9 @@
}
}
if(this.thisClass.state == '2'){
if (this.thisClass.state == '2') {
var userObj = await this.getUserData()
if(userObj){
if (userObj) {
this.submitInfo.name = userObj.name
this.submitInfo.photo = userObj.photo
// this.showSubmitInfoBlank = true
@@ -822,7 +824,7 @@
console.log('是否计算tab了')
var ss = this.getBlankNumber
var qq = this.blankNumber
console.log('ss',ss,qq);
console.log('ss', ss, qq);
var list = []
if (this.thisClass.state == '0' || !this.isHave || qq == 0) {
list = this.tabList01
@@ -854,13 +856,13 @@
_list.push(this.defaultTijiaoTitleList[2])
}
if (this.classModel.isQuestion == 1) {
_list.push(this.defaultTijiaoTitleList[3])
_list.push(this.defaultTijiaoTitleList[3])
}
// return _list
if(_list.length > 0){
if (_list.length > 0) {
console.log('是否进入了这里666666666666');
this.tijiaoTitleList = _list
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex],this.tijiaoTitleIndex)
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex)
// this.tijiaoTitleId = this.tijiaoTitleList[0].id
}
// this.tabId =
@@ -887,13 +889,13 @@
},
methods: {
// 获得思考题列表及答案
async getQuestionsList(){
async getQuestionsList() {
var list = []
await $http.request({
url: "common/class/getThinkQuestionListStudent",
method: "POST",
data: {
"classId": this.classId
"classId": this.classId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
@@ -901,49 +903,49 @@
})
.then(async (res) => {
if (res.code == 0) {
if(res.getThinkQuestionListStudent.length > 0){
if (res.getThinkQuestionListStudent.length > 0) {
list = res.getThinkQuestionListStudent
}
}else{
} else {
uni.showToast({
title:res.errMsg,
icon:"none"
title: res.errMsg,
icon: "none"
})
}
}).catch(e => {
console.log('获取思考题报错',e);
console.log('获取思考题报错', e);
uni.showToast({
title:e.errMsg,
icon:"none"
title: e.errMsg,
icon: "none"
})
});
return list
},
async showSubmit() {
if(this.certificate && this.certificate.id){
if (this.certificate && this.certificate.id) {
// 已生成
uni.navigateTo({
url:'/pages/certificate/certificate'
url: '/pages/certificate/certificate'
})
}else{ // 未生成
} else { // 未生成
this.showSubmitInfoBlank = true
}
},
async getUserData() {
let that = this;
var Ss = undefined
// 获取个人信息
if (this.userInfo.id != undefined) {
await this.$http
.post('book/user/info/'+this.userInfo.id)
.then(async (res) => {
Ss = res.user;
console.log('that.userData at line 698个人中心:', res.user)
});
return Ss
}
let that = this;
var Ss = undefined
// 获取个人信息
if (this.userInfo.id != undefined) {
await this.$http
.post('book/user/info/' + this.userInfo.id)
.then(async (res) => {
Ss = res.user;
console.log('that.userData at line 698个人中心:', res.user)
});
return Ss
}
},
chooseImage() {
let that = this
@@ -959,45 +961,49 @@
},
// 全角字符串转半角
async convertToHalfWidth(str) {
const fullWidthChars = "!"#$%&'()*+,-./【】0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
const halfWidthChars = "!\"#$%&'()*+,-./[]0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
let result = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
const index = fullWidthChars.indexOf(char);
if (index!== -1) {
result += halfWidthChars[index];
} else {
result += char;
}
}
return result;
const fullWidthChars =
"!"#$%&'()*+,-./【】0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
const halfWidthChars =
"!\"#$%&'()*+,-./[]0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
let result = "";
for (let i = 0; i < str.length; i++) {
const char = str[i];
const index = fullWidthChars.indexOf(char);
if (index !== -1) {
result += halfWidthChars[index];
} else {
result += char;
}
}
return result;
},
// 检测是否已经购买了全部课程
async checkUserCourse(){
async checkUserCourse() {
var msg = ''
await $http.request({
url: "common/class/getUserCourseBuy",
method: "POST",
data: {"classId": this.classId},
data: {
"classId": this.classId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(async (res) => {
if (res.code == 0) {
if(res.msg != ''){
if (res.msg != '') {
msg = res.msg
var outputStr = await this.convertToHalfWidth(res.msg)
uni.showModal({
title:'提示',
content:`${outputStr}课程没有购买,请尽快购买班级内教学需要的课程,逾期您将被系统自动踢出班级,感谢您的理解和支持`
title: '提示',
content: `${outputStr}课程没有购买,请尽快购买班级内教学需要的课程,逾期您将被系统自动踢出班级,感谢您的理解和支持`
})
}
}
}).catch(e => {
console.log('检测是否已经购买了全部课程报错',e);
console.log('检测是否已经购买了全部课程报错', e);
});
return msg
},
@@ -1186,43 +1192,43 @@
},
// 生成证书
createCertificate(){
if(this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != ''
&& this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != ''){
createCertificate() {
if (this.submitInfo.name && this.submitInfo.name != null && this.submitInfo.name != '' &&
this.submitInfo.photo && this.submitInfo.photo != null && this.submitInfo.photo != '') {
}else{
} else {
uni.showModal({
title:'提示',
content:"真实姓名或证书照片未设置,请设置完成后再来生成证书吧",
cancelText:'稍后设置',
confirmText:'立即设置',
title: '提示',
content: "真实姓名或证书照片未设置,请设置完成后再来生成证书吧",
cancelText: '稍后设置',
confirmText: '立即设置',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url:'/pages/mine/userInfo/persData'
})
}
if (res.confirm) {
uni.navigateTo({
url: '/pages/mine/userInfo/persData'
})
}
}
})
return
}
var type = undefined
if(this.performanceScore.userScore >= 60 && this.performanceScore.userScore < 70){
if (this.performanceScore.userScore >= 60 && this.performanceScore.userScore < 70) {
type = 'B'
}else if(this.performanceScore.userScore >= 70){
} else if (this.performanceScore.userScore >= 70) {
type = 'A'
}else{
} else {
uni.showToast({
title:'您的成绩未达到证书水平,请继续努力',
title: '您的成绩未达到证书水平,请继续努力',
icon: 'none'
})
return
return
}
var data = {
"type": type, //证书类型A a证 B b证 ZK自考
"relationId": this.classId //小班id、课程id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
"type": type, //证书类型A a证 B b证 ZK自考
"relationId": this.classId //小班id、课程id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
url: "common/class/generateCertificateClass",
method: "POST",
@@ -1234,14 +1240,14 @@
.then(async (res) => {
if (res.code == 0) {
console.log('证书返回值', res);
uni.showToast({
title: '生成成功',
icon: 'none'
})
setTimeout(()=>{
this.closeManager()
this.getScore()
},300)
uni.showToast({
title: '生成成功',
icon: 'none'
})
setTimeout(() => {
this.closeManager()
this.getScore()
}, 300)
} else {
uni.showToast({
title: res.errMsg,
@@ -1274,15 +1280,15 @@
console.log('平时成绩e-------', this.performanceScore);
if (this.performanceScore.userScore < 60 && this.thisClass.state == '2') {
this.getNewCLassInfo()
}else{
} 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){
if (certificate && certificate.length > 0 && certificate[0].id) {
this.certificate = certificate[0]
}
console.log('this.certificate',certificate);
}
console.log('this.certificate', certificate);
// }
}
} else {
@@ -1299,20 +1305,20 @@
});
},
// 查询证书获得情况
async getCertificateInfo(){
async getCertificateInfo() {
var _obj = undefined
await $http.request({
url: "common/class/getUserCertificateByClassId",
method: "POST",
data: {
"classId": this.classId,
"userId": this.userInfo.id
"classId": this.classId,
"userId": this.userInfo.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then( (res) => {
.then((res) => {
if (res.code == 0) {
// this.newCLass = res.result
console.log('证书数据', res);
@@ -1381,22 +1387,22 @@
url: `${url}?classId=${classId}&type=${type}`
})
},
clickCourseTab(index, id){
if(this.curCourseIndex == index ){
clickCourseTab(index, id) {
if (this.curCourseIndex == index) {
return
}else{
} else {
this.curCourseIndex = index
this.curCourseId = id
}
},
// 跳转到播放页面
jumpToVideoPage(val){
uni.navigateTo({
url: `/pages/course/chapterDetailAndorid?navTitle=${this.questionsList[this.curCourseIndex].courseEntity.title}
jumpToVideoPage(val) {
uni.navigateTo({
url: `/pages/course/chapterDetailAndorid?navTitle=${this.questionsList[this.curCourseIndex].courseEntity.title}
&title=${val.title}&courseId=${this.questionsList[this.curCourseIndex].courseEntity.id}
&id=${val.id}&noRecored=false`,
});
});
},
// 点击作业或者医案,进入详细介绍
@@ -1548,12 +1554,12 @@
async titleClick(item, textIndex) {
console.log('进来了吗', item);
if(item.id=='3'){
if (item.id == '3') {
this.tijiaoTitleId = item.id
this.questionsList = await this.getQuestionsList()
if(this.questionsList.length > 0){
if (this.questionsList.length > 0) {
this.curCourseId = this.questionsList[this.curCourseIndex].courseEntity.id
this.tabCourseList = this.questionsList.map( item => {
this.tabCourseList = this.questionsList.map(item => {
return item.courseEntity
})
}
@@ -1748,11 +1754,11 @@
console.log('taskEdit'.item);
},
// 图片预览
preveImg(url){
preveImg(url) {
console.log('dianjile fangda tu');
uni.previewImage({
urls: [url],
current: 0
urls: [url],
current: 0
});
},
// 退出班级 // 踢出班级
@@ -1837,7 +1843,7 @@
},
})
.then(async res => {
console.log('班级信息', res);
console.log('班级信息', res);
this.refresh = false
if (res.code == 0) {
this.isHave = res.result.isJoin
@@ -1894,7 +1900,7 @@
if (this.thisClass.state != 0 && this.tabId != '3') {
this.pPage = 0
this.taskList = []
if(this.tijiaoTitleList.length > 0){
if (this.tijiaoTitleList.length > 0) {
if (this.firstLoad) {
this.firstLoad = false
this.tijiaoTitleId = this.tijiaoTitleList[this.tijiaoTitleIndex].id
@@ -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{
.yellowScore {
color: #ffaa00;
}
.redScore {
color: #ff8a8c;
}
@@ -2119,13 +2128,20 @@
}
}
}
.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{
.chengji.zong {
margin-top: 0;
padding-top: 0;
border-top: none;
@@ -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}
.questionbox {
.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;
.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;
// 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{
.alcentertt {
justify-content: space-around !important;
}
.alcenterss{
justify-content: center !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{
.mr20rpx {
margin-right: 20rpx;
}
.userinfoPup{
.tips{
.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>