班级作业-2增加提示
This commit is contained in:
@@ -301,7 +301,7 @@
|
||||
<view v-if="taskList.length > 0 ">
|
||||
<view class="submitRecode">
|
||||
<view class="newBox">
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
|
||||
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item,index)">
|
||||
<view class="leve1 flex_box flex_between">
|
||||
<text style="flex: 1;">{{item.title}}</text>
|
||||
<view class="btn1" @click.stop="changeZheDie(item, index)">
|
||||
@@ -343,7 +343,8 @@
|
||||
</template>
|
||||
<template
|
||||
v-if="!item.reply && thisClass.state == '1'">
|
||||
<text class="no">未提交答案 点击开始答题</text>
|
||||
<text class="no" v-if="index+1<=currentStudyNumber">未提交答案 点击开始答题</text>
|
||||
<text class="no" v-else style="color: #a0a1a7;">暂未开始学习</text>
|
||||
</template>
|
||||
<template
|
||||
v-if="!item.reply && (thisClass.state == '2' || thisClass.state == '3')">
|
||||
@@ -563,6 +564,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentStudyNumber:0,
|
||||
courseActiveStyle:{
|
||||
background:'#fff',
|
||||
color:'#666',
|
||||
@@ -1480,7 +1482,7 @@
|
||||
|
||||
},
|
||||
// 点击作业或者医案,进入详细介绍
|
||||
clickTask(item) {
|
||||
clickTask(item,index) {
|
||||
// var options = JSON.stringify(item)
|
||||
if (this.tijiaoTitleId == 2) {
|
||||
// 进入的是心得
|
||||
@@ -1489,9 +1491,12 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
if(index+1<=this.currentStudyNumber){
|
||||
uni.navigateTo({
|
||||
url: `/pages/miniClass/taskDetail?id=${item.id}&classState=${this.thisClass.state}`
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
delClass() {
|
||||
var that = this
|
||||
@@ -1939,6 +1944,17 @@
|
||||
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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user