暂存
This commit is contained in:
@@ -5,38 +5,44 @@
|
||||
<z-nav-bar title="班级列表">
|
||||
</z-nav-bar>
|
||||
<view style="padding: 20rpx; background-color: #fff; border-bottom: 1px solid #eee;">当前课程:{{courseTitle}}</view>
|
||||
<view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
|
||||
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
|
||||
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
|
||||
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="containerBg">
|
||||
<view class="subCate flex" v-if="subList.length> 0">
|
||||
<!-- <view class="subCate flex" v-if="subList.length> 0">
|
||||
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
|
||||
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="learnBox box">
|
||||
<view class="newBox">
|
||||
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" >
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
<view class="imgcontainer" v-if="item.icon != ''" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||
<view class="imgcontainer" v-if="item.icon != ''" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<image :src="item.icon" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="imgcontainer defaultImg" v-else @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||
<view class="imgcontainer defaultImg" v-else @click="onPageJump('/pages/miniClass/classInfo',item.id)">
|
||||
<image src="@/static/my_04.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems">
|
||||
<view class="txt555" @click="onPageJump('/pages/miniClass/classInfo',item.id, 'isNotHave')">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="">
|
||||
<text >【联合班】</text>
|
||||
<text v-show="item.type == 0">【普通班】</text>
|
||||
<text v-show="item.type == 1">【联合班】</text>
|
||||
<text v-show="item.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 v-show="item.state == '0'" @click="addClass(item.id)">一键加入</text>
|
||||
<text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id,'isNotHave')">查看班内情况</text>
|
||||
<text v-show="item.state == '0'" @click.stop="addClass(item.id)">一键加入</text>
|
||||
<!-- <text class="seeInfo" @click="onPageJump('/pages/miniClass/classInfo',item.id)">查看班内情况</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -175,8 +181,7 @@
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isHave = true
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: `加入成功!`,
|
||||
icon: 'success'
|
||||
@@ -186,13 +191,13 @@
|
||||
url:`/pages/miniClass/classInfo?id=${classId}`
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
// this.status = 3
|
||||
uni.showToast({
|
||||
title: `加入失败`,
|
||||
icon: 'error'
|
||||
title: '加入失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
},
|
||||
@@ -230,8 +235,8 @@
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"courseId": Number(this.courseId),
|
||||
"state": this.subTabId, //小班状态0待开班1已开班2完成
|
||||
"type": this.curTagId // 班类型 0小班 1联合班 2精英班
|
||||
"state": '', //小班状态0待开班1已开班2完成
|
||||
"type": '' // 班类型 0小班 1联合班 2精英班
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user