This commit is contained in:
daihh
2022-11-17 15:58:49 +08:00
11 changed files with 316 additions and 38 deletions

View File

@@ -15,7 +15,7 @@
</u-search>
</view>
</view>
<view class="tabbar" style="position: relative;">
<view class="tabbar" style="position: relative;padding-bottom: 20upx;">
<view class="tabbar-item" style="text-align: right;margin-right: 26upx;" @click="clicktab(0)" :class="{'active':tabIndex===0}">
<u-badge :type="type" max="99" :value="value" class="tabber-co"></u-badge>学习任务
<view class="border-bottom-one"></view>
@@ -77,7 +77,7 @@
</view>
</view>
</view>
<view>
<view style="margin-top: 60upx;">
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>
@@ -160,7 +160,7 @@
</view>
</view>
</view>
<view>
<view style="margin-top: 60upx;">
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>
@@ -415,7 +415,6 @@
},
methods: {
removecour(item){
console.log(item);
item.delcour = !item.delcour
},
rowbtn(row) {
@@ -520,8 +519,8 @@
})
},
autonomyStatus(num) {
console.log(num)
this.Applistatus = num;
// console.log(this.Applistatus)
this.getLearning();
},
taskStatus(num) {
@@ -576,6 +575,7 @@
loadBoeData(flag) {
if (flag) {
this.taskPageIndex = 1; //回到首页
this.couresList = [];
}
let params = {
page: this.taskPageIndex,
@@ -587,12 +587,12 @@
params.cmtask_name = this.keyWord;
}
apiBoeCourse.cmtaskList(params).then(res => {
this.taskCount = res.result.count;
this.taskCount = res.result.count;
res.result.list.forEach(item => {
let time = this.formatDate(item.created_at * 1000);
item.created_at = time.split(' ')[0];
});
this.couresList = res.result.list;
this.couresList.push(...res.result.list);
if (this.taskCount > this.taskPageIndex * this.taskPageSize) {
this.taskHasMore = true;
} else {
@@ -648,12 +648,12 @@
},
clicktab(idx) {
this.tabIndex = idx;
if (this.tabIndex == 1) {
if (this.tabIndex == 1 && this.studyList.length == 0) {
this.getLearning()
// this.searchData();
} else if (this.tabIndex == 2) {
this.history()
} else if (this.tabIndex == 0) {
} else if (this.tabIndex == 0 && this.couresList.length == 0) {
this.loadBoeData()
}
},
@@ -701,6 +701,7 @@
})
},
async getLearning() {
console.log(this.Applistatus)
uni.showLoading({
title: '加载中...'
});