This commit is contained in:
@fawn-nine
2024-08-08 16:41:29 +08:00
parent 784e771fb8
commit c753ab18a3
10 changed files with 1131 additions and 384 deletions

View File

@@ -9,46 +9,41 @@
<view class="item " v-for="(item, index) in taskList" @click="clickTask(item)">
<view class="leve1 flex_box">
<text>{{item.title}}</text>
</view>
</view>
<view class="leve2 flex_box">
<view class="item">
<view class="">
<uni-icons type="checkmarkempty" size="30" color="#55aa7f"></uni-icons>
<uni-icons type="checkmarkempty" size="18" color="#55aa7f"></uni-icons>
</view>
<view class="">
已交{{item.giveHomeWorkNumber}}
已交 {{item.otherInfo.setGiveHomeWorkNumber}}
</view>
</view>
<view class="item">
<view class="">
<uni-icons type="closeempty" size="30" color="#ff878d"></uni-icons>
<uni-icons type="closeempty" size="18" color="#ff878d"></uni-icons>
</view>
<view class="">
未交{{item.noGiveHomeWorkNumber}}
未交 {{item.otherInfo.setNoGiveHomeWorkNumber}}
</view>
</view>
<view class="item">
<view class="">
<uni-icons type="auth" size="30" color="#55aa7f"></uni-icons>
<uni-icons type="auth" size="18" color="#55aa7f"></uni-icons>
</view>
<view class="">
已评分{{item.giveScoreNumber}}
已评分 {{item.otherInfo.setGiveScoreNumber}}
</view>
</view>
<view class="item">
<view class="">
<uni-icons type="spinner-cycle" size="30" color="#ff878d"></uni-icons>
<uni-icons type="spinner-cycle" size="18" color="#ff878d"></uni-icons>
</view>
<view class="">
未评分{{item.noGiveScoreNumber}}
未评分 {{item.otherInfo.setNoGiveScoreNumber}}
</view>
</view>
</view>
<view class="leve3">
<view class="tips flex_box">
</view>
</view>
</view>
</view>
</view>
</view>
@@ -62,7 +57,7 @@
<script>
import $http from '@/config/requestConfig.js';
const taskLIst1 = require('@/data/taskList.json')
// const taskLIst1 = require('@/data/taskList.json')
export default {
data() {
return {
@@ -76,7 +71,7 @@
}
},
onLoad(e) {
console.log('taskLIst1',taskLIst1);
// console.log('taskLIst1',taskLIst1);
this.classId = e.classId
this.pageType = e.type
if (e.type == '0') {
@@ -88,11 +83,20 @@
}
this.getList()
},
onPullDownRefresh() {
this.pPage = 0
this.taskList = []
this.getList()
uni.stopPullDownRefresh()
},
onReachBottom() {
if (this.status != 2 && this.status != 3) {
this.getList()
}
},
onShow() {
// this.getList()
},
onBackPress() {
if (this.showRight || this.showLeft) {
this.$refs.showLeft.close()
@@ -138,8 +142,8 @@
if (res.page.records.length > 0) {
console.log('数据获取成功', res.page.records);
var lis = res.page.records
// this.taskList = this.taskList.concat(lis)
this.taskList = taskLIst1.page.records // 测试数据
this.taskList = this.taskList.concat(lis)
// this.taskList = taskLIst1.page.records // 测试数据
if (res.page.pages > this.pPage) {
this.status = 0;
} else {
@@ -206,7 +210,7 @@
// border-bottom: 1px solid #eee;
border-radius: 20rpx;
padding: 20rpx;
margin-bottom: 20rpx;
.leve1 {
align-items: center;
border-bottom: 1px dashed #eee;
@@ -215,8 +219,8 @@
// .userName{}
}
.leve2 {
color: #666;
.leve2 { justify-content: space-between;
color: #666; font-size: 24rpx;
.item{text-align: center;}
}