暂存
This commit is contained in:
@@ -774,7 +774,6 @@
|
|||||||
|
|
||||||
if (v.type == 0) {
|
if (v.type == 0) {
|
||||||
//免费
|
//免费
|
||||||
|
|
||||||
this.$http
|
this.$http
|
||||||
.request({
|
.request({
|
||||||
url: this.urlList.startStudyForMF,
|
url: this.urlList.startStudyForMF,
|
||||||
@@ -795,7 +794,14 @@
|
|||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
});
|
});
|
||||||
} else {
|
} else if(v.type == 2 && this.userMsg.vip != 1 ){
|
||||||
|
uni.showModal({
|
||||||
|
title:'提示',
|
||||||
|
content:'当前课程目录是超V专享,开通超V可观看',
|
||||||
|
confirmText:'好的',
|
||||||
|
showCancel:false
|
||||||
|
})
|
||||||
|
}else {
|
||||||
this.$http
|
this.$http
|
||||||
.request({
|
.request({
|
||||||
url: this.urlList.goodsList,
|
url: this.urlList.goodsList,
|
||||||
|
|||||||
@@ -24,24 +24,20 @@
|
|||||||
<view :class="['courseItemleve1',userMsg.vip != 0 ? 'isVip' :'']"
|
<view :class="['courseItemleve1',userMsg.vip != 0 ? 'isVip' :'']"
|
||||||
v-for="(item1, index1) in item.courseList" :key="index1"
|
v-for="(item1, index1) in item.courseList" :key="index1"
|
||||||
@click="onPageJump('/pages/course/courseDetail',item1.id)">
|
@click="onPageJump('/pages/course/courseDetail',item1.id)">
|
||||||
<view class="vipSee" v-if="userMsg.vip != 0">
|
<view class="vipSee" v-if="userMsg.vip != 0 && userMsg.vip != 3">
|
||||||
<text>VIP畅学权益生效中</text>
|
<text>VIP畅学权益生效中</text>
|
||||||
</view>
|
</view>
|
||||||
<view :class="['text','courseItem','flexbox']"><u-icon name="pushpin" color="#2979ff"
|
<view :class="['text','courseItem','flexbox']"><u-icon name="pushpin" color="#2979ff"
|
||||||
size="24"></u-icon><text style="font-size: 32rpx;">{{item1.title}}</text>
|
size="24"></u-icon><text style="font-size: 32rpx;">{{item1.title}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<template v-if="item1.courseCatalogueEntityList && item1.courseCatalogueEntityList.length > 0">
|
<template v-if="item1.courseCatalogueEntityList && item1.courseCatalogueEntityList.length > 0">
|
||||||
|
|
||||||
|
|
||||||
<view class="" v-for="(item2, index2) in item1.courseCatalogueEntityList" :key="index2">
|
<view class="" v-for="(item2, index2) in item1.courseCatalogueEntityList" :key="index2">
|
||||||
|
|
||||||
<view :class="['priceItem', item2.isBuy == 1 && userMsg.vip == 0 ? 'isBuy' : '']">
|
<view :class="['priceItem', item2.isBuy == 1 && userMsg.vip == 0 ? 'isBuy' : '']">
|
||||||
|
|
||||||
<text class="text mname" v-if="item1.courseCatalogueEntityList.length > 1"
|
<text class="text mname" v-if="item1.courseCatalogueEntityList.length > 1"
|
||||||
style="font-weight: bold; margin-right: 10rpx;">【{{item2.title}}】</text>
|
style="font-weight: bold; margin-right: 10rpx;">【{{item2.title}}】</text>
|
||||||
<view class="pbox flexbox">
|
<view class="pbox flexbox">
|
||||||
|
<text v-if="item2.type == 2" style="border: #ffb861 1px solid ; border-radius: 40rpx; font-size: 28rpx; display:inline-block; width: 40rpx;
|
||||||
|
height: 40rpx; text-align: center; line-height: 40rpx; color: #ffb861;">V</text>
|
||||||
<text class="text">半年:¥{{item2.halfFee}} 元</text><text class="text"
|
<text class="text">半年:¥{{item2.halfFee}} 元</text><text class="text"
|
||||||
style="margin-left: 20rpx;">整年:¥{{item2.fee}} 元</text>
|
style="margin-left: 20rpx;">整年:¥{{item2.fee}} 元</text>
|
||||||
<text class="buybtns" @click.stop="goBuy(item2)"
|
<text class="buybtns" @click.stop="goBuy(item2)"
|
||||||
@@ -341,8 +337,17 @@
|
|||||||
closePup(e) {
|
closePup(e) {
|
||||||
this.pricespop = false
|
this.pricespop = false
|
||||||
},
|
},
|
||||||
goBuy(val) {
|
goBuy(val) {
|
||||||
console.log(val, 'val')
|
console.log(val, 'val')
|
||||||
|
if(val.type == 2 && this.userMsg.vip != 1){
|
||||||
|
uni.showModal({
|
||||||
|
title:'提示',
|
||||||
|
content:'当前课程目录是超V专享,开通超V可观看',
|
||||||
|
confirmText:'好的',
|
||||||
|
showCancel:false
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "sociology/product/getProductListForCourse",
|
url: "sociology/product/getProductListForCourse",
|
||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
|||||||
@@ -1,29 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<view style="
|
<view style=" position: relative;
|
||||||
padding: 0 0;
|
padding: 0 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
;
|
;
|
||||||
" class="commonPageeeee commonPageBox">
|
" class="commonPageeeee commonPageBox">
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
|
<u-icon @click="goSetting" class="setIcon" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
||||||
|
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#258feb" size="28"></u-icon>
|
||||||
<view class="bg_top flex_box flex_between">
|
<view class="bg_top flex_box flex_between">
|
||||||
<view class="per_mes">
|
<view class="per_mes">
|
||||||
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar != null"
|
<view class="per_mes_user">
|
||||||
class="per_mes_img color_shandow"></image>
|
<view class="" style="width: 100rpx; height: 100rpx; display: inline-block;">
|
||||||
<view class="user_vip_box">
|
<image @click="goUserInfo" :src="userMes.avatar" v-if="userMes.avatar != null"
|
||||||
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
|
class="per_mes_img color_shandow"></image>
|
||||||
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
|
<image src="@/static/icon/home_icon_logo.png" v-if="userMes.avatar == null"
|
||||||
<view v-if="userMes.vip == 2" class="user_vip">吴门医述VIP</view>
|
class="per_mes_img color_shandow"></image>
|
||||||
|
</view>
|
||||||
|
<view class="user_vip_box ">
|
||||||
|
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
|
||||||
|
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
|
||||||
|
<view v-if="userMes.vip == 2" class="user_vip">吴门医述VIP</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<image src="@/static/icon/home_icon_logo.png" v-if="userMes.avatar == null"
|
|
||||||
class="per_mes_img color_shandow"></image>
|
|
||||||
|
|
||||||
<view class="userInfoBox" style="width: calc(100% - 220rpx)">
|
<view class="userInfoBox" style="width: calc(100% - 220rpx)">
|
||||||
<template>
|
<template>
|
||||||
<view class="name">昵称:{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
|
<view class="name">昵称:{{ userMes.nickname ? userMes.nickname : "未设置" }}</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="userMes.tel">
|
<template v-if="userMes.tel">
|
||||||
<view class="phone">手机号:({{ userMes.tel }})</view>
|
<view class="phone">手机号:({{ userMes.tel }})</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -39,12 +43,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<br clear="both" />
|
<br clear="both" />
|
||||||
</view>
|
</view>
|
||||||
<u-icon @click="goSetting" class="setIcon" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
|
||||||
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#258feb" size="28"></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
||||||
|
|
||||||
|
|
||||||
<view style="
|
<view style="
|
||||||
padding: 20rpx; overflow: hidden;
|
padding: 20rpx; overflow: hidden;
|
||||||
@@ -255,7 +258,7 @@
|
|||||||
style: "color:#fff;font-size:28rpx"
|
style: "color:#fff;font-size:28rpx"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
roleObj:{},
|
roleObj: {},
|
||||||
infoShow: false, // 显示电子书相关
|
infoShow: false, // 显示电子书相关
|
||||||
showEbook: false, // 显示电子书相关
|
showEbook: false, // 显示电子书相关
|
||||||
userMes: {},
|
userMes: {},
|
||||||
@@ -274,9 +277,9 @@
|
|||||||
// type: "pageJump",
|
// type: "pageJump",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "我的证书",
|
name: "我的证书",
|
||||||
url: "/pages/certificate/certificate",
|
url: "/pages/certificate/certificate",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "购物车",
|
// name: "购物车",
|
||||||
@@ -435,9 +438,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取用户的角色信息
|
// 获取用户的角色信息
|
||||||
getUserRole(){
|
getUserRole() {
|
||||||
this.$http.post("common/class/getRoleType").then((res) => {
|
this.$http.post("common/class/getRoleType").then((res) => {
|
||||||
console.log('用户角色信息',res);
|
console.log('用户角色信息', res);
|
||||||
this.roleObj = res.result
|
this.roleObj = res.result
|
||||||
var zhurenIndex = this.pageList.findIndex(item => {
|
var zhurenIndex = this.pageList.findIndex(item => {
|
||||||
return item.name == '主任教学'
|
return item.name == '主任教学'
|
||||||
@@ -482,33 +485,33 @@
|
|||||||
console.log('班长n找到了么', n);
|
console.log('班长n找到了么', n);
|
||||||
if (!n) {
|
if (!n) {
|
||||||
var item = {
|
var item = {
|
||||||
|
|
||||||
name: "班级管理",
|
name: "班级管理",
|
||||||
url: "/pages/miniClass/MonitorClassList?type=mine",
|
url: "/pages/miniClass/MonitorClassList?type=mine",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
|
|
||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 是学员
|
// 是学员
|
||||||
if(this.roleObj.isStudent){
|
if (this.roleObj.isStudent) {
|
||||||
var n = this.pageList.find(item => {
|
var n = this.pageList.find(item => {
|
||||||
return item.name == '我的班级'
|
return item.name == '我的班级'
|
||||||
})
|
})
|
||||||
console.log('我的班级找到了么', n);
|
console.log('我的班级找到了么', n);
|
||||||
if (!n) {
|
if (!n) {
|
||||||
var item = {
|
var item = {
|
||||||
|
|
||||||
name: "我的班级",
|
name: "我的班级",
|
||||||
url: "/pages/miniClass/myClassList?type=mine",
|
url: "/pages/miniClass/myClassList?type=mine",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
|
|
||||||
}
|
}
|
||||||
this.pageList.splice(3, 0, item);
|
this.pageList.splice(3, 0, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log('获取角色信息失败');
|
console.log('获取角色信息失败');
|
||||||
})
|
})
|
||||||
@@ -518,7 +521,7 @@
|
|||||||
if (this.userInfo.id != undefined) {
|
if (this.userInfo.id != undefined) {
|
||||||
this.$http.post("common/user/getUserInfo").then((res) => {
|
this.$http.post("common/user/getUserInfo").then((res) => {
|
||||||
this.userMes = res.result;
|
this.userMes = res.result;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -581,10 +584,12 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "@/style/mixin.scss";
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
|
.per_mes_user{display: block !important;}
|
||||||
.per_mes {
|
.per_mes {
|
||||||
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 20rpx 40rpx;
|
margin: 20rpx 0;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -593,16 +598,16 @@
|
|||||||
|
|
||||||
.per_mes_img {
|
.per_mes_img {
|
||||||
// @include themeBorder(10rpx,10rpx,#4E79A3, #A6D8DC);
|
// @include themeBorder(10rpx,10rpx,#4E79A3, #A6D8DC);
|
||||||
width: 140rpx;
|
width: 100rpx;
|
||||||
height: 140rpx;
|
height: 100rpx;
|
||||||
// background-color: #fff;
|
// background-color: #fff;
|
||||||
border-radius: 140rpx;
|
border-radius: 100rpx;
|
||||||
margin: 0 0 0 0;
|
margin: 0 0 0 0;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
float: left;
|
// float: left;
|
||||||
// margin-top: 20rpx;
|
// margin-top: 20rpx;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
@@ -882,22 +887,23 @@
|
|||||||
// background: #d8f8e4 !important;
|
// background: #d8f8e4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg_top {
|
.bg_top {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
padding-top: 80rpx;
|
padding-top: 80rpx;
|
||||||
margin-bottom: 60rpx; overflow: hidden;
|
margin-bottom: 60rpx;
|
||||||
|
overflow: hidden;
|
||||||
// position: relative;
|
// position: relative;
|
||||||
|
|
||||||
.setIcon {
|
|
||||||
// position: absolute;
|
|
||||||
// right: 30rpx;
|
|
||||||
// top: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.setIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 30rpx;
|
||||||
|
}
|
||||||
.mine_box {
|
.mine_box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
padding: 0 0rpx;
|
padding: 0 0rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -986,13 +992,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user_vip_box {
|
.user_vip_box {
|
||||||
min-width: 130rpx;
|
display: block;
|
||||||
|
// min-width: 100rpx;
|
||||||
|
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
bottom: -20rpx;
|
// bottom: -20rpx;
|
||||||
display: flex;
|
// display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
view {
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_vip {
|
.user_vip {
|
||||||
|
|||||||
@@ -697,12 +697,12 @@
|
|||||||
console.log('this.classId', this.classId);
|
console.log('this.classId', this.classId);
|
||||||
this.getUserRole()
|
this.getUserRole()
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
uni.$on('refreshData', () => {
|
// uni.$on('refreshData', () => {
|
||||||
console.log('开始刷新列表数据');
|
// console.log('开始刷新列表数据');
|
||||||
this.pPage = 0
|
// this.pPage = 0
|
||||||
this.taskList = []
|
// this.taskList = []
|
||||||
this.getList()
|
// this.getList()
|
||||||
})
|
// })
|
||||||
|
|
||||||
// uni.$on('refreshUserAnswerList',() => {
|
// uni.$on('refreshUserAnswerList',() => {
|
||||||
// console.log('开始刷新用户提交列表');
|
// console.log('开始刷新用户提交列表');
|
||||||
@@ -713,8 +713,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.status != 2 && this.status != 3) {
|
if(this.tijiaoTitleId != 3){
|
||||||
this.getList()
|
if (this.status != 2 && this.status != 3) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -723,9 +725,9 @@
|
|||||||
console.log('this.tabId------', this.tabId);
|
console.log('this.tabId------', this.tabId);
|
||||||
this.getClassInfo()
|
this.getClassInfo()
|
||||||
this.getScore()
|
this.getScore()
|
||||||
this.pPage = 0
|
// this.pPage = 0
|
||||||
this.taskList = []
|
// this.taskList = []
|
||||||
this.getList()
|
// this.getList()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
@@ -859,7 +861,7 @@
|
|||||||
}
|
}
|
||||||
// return _list
|
// return _list
|
||||||
if (_list.length > 0) {
|
if (_list.length > 0) {
|
||||||
console.log('是否进入了这里666666666666');
|
console.log('是否进入了这里666666666666',this.tijiaoTitleIndex);
|
||||||
this.tijiaoTitleList = _list
|
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.tijiaoTitleId = this.tijiaoTitleList[0].id
|
||||||
@@ -889,6 +891,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 获得思考题列表及答案
|
// 获得思考题列表及答案
|
||||||
async getQuestionsList() {
|
async getQuestionsList() {
|
||||||
|
console.log('是否进入了思考题请求????????????');
|
||||||
var list = []
|
var list = []
|
||||||
await $http.request({
|
await $http.request({
|
||||||
url: "common/class/getThinkQuestionListStudent",
|
url: "common/class/getThinkQuestionListStudent",
|
||||||
@@ -1113,7 +1116,7 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log('考试周班状态下,学员的信息', this.classId, res, );
|
// console.log('考试周班状态下,学员的信息', this.classId, res, );
|
||||||
// this.userMsg = res.user
|
// this.userMsg = res.user
|
||||||
// list = studentList
|
// list = studentList
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -1157,7 +1160,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/miniClass/test?classId=${this.thisClass.id}`
|
url: `/pages/miniClass/test?classId=${this.thisClass.id}&testDuration=${this.classModel.examTime}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeZheDie(item, index) {
|
changeZheDie(item, index) {
|
||||||
@@ -1276,7 +1279,7 @@
|
|||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.performanceScore = res.result
|
this.performanceScore = res.result
|
||||||
console.log('平时成绩e-------', this.performanceScore);
|
// console.log('平时成绩e-------', this.performanceScore);
|
||||||
if (this.performanceScore.userScore < 60 && this.thisClass.state == '2') {
|
if (this.performanceScore.userScore < 60 && this.thisClass.state == '2') {
|
||||||
this.getNewCLassInfo()
|
this.getNewCLassInfo()
|
||||||
} else {
|
} else {
|
||||||
@@ -1486,7 +1489,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
console.log('进入函数了吗');
|
console.log('进入函数了吗--------------------------------------');
|
||||||
this.status = 1;
|
this.status = 1;
|
||||||
if (this.loadFlag) {
|
if (this.loadFlag) {
|
||||||
console.log("有未完成的进程");
|
console.log("有未完成的进程");
|
||||||
@@ -1505,7 +1508,9 @@
|
|||||||
"myExperience": this.tijiaoTitleId != 2 ? "0" : "1", //0全部心得1我的心得 this.myExperience
|
"myExperience": this.tijiaoTitleId != 2 ? "0" : "1", //0全部心得1我的心得 this.myExperience
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
console.log('data任务/心得', data);
|
console.log('data任务/心得', this.pPage ,data);
|
||||||
|
// let that = this
|
||||||
|
const pp = this.pPage
|
||||||
$http.request({
|
$http.request({
|
||||||
url: "common/class/getClassTaskListStudent",
|
url: "common/class/getClassTaskListStudent",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -1516,27 +1521,30 @@
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
// that.pPage = 3
|
||||||
if (res.page.records.length > 0) {
|
if (res.page.records.length > 0) {
|
||||||
console.log('数据获取成功', res.page.records);
|
console.log('数据获取成功', res.page.records);
|
||||||
var lis = res.page.records
|
var lis = res.page.records
|
||||||
lis.forEach(item => {
|
lis.forEach(item => {
|
||||||
item.zhedie = false
|
item.zhedie = false
|
||||||
})
|
})
|
||||||
this.taskList = this.taskList.concat(lis)
|
this.taskList = this.taskList.concat(lis)
|
||||||
if (res.page.pages > 1) {
|
if (res.page.pages > pp) {
|
||||||
this.taskHaveMore = true
|
|
||||||
}
|
|
||||||
if (res.page.pages > this.pPage) {
|
|
||||||
this.status = 0;
|
this.status = 0;
|
||||||
} else {
|
} else {
|
||||||
this.status = 2;
|
this.status = 2;
|
||||||
}
|
}
|
||||||
|
console.log('res.page.pages > this.pPage',res.page.pages,pp,this.status);
|
||||||
} else {
|
} else {
|
||||||
this.status = 3; // 暂无数据
|
this.status = 3; // 暂无数据
|
||||||
}
|
}
|
||||||
this.loadFlag = false;
|
|
||||||
console.log('res', res);
|
console.log('res', res);
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.loadFlag = false;
|
||||||
|
},400)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log('数据获取失败.......', res);
|
console.log('数据获取失败.......', res);
|
||||||
}
|
}
|
||||||
@@ -1551,10 +1559,18 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async titleClick(item, textIndex) {
|
async titleClick(item, textIndex) {
|
||||||
|
|
||||||
console.log('进来了吗', item);
|
console.log('进来了吗', item);
|
||||||
|
if(this.loadFlag){
|
||||||
|
uni.showToast({
|
||||||
|
title:'操作太快了,休息一下吧',
|
||||||
|
icon:'none',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (item.id == '3') {
|
if (item.id == '3') {
|
||||||
this.tijiaoTitleId = item.id
|
this.tijiaoTitleId = item.id
|
||||||
|
this.tijiaoTitleIndex = textIndex
|
||||||
this.questionsList = await this.getQuestionsList()
|
this.questionsList = await this.getQuestionsList()
|
||||||
if (this.questionsList.length > 0) {
|
if (this.questionsList.length > 0) {
|
||||||
this.curCourseId = this.questionsList[this.curCourseIndex].courseEntity.id
|
this.curCourseId = this.questionsList[this.curCourseIndex].courseEntity.id
|
||||||
@@ -1562,11 +1578,8 @@
|
|||||||
return item.courseEntity
|
return item.courseEntity
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
return
|
||||||
// if (this.tijiaoTitleId == item.id) {
|
}
|
||||||
// console.log(5555555555555555, this.tijiaoTitleId,item.id);
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
this.tijiaoTitleId = item.id
|
this.tijiaoTitleId = item.id
|
||||||
this.tijiaoTitleIndex = textIndex
|
this.tijiaoTitleIndex = textIndex
|
||||||
console.log('e班内提交子按钮', this.tijiaoTitleId);
|
console.log('e班内提交子按钮', this.tijiaoTitleId);
|
||||||
|
|||||||
@@ -491,12 +491,25 @@
|
|||||||
this.severNowTime = severNowTime
|
this.severNowTime = severNowTime
|
||||||
console.log('this.endTime',this.endTime);
|
console.log('this.endTime',this.endTime);
|
||||||
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
|
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
|
||||||
|
let that = this
|
||||||
if(this.secondTimeDif > 0){
|
if(this.secondTimeDif > 0){
|
||||||
// this.setPaperEndTime({time:this.endTime})
|
// this.setPaperEndTime({time:this.endTime})
|
||||||
this.timeDif.hour = parseInt((this.secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
|
this.timeDif.hour = parseInt((this.secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
|
||||||
this.timeDif.minutes = parseInt((this.secondTimeDif % (1000 * 60 * 60)) / (1000 * 60))
|
this.timeDif.minutes = parseInt((this.secondTimeDif % (1000 * 60 * 60)) / (1000 * 60))
|
||||||
this.timeDif.second = (this.secondTimeDif % (1000 * 60)) / 1000
|
this.timeDif.second = (this.secondTimeDif % (1000 * 60)) / 1000
|
||||||
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
|
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
|
||||||
|
}else{
|
||||||
|
uni.showModal({
|
||||||
|
title:'提示',
|
||||||
|
content:'您的时间已经结束,即将返回班级',
|
||||||
|
confirmText:'好的',
|
||||||
|
showCancel:fals,
|
||||||
|
success: (res) => {
|
||||||
|
if(res.confirm){
|
||||||
|
that.goToClass()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.curQuestion = {
|
this.curQuestion = {
|
||||||
...this.questionList[this.curIndex1]
|
...this.questionList[this.curIndex1]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template style="">
|
<template style="">
|
||||||
<view class="" style="background-color: #d4eaf0; min-height: calc(100vh); padding: 20rpx;">
|
<view class="" style="background-color: #d4eaf0; min-height: calc(100vh); padding: 20rpx;">
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="正在考试" backState="2000">
|
<z-nav-bar :title="pagetitle" backState="2000">
|
||||||
<text slot="right" style="padding-right: 20rpx; font-size: 26rpx; color: #666;"
|
<text slot="right" style="padding-right: 20rpx; font-size: 26rpx; color: #666;"
|
||||||
@click="showPopup = true">考试说明</text>
|
@click="showPopup = true">考试说明</text>
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
@@ -107,6 +107,27 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-popup :show="protocolShow" mode="center" round="6" :key="3">
|
||||||
|
<view class="popup_box">
|
||||||
|
<view class="title">温馨提示</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="center">
|
||||||
|
用户您好,本次考试时间为 <text style="color: red; font-weight: bold; font-size: 30rpx;">{{testDuration}}</text> 分钟<br />
|
||||||
|
<view style="color: red; font-weight: bold"> 注: </view>
|
||||||
|
<view>
|
||||||
|
<text>①、每位学员共有两次考试的机会,考试成绩以两次成绩的最高分作为最终的卷面成绩,请认真对待每次考试;<br />
|
||||||
|
②、请在倒计时结束前完成答题,倒计时结束后将自动交卷。</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="button_box">
|
||||||
|
<u-button size="small" text="稍后再考" @click="cancelClick"></u-button>
|
||||||
|
<u-button text="开始考试" color="#258feb" size="small" @click="onHandleClickBuy"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -118,6 +139,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
testDuration:undefined, // 考试时长
|
||||||
|
protocolShow:false,
|
||||||
showPopup: false,
|
showPopup: false,
|
||||||
code: 0, // 英文code
|
code: 0, // 英文code
|
||||||
classId: undefined,
|
classId: undefined,
|
||||||
@@ -142,17 +165,16 @@
|
|||||||
haveAnswerList:[],
|
haveAnswerList:[],
|
||||||
exameResult:{},
|
exameResult:{},
|
||||||
showQuestIndex:false,
|
showQuestIndex:false,
|
||||||
secondTimeDif:undefined
|
secondTimeDif:undefined,
|
||||||
|
pagetitle:'', // 页面标题
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(e) {
|
async onLoad(e) {
|
||||||
console.log('收到得值');
|
console.log('收到得值');
|
||||||
this.classId = e.classId
|
this.classId = e.classId
|
||||||
// this.examId = e.id
|
this.testDuration = e.testDuration
|
||||||
if (this.testPaper.length <= 0) {
|
this.protocolShow = true
|
||||||
this.getTestPage()
|
this.pagetitle = '准备考试'
|
||||||
}
|
|
||||||
// this.questIndexList = await this.getNowList('add')
|
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
if (!this.isOvertime) {}
|
if (!this.isOvertime) {}
|
||||||
@@ -178,6 +200,25 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setPaperEndTime']),
|
...mapMutations(['setPaperEndTime']),
|
||||||
|
cancelClick(){
|
||||||
|
this.protocolShow = false
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/miniClass/classInfo?id=${this.classId}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onHandleClickBuy(){ // 确定开始考试
|
||||||
|
this.protocolShow = false
|
||||||
|
if (this.testPaper.length <= 0) {
|
||||||
|
this.pagetitle = '获取试卷'
|
||||||
|
this.getTestPage()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'页面发生错误,请退出后重新进入页面或联系客服人员',
|
||||||
|
icon:'none',
|
||||||
|
duration:3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取服务器时间
|
// 获取服务器时间
|
||||||
async getServerTime() {
|
async getServerTime() {
|
||||||
var time = 0
|
var time = 0
|
||||||
@@ -461,37 +502,26 @@
|
|||||||
this.endTime = res.planEndTime
|
this.endTime = res.planEndTime
|
||||||
var severNowTime = await this.getServerTime()
|
var severNowTime = await this.getServerTime()
|
||||||
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
|
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
|
||||||
if(this.secondTimeDif > 0){
|
let that = this
|
||||||
// this.setPaperEndTime({time:this.endTime})
|
if(this.secondTimeDif > 0){
|
||||||
// uni.setStorage({
|
|
||||||
// key:'paperEndTime',
|
|
||||||
// data:{
|
|
||||||
// time: this.endTime,
|
|
||||||
// examId: this.examId,
|
|
||||||
// },
|
|
||||||
// success: function () {
|
|
||||||
// console.log('时间存储成功');
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.timeDif.hour = parseInt((this.secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
|
this.timeDif.hour = parseInt((this.secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
|
||||||
this.timeDif.minutes = parseInt((this.secondTimeDif % (1000 * 60 * 60)) / (1000 * 60))
|
this.timeDif.minutes = parseInt((this.secondTimeDif % (1000 * 60 * 60)) / (1000 * 60))
|
||||||
this.timeDif.second = (this.secondTimeDif % (1000 * 60)) / 1000
|
this.timeDif.second = (this.secondTimeDif % (1000 * 60)) / 1000
|
||||||
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
|
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.setStorage({
|
uni.showModal({
|
||||||
key:'paperEndTime',
|
title:'提示',
|
||||||
data:{
|
content:'您的时间已经结束,即将返回班级',
|
||||||
time: 0,
|
confirmText:'好的',
|
||||||
examId: undefined,
|
showCancel:fals,
|
||||||
},
|
success: (res) => {
|
||||||
success: function () {
|
if(res.confirm){
|
||||||
console.log('时间存储成功');
|
that.goToClass()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('本地存储的结束时间', this.$store.state.paperEndTime);
|
|
||||||
this.curQuestion = {
|
this.curQuestion = {
|
||||||
...this.testPaper[this.curIndex1]
|
...this.testPaper[this.curIndex1]
|
||||||
}
|
}
|
||||||
@@ -501,9 +531,7 @@
|
|||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
console.log(res, '试卷', this.curQuestion)
|
console.log(res, '试卷', this.curQuestion)
|
||||||
// setTimeout(() => {
|
this.pagetitle = '正在考试'
|
||||||
// this.getClassInfo()
|
|
||||||
// }, 500)
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.errMsg,
|
title: res.errMsg,
|
||||||
@@ -570,7 +598,66 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "@/style/mixin.scss";
|
@import "@/style/mixin.scss";
|
||||||
|
.popup_box {
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
width: 85vw;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 46rpx;
|
||||||
|
color: $themeColor;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
// line-height: 46rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
// border-leradius: 6px;
|
||||||
|
border-top-left-radius: 6px;
|
||||||
|
border-top-right-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
font-size: 26rpx;
|
||||||
|
letter-spacing: 0.15rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
color: #3f3f3f;
|
||||||
|
|
||||||
|
.top {
|
||||||
|
margin: 30rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
line-height: 40rpx;
|
||||||
|
// padding:0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 26rpx;
|
||||||
|
color: #b0b0b0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.button_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.u-button {
|
||||||
|
margin-left: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-button:nth-child(1) {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.questIndx { overflow: hidden;
|
.questIndx { overflow: hidden;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user