暂存
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
</view>
|
||||
<view class="" v-if="learningClassList.length > 0">
|
||||
<uni-section class="mb-10 nobg" title="学习中" type="line"></uni-section>
|
||||
<view class="learnBox box">
|
||||
<view class="learnBox ">
|
||||
<view class="newBox" v-if="learningClassList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in learningClassList" :key="index"
|
||||
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
@@ -86,11 +86,46 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-if="preClassList.length == 0 && learningClassList.length == 0" text="暂无数据"></u-divider>
|
||||
<view class="" v-if="examingClassList.length > 0">
|
||||
<uni-section class="mb-10 nobg" title="考试中" type="line"></uni-section>
|
||||
<view class="learnBox ">
|
||||
<view class="newBox" v-if="examingClassList.length > 0">
|
||||
<view class="item flexbox" v-for="(item, index) in examingClassList" :key="index"
|
||||
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else>
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="">
|
||||
<text v-show="item.classModel.type == 0">【普通班】</text>
|
||||
<text v-show="item.classModel.type == 1">【联合班】</text>
|
||||
<text v-show="item.classModel.type == 2">【精英班】</text>
|
||||
<text class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
{{item.title}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="jianjie">
|
||||
目标学员人数:{{item.number}} 人
|
||||
</view>
|
||||
<!-- <view class="jianjie" v-html="item.content">
|
||||
</view> -->
|
||||
<view class="btn_box">
|
||||
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
|
||||
<text class="seeInfo">进入班级</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-if="preClassList.length == 0 && learningClassList.length == 0 && examingClassList.length == 0" text="暂无数据"></u-divider>
|
||||
</view>
|
||||
|
||||
<!-- 过期班级 -->
|
||||
@@ -224,6 +259,7 @@
|
||||
classList: [], // 已结班
|
||||
preClassList: [], // 待开班
|
||||
learningClassList: [], // 在学习的班级
|
||||
examingClassList:[], // 考试周班级
|
||||
status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||
page: 1,
|
||||
flag: true, // 函数是否执行完
|
||||
@@ -252,12 +288,16 @@
|
||||
}
|
||||
// console.log(this.scrollTop,'this.scrollTop')
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
async onPullDownRefresh() {
|
||||
console.log('下拉刷新')
|
||||
// this.status = 3
|
||||
// this.page = 1
|
||||
this.classList = []
|
||||
this.getData()
|
||||
// this.getData()
|
||||
this.classList = await this.getData('0','2')
|
||||
this.learningClassList = await this.getData('0','1')
|
||||
this.preClassList = await this.getData('0','0')
|
||||
this.examingClassList = await this.getData('0','3')
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -277,6 +317,7 @@
|
||||
this.classList = await this.getData('0','2')
|
||||
this.learningClassList = await this.getData('0','1')
|
||||
this.preClassList = await this.getData('0','0')
|
||||
this.examingClassList = await this.getData('0','3')
|
||||
// this.getLearingClassList()
|
||||
},
|
||||
components: {
|
||||
@@ -338,15 +379,17 @@
|
||||
// uni.showLoading({
|
||||
// title: '正在加载'
|
||||
// })
|
||||
var data = {
|
||||
"isCommittee": role,
|
||||
"state": state, //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
}
|
||||
console.log('----data', data);
|
||||
await $http.request({
|
||||
|
||||
url: "common/class/MyClassList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"isCommittee": role,
|
||||
"state": state, //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@@ -366,7 +409,7 @@
|
||||
}).catch(e => {
|
||||
// uni.hideLoading()
|
||||
// this.flag = true
|
||||
console.log(e, '数据报错')
|
||||
console.log('数据报错',e)
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `获取数据失败`,
|
||||
|
||||
Reference in New Issue
Block a user