[200~1.兼容中国台湾、中国香港手机号码

This commit is contained in:
liuyuan
2025-07-10 14:29:44 +08:00
parent c7bab5afb4
commit f71ab1b442
27 changed files with 5393 additions and 4190 deletions

View File

@@ -18,7 +18,15 @@
<view class="mainContent" v-if="thisClass.id">
<view class="className">
<h3>{{thisClass.title}}</h3>
<view>
<h3>{{thisClass.title}}</h3>
<span v-if="examStartTime&&examEndTime" style=" font-size: 26rpx; color: #999; font-weight: normal; display: block; padding-top: 10rpx; line-height: 34rpx;">
学习日期{{thisClass.startTime.substring(0,10)}} {{thisClass.studyEndTime.substring(0,10)}}<br/>
考试周日期{{examStartTime.substring(0,10)}} {{examEndTime.substring(0,10)}}
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">距离考试周开始还有{{examEndDays}}</b>
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">(考试周开始后无法提交答案)</b>
</span>
</view>
<text class="tuichu" v-if="thisClass.state == '0' && isHave" @click="outClass()">退出班级</text>
</view>
<view class="otherItems flex_box">
@@ -168,11 +176,6 @@
<text class="ciyao"><i
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> -->
</view>
</view>
</template>
@@ -207,9 +210,6 @@
<view class="" v-show="courses.length == 0">
<u-divider text="暂无课程"></u-divider>
</view>
<!-- <view class="" v-if="thisClass.content != ''">
<text class="adminName">教学目标/班级简介</text>
</view> -->
<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
<view class="qrcode" v-if="thisClass.qrcode != ''">
@@ -223,7 +223,6 @@
<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="newBox flexbox">
@@ -254,8 +253,6 @@
<u-divider text="暂无学员加入"></u-divider>
</view>
</template>
<!-- {{getTijiaoTitleList}} -->
<!-- 班内提交 -->
<view class="" v-if="tabId == '3' && thisClass.state != '0' && isHave">
<view class="flex_box tijiaoTitle">
@@ -296,8 +293,7 @@
</view>
</radio-group>
</view>
<!-- <uni-section class="mb-10 nobg" title="任务列表" type="line"></uni-section> -->
<view v-if="taskList.length > 0 ">
<view class="submitRecode">
<view class="newBox">
@@ -321,9 +317,6 @@
<view class="score" v-if="item.scoreSuccess == 0">
等待评分
</view>
<!-- <view class="score" v-if="item.scoreSuccess > 0 && item.scoreSuccess ">
正在评分
</view> -->
<view class="score" v-if="item.scoreSuccess >= 3">
分数{{item.score}}
</view>
@@ -338,7 +331,6 @@
<text class="pIng" v-if="item.otherInfo[0].scoreSuccess < 3 && item.otherInfo[0].scoreSuccess > 0">正在评分</text>
<view class="" v-if="item.otherInfo[0].scoreSuccess >2">
<text class="score" >{{item.otherInfo[0].score}} </text>
<!-- <text style="color: #999; padding-left: 10rpx; font-size: 26rpx;"></text> -->
</view>
</template>
<template
@@ -360,9 +352,6 @@
<u-divider v-show="status == 2" text="已加载全部"></u-divider>
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
<u-divider v-show="status == 1" text="加载中..."></u-divider>
<!-- <view class="" v-else>
<u-divider text="暂无数据"></u-divider>
</view> -->
</view>
<template
v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length > 0">
@@ -380,8 +369,6 @@
<text v-if="thisClass.state == '2' || thisClass.state == '3'" style="color: #999; font-size: 26rpx;">已不可作答</text>
</template>
<template v-else>
<!-- <text class=""
style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text> -->
<text style="padding-left: 10rpx; color: #55aa7f; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 2 && thisClass.state != '2'">
等待评分
</text>
@@ -417,7 +404,6 @@
<text class="adminName">班长</text>
<view class="personbox" v-if="admins.monitor.user != null">
<text>{{admins.monitor.user.nickname != null && admins.monitor.user.nickname != '' ? admins.monitor.user.nickname : '匿名用户'}}</text>
<!-- <text v-if="admins.monitor.id">({{admins.monitor.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
@@ -425,8 +411,6 @@
<text class="adminName">副班长</text>
<view class="personbox" v-if="admins.dmonitor.user != null">
<text>{{admins.dmonitor.user.nickname != null && admins.dmonitor.user.nickname != '' ? admins.dmonitor.user.nickname : '匿名用户'}}</text>
<!-- <text>({{admins.dmonitor.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
@@ -434,21 +418,9 @@
<view class="personbox" v-if="admins.learner.user != null">
<text>{{admins.learner.user.nickname != null && admins.learner.user.nickname != '' ? admins.learner.user.nickname : '匿名用户'}}</text>
<!-- <text>({{admins.learner.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
<!-- <view class="item arryItem"><text class="adminName">记分员</text>
<template v-if="admins.counter.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
<template v-if="item.user != null">
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
<text>({{item.user.tel}}) </text>
</template>
</view>
</template>
<text v-else>暂未设置</text>
</view> -->
<view class="item arryItem"><text class="adminName">评分员</text>
<template v-if="admins.scorer.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
@@ -500,9 +472,6 @@
</view>
</template>
</template>
<!-- && thisClass.state == '2' -->
<!-- <view v-if="classModel.isExam == 1" :class="['PM_font','zhengshu',thisStudent.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']"
></view> -->
</view>
</view>
</u-popup>
@@ -515,7 +484,6 @@
<text style="color: #666;">请确认以下证书信息证书一经生成后不可更改</text>
</view>
<view class="tips border_radius_10">
<!-- {{submitInfo.name}}-{{submitInfo.photo}} -->
<view class="flex_box align-items_box item">
<text class="mr20rpx">证书姓名</text>
<text class="mr20rpx">
@@ -544,7 +512,6 @@
<view class="btn_box_certificate"><button @click="createCertificate">立即生成证书</button></view>
</view>
</u-popup>
<!-- <z-navigation></z-navigation> -->
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
@@ -556,7 +523,6 @@
import addCerInfo from "@/components/addCerInfo.vue";
import debounce from "@/common/debounce.js";
import sutdentScoreList from "./components/sutdent_score_list.vue";
// import permission from "@/js_sdk/wa-permission/permission.js"
import $http from '@/config/requestConfig.js';
import {
mapState
@@ -614,10 +580,6 @@
name: '班内课程',
id: '0'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -628,10 +590,6 @@
name: '班内课程',
id: '0'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -642,10 +600,6 @@
name: '历史提交',
id: '3'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -666,9 +620,7 @@
},
activeStyle: {
color: '#333',
fontWeight: 'bold',
// transform: 'scale(1.2)',
// backgroundColor: '#258feb'
fontWeight: 'bold'
},
classModel: {},
@@ -728,7 +680,9 @@
ingPaper: undefined, // 正在进行中的试卷信息
newCLass: undefined, // 同模型的待开班班级
certificate: undefined, // 证书
// stickyBgColor:'#ff9277',
examStartTime: '',
examEndTime: '',
examEndDays: ''
}
},
onPageScroll(e) {
@@ -743,20 +697,6 @@
console.log('this.classId', this.classId);
this.getUserRole()
this.getUserInfo()
// uni.$on('refreshData', () => {
// console.log('开始刷新列表数据');
// this.pPage = 0
// this.taskList = []
// this.getList()
// })
// uni.$on('refreshUserAnswerList',() => {
// console.log('开始刷新用户提交列表');
// this.pPage = 0
// this.taskList = []
// this.getList()
// })
},
onReachBottom() {
if(this.tijiaoTitleId != 3){
@@ -766,15 +706,10 @@
}
},
async onPullDownRefresh() {
// this.curTagIndex = 0
console.log('this.tabId------', this.tabId);
this.getClassInfo()
this.getScore()
var ll = await this.getPaperList()
// this.pPage = 0
// this.taskList = []
// this.getList()
uni.stopPullDownRefresh()
},
async onShow() {
@@ -783,7 +718,6 @@
if (this.thisClass.state == '0' && this.isHave) {
this.buyCourseMsg = await this.checkUserCourse()
}
// this.curTagIndex = 0
if (this.thisClass.state != '0') {
this.getScore()
}
@@ -807,10 +741,7 @@
var historyPaper = await this.getingPaper()
console.log('正在进行中的试卷信息', historyPaper);
this.ingPaper = historyPaper
// console.log('对比----------------', historyPaper.classId, this.classId);
if (historyPaper && historyPaper != null && historyPaper.relationId == this.classId) {
// var planEndTimeDate = new Date(historyPaper.planEndTime)
// paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
paperEndTime = historyPaper.planEndTime
console.log('+++++++++', paperEndTime);
this.examId = historyPaper.id
@@ -838,7 +769,6 @@
if (userObj) {
this.submitInfo.name = userObj.name
this.submitInfo.photo = userObj.photo
// this.showSubmitInfoBlank = true
}
}
},
@@ -906,14 +836,12 @@
if (this.classModel.isQuestion == 1) {
_list.push(this.defaultTijiaoTitleList[3])
}
// return _list
if (_list.length > 0) {
console.log('是否进入了这里666666666666',this.tijiaoTitleIndex);
this.tijiaoTitleList = _list
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex )
// this.tijiaoTitleId = this.tijiaoTitleList[0].id
}
// this.tabId =
},
getBlankNumber() {
this.blankNumber = 0
@@ -929,16 +857,11 @@
if (this.classModel.isQuestion == 1) {
this.blankNumber++
}
// if(this.classModel.isExam == 1){
// this.blankNumber++
// }
}
},
methods: {
// 获得思考题列表及答案
async getQuestionsList() {
console.log('是否进入了思考题请求????????????');
var list = []
await $http.request({
url: "common/class/getThinkQuestionListStudent",
@@ -946,7 +869,7 @@
data: {
"classId": this.classId
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
@@ -971,16 +894,10 @@
return list
},
async showSubmit() {
// if (this.certificate && this.certificate.id && this.certificate.certificateUrl.length > 3) {
// 已生成
uni.navigateTo({
url: '/pages/certificate/certificate'
})
// } else { // 未生成
// this.showSubmitInfoBlank = true
// }
// 已生成
uni.navigateTo({
url: '/pages/certificate/certificate'
})
},
async getUserData() {
let that = this;
@@ -1059,9 +976,6 @@
},
selectImage() {
this.chooseImage()
// .then(res => {
// this.submitInfo.img = res.tempFilePaths[0];
// });
},
// 选中了学生
chooseStudent(data) {
@@ -1159,14 +1073,11 @@
data: {
"classId": parseInt(this.classId)
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
// console.log('考试周班状态下,学员的信息', this.classId, res, );
// this.userMsg = res.user
// list = studentList
if (res.code == 0) {
res.result.forEach(item => {
item.task0Score ? '' : item.task0Score = 0 // 固定任务
@@ -1284,7 +1195,6 @@
var data = {
"id": this.certificate.id //证书id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
url: "common/class/generateCertificateClass",
method: "POST",
@@ -1934,11 +1844,11 @@ uni.navigateTo({
})
await $http.request({
url: "common/class/getClassInfo",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data: {
"classId": this.classId // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
@@ -1948,25 +1858,8 @@ uni.navigateTo({
if (res.code == 0) {
this.isHave = res.result.isJoin
this.thisClass = res.result.class
const nowTime = new Date().getTime();
console.log("nowTime at line 107:", nowTime, this.thisClass.startTime);
// var studyTime =
// Number(nowTime - new Date(this.thisClass.startTime).getTime()) / (1000 * 60 * 60 * 24) / 7;
// console.log("studyTime at line 108:", Math.ceil(studyTime));
// this.currentStudyNumber = Math.ceil(studyTime);
// if (this.thisClass.state == '0') {
// this.tabId = '0'
// } else {
// this.tijiaoTitleId = '0'
// this.tabId = '3'
// console.log('-------------------+');
// }
const nowTime = new Date().getTime();
this.admins.list = res.result.admins
this.admins.monitor = {}
this.admins.dmonitor = {}
@@ -1985,16 +1878,15 @@ uni.navigateTo({
this.admins.learner = item
}
if (item.role == '4') {
// console.log('this.admins.counter',this.admins.counter);
this.admins.scorer.push(item)
}
// if (item.role == '5') {
// // console.log('this.admins.counter',this.admins.counter);
// this.admins.counter.push(item)
// }
})
}
//考试周日期和剩余
this.examStartTime = res.result.examStartTime;
this.examEndTime = res.result.examEndTime;
this.examEndDays = res.result.examEndDays;
this.classModel = res.result.classModel
this.courses = res.result.courses