暂存
This commit is contained in:
@@ -6,6 +6,15 @@
|
||||
<!-- <view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"> -->
|
||||
<!-- <uni-icons type="info" size="24"></uni-icons> 课程说明</view> -->
|
||||
</z-nav-bar>
|
||||
<view class="classNewBtn">
|
||||
<view class="box88 flex_box">
|
||||
<view class="" style="width: 60%; text-align: center;">
|
||||
<button type="primary" @click="pupShow = true">新开一个班级</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<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"
|
||||
@@ -17,19 +26,6 @@
|
||||
@click="curseClick(item)" :key="index">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="learnBox box">
|
||||
<!-- <view class="learn flexbox shiting">
|
||||
<view class="item" v-for="(item, index) in courseList" :key="index">
|
||||
<view class="imgcontainer">
|
||||
<image :src="item.image" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="buyItems flexbox">
|
||||
<view class="txt555">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="newBox">
|
||||
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||
@@ -66,6 +62,23 @@
|
||||
</view>
|
||||
<public-module></public-module>
|
||||
<z-navigation></z-navigation>
|
||||
<u-popup v-if="pupShow" key="1" :show="pupShow" :round="10" @close="closePup">
|
||||
<view style="padding: 40rpx;" class="flex_box box6">
|
||||
<view class="" style="width: 100%; text-align: center;">
|
||||
<text>请选择您要创建的班级类型</text>
|
||||
<uni-data-select
|
||||
class="addType"
|
||||
v-model="addType"
|
||||
:localdata="range"
|
||||
@change="selectChange"
|
||||
placement="top"
|
||||
></uni-data-select>
|
||||
<view class="btnBox flex_box" style="text-align: center; width: 100%;">
|
||||
<button size="" style="width: 40%;" type="primary" @click="goCreateClass">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -82,9 +95,16 @@
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
addType:undefined, // 小班类型
|
||||
range:[
|
||||
{ value: 0, text: "普通小班" },
|
||||
{ value: 1, text: "联合班" },
|
||||
{ value: 2, text: "精英班" },
|
||||
],
|
||||
tagId: null,
|
||||
pid:null,
|
||||
fixed: false,
|
||||
pupShow:false,
|
||||
fatherTabId: null,
|
||||
subTabId: null, //
|
||||
bgiStyle: {
|
||||
@@ -164,84 +184,64 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
selectChange(e){
|
||||
console.log("e:", e);
|
||||
},
|
||||
closePup(){
|
||||
this.pupShow = false
|
||||
},
|
||||
surl(imageurl) {
|
||||
return `url(${imageurl})`
|
||||
},
|
||||
getCateList(id) {
|
||||
$http.request({
|
||||
url: "medical/home/getChildCourseMedicalTree",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"id": id,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
goCreateClass(){
|
||||
if(this.addType){
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'请选择班级的类型',
|
||||
icon:'none'
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.labels.length > 0) {
|
||||
var list = []
|
||||
res.labels.forEach(item => {
|
||||
item.name = item.title
|
||||
})
|
||||
this.tabList = res.labels
|
||||
// this.fatherTabId = this.tabList[0].id
|
||||
// if (this.tabList[0].isLast == 1) { // 终极
|
||||
// this.subList = []
|
||||
// this.subTabId = this.tabList[0].id
|
||||
// } else { //非终极
|
||||
// if (this.tabList[0].children.length > 0) {
|
||||
// this.subList = this.tabList[0].children
|
||||
// this.subTabId = this.subList[0].id
|
||||
|
||||
// } else {
|
||||
// this.subList = []
|
||||
// this.subTabId = null
|
||||
// }
|
||||
// }
|
||||
// if (this.subTabId) {
|
||||
// // console.log(this.subTabId, this.subList[0].title, '初始进入')
|
||||
// this.courseList = []
|
||||
// this.status = 1
|
||||
// this.getData(this.subTabId)
|
||||
// }
|
||||
|
||||
|
||||
}else{
|
||||
// this.subList = []
|
||||
this.subTabId = id
|
||||
this.getData(id)
|
||||
}
|
||||
console.log(this.curTagId, '当前高亮')
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '获取子分类报错')
|
||||
});
|
||||
return
|
||||
}
|
||||
},
|
||||
getCateList(id) {
|
||||
this.subTabId = this.subList[0].id
|
||||
this.getData(id)
|
||||
// $http.request({
|
||||
// url: "medical/home/getChildCourseMedicalTree",
|
||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
// data: {
|
||||
// "id": id,
|
||||
// },
|
||||
// header: { //默认 无 说明:请求头
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// })
|
||||
// .then(res => {
|
||||
// if (res.code == 0) {
|
||||
// if (res.labels.length > 0) {
|
||||
// var list = []
|
||||
// res.labels.forEach(item => {
|
||||
// item.name = item.title
|
||||
// })
|
||||
// this.tabList = res.labels
|
||||
// }else{
|
||||
// // this.subList = []
|
||||
// this.subTabId = id
|
||||
// this.getData(id)
|
||||
// }
|
||||
// console.log(this.curTagId, '当前高亮')
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// console.log(e, '获取子分类报错')
|
||||
// });
|
||||
},
|
||||
fatherClick(e) {
|
||||
// console.log(e, '点击')
|
||||
this.page = 1
|
||||
var item = e
|
||||
this.subTabId = this.subList[0].id
|
||||
// if (item.isLast == 1) { // 终极
|
||||
// this.subList = []
|
||||
// this.subTabId = item.id
|
||||
// } else {
|
||||
// if (item.children.length > 0) { // 非终极
|
||||
// this.subList = item.children
|
||||
// this.subTabId = item.children[0].id
|
||||
// } else {
|
||||
// this.subList = []
|
||||
// this.subTabId = null
|
||||
// }
|
||||
// }
|
||||
// if (this.subTabId) {
|
||||
// this.status = 1
|
||||
// this.courseList = []
|
||||
this.getData(this.subTabId);
|
||||
// }
|
||||
|
||||
this.getData(this.subTabId);
|
||||
},
|
||||
curseClick(item) {
|
||||
this.subTabId = item.id
|
||||
@@ -315,9 +315,42 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
/deep/.uni-select__selector{
|
||||
top:unset;
|
||||
bottom:calc(100% + 12px) ;
|
||||
}
|
||||
/deep/.uni-select{
|
||||
border: none;
|
||||
}
|
||||
/deep/.uni-select__input-text{
|
||||
font-size:14px;
|
||||
color:#7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
/deep/.uni-select__input-placeholder{
|
||||
font-size:14px;
|
||||
color:#7f7f7f //修改为你的字体颜色
|
||||
}
|
||||
/deep/.uni-popper__arrow{
|
||||
top:unset;
|
||||
bottom: -6px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
/deep/.uni-popper__arrow::after{
|
||||
top:0
|
||||
}
|
||||
.addType{width: 100%; margin-top: 40rpx;margin-bottom: 40rpx; border: 1px solid #eee;}
|
||||
.classNewBtn{text-align: center; height: 300rpx; padding: 30rpx; background-color: $themeColor; margin-bottom: 80rpx;
|
||||
border-radius: 0 0 40rpx 40rpx;
|
||||
.box88{background-color: #fff; border-radius: 40rpx; height: 300rpx; justify-content: center; align-items: center; box-shadow: 0 10rpx 8rpx #eee;
|
||||
button{border-radius: 40rpx;}
|
||||
}
|
||||
}
|
||||
.box6{
|
||||
.btnBox{justify-content: center;}
|
||||
}
|
||||
.containerBg {
|
||||
background-color: $containerColor;
|
||||
// background-color: $containerColor;
|
||||
background-color: #f6f6f8;
|
||||
padding: 0 20rpx;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user