|
@@ -1,36 +1,37 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view >
|
|
|
<u-navbar :is-back="false" title="选课中心" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
|
|
|
<view class="slot-wrap">
|
|
|
<image src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
- <view>
|
|
|
+ <view v-show="!show">
|
|
|
<view style="position: fixed;width: 100%;z-index: 999;background-color: #FFFFFF;">
|
|
|
<u-line color="#D6D6DB" />
|
|
|
<view style="display: flex;justify-content: space-between;height: 78rpx;line-height: 78rpx;padding: 0 30rpx;font-size: 32rpx;">
|
|
|
- <view style="color: #666666;">考前培训:建造师-二级</view>
|
|
|
- <view style="color: #007AFF;">重新选择</view>
|
|
|
+ <view style="color: #666666;">{{selObj.eName}}:{{selObj.pName}}-{{selObj.bName}}</view>
|
|
|
+ <view style="color: #007AFF;" @click="openLeft()">重新选择</view>
|
|
|
</view>
|
|
|
<u-line color="#D6D6DB" />
|
|
|
- <view>
|
|
|
- <view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
|
|
|
+ <view style="display: flex;align-items:center;">
|
|
|
+ <view style="margin: 0 auto;"><u-tabs :list="list" :current="current" @change="change" :scrollable="false"></u-tabs></view>
|
|
|
+ <!-- <view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view> -->
|
|
|
</view>
|
|
|
<u-line color="#D6D6DB" />
|
|
|
<view class="menuSel" v-show="current==0">
|
|
|
<scroll-view class="r_sliper" scroll-x="true" >
|
|
|
- <view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
|
|
|
- <view :class="menuIndex==index?'r_t1':'r_t2'" @click="cMenu(index)">
|
|
|
- {{item}}
|
|
|
+ <view v-for="(item,index) in sList" :key="index" style="margin-right: 20rpx;display:inline-block">
|
|
|
+ <view :class="paramList[0].subjectId==item.id?'r_t1':'r_t2'" @click="cMenu(item.id)">
|
|
|
+ {{item.subjectName}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view class="menuSel" v-show="current==1">
|
|
|
<scroll-view class="r_sliper" scroll-x="true" >
|
|
|
- <view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
|
|
|
- <view :class="menuIndex1==index?'r_t1':'r_t2'" @click="cMenu1(index)">
|
|
|
- {{item}}
|
|
|
+ <view v-for="(item,index) in sList" :key="index" style="margin-right: 20rpx;display:inline-block">
|
|
|
+ <view :class="paramList[1].subjectId==item.id?'r_t1':'r_t2'" @click="cMenu1(item.id)">
|
|
|
+ {{item.subjectName}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
@@ -38,7 +39,7 @@
|
|
|
</view>
|
|
|
<view v-show="current==0">
|
|
|
<view class="listBox">
|
|
|
- <navigator url="/pages2/course/detail" v-for="(item,index) in list1" :key="index" >
|
|
|
+ <navigator :url="'/pages2/course/detail?id='+item.goodsId" v-for="(item,index) in list1" :key="index" >
|
|
|
<view class="itemBox">
|
|
|
<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
|
|
|
<view style="display: flex;margin-top: 13rpx;">
|
|
@@ -56,7 +57,7 @@
|
|
|
</view>
|
|
|
<view v-show="current==1">
|
|
|
<view class="listBox">
|
|
|
- <navigator url="/pages2/bank/detail" v-for="(item,index) in list2" :key="index" >
|
|
|
+ <navigator :url="'/pages2/bank/detail'+item.goodsId" v-for="(item,index) in list2" :key="index" >
|
|
|
<view class="itemBox">
|
|
|
<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
|
|
|
<view style="display: flex;margin-top: 13rpx;">
|
|
@@ -73,6 +74,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view v-show="show" class="popuBox">
|
|
|
+ <view class="flex-d" >
|
|
|
+ <view class="contentZ">
|
|
|
+ <view class="lzs">
|
|
|
+ <view class="tylsz" v-for="(item, index) in eList" :key="index" @click="item.id === 0 ? activeAll(1) : active1(item)" :class="item.id === selObj.eId ? 'activeStys':''">{{ item.educationName }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="lzs">
|
|
|
+ <view class="tylszB" v-for="(item, index) in bList" :key="index" @click="item.id === 0 ? activeAll(2) : active2(item)" :class="item.id === selObj.bId ? 'activeStys2':''">{{ item.projectName }}-{{ item.businessName }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="fots">
|
|
|
+ <view class="leftBtns" @click="initLists">重置筛选</view>
|
|
|
+
|
|
|
+ </view>-->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -85,6 +102,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ show:false,
|
|
|
list:[
|
|
|
{
|
|
|
name: '网课'
|
|
@@ -103,18 +121,31 @@ export default {
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
showStatus: 0,
|
|
|
- goodsType:1
|
|
|
+ goodsType:1,
|
|
|
+ subjectId:0
|
|
|
},
|
|
|
{
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
showStatus: 0,
|
|
|
- goodsType:2
|
|
|
+ goodsType:2,
|
|
|
+ subjectId:0
|
|
|
}
|
|
|
],
|
|
|
list1: [],
|
|
|
list2: [],
|
|
|
+ eList:[],
|
|
|
+ bList:[],
|
|
|
+ sList:[],
|
|
|
+ selObj:{
|
|
|
+ eName:'',
|
|
|
+ pName:'',
|
|
|
+ bName:'',
|
|
|
+ eId:0,
|
|
|
+ bId:0,
|
|
|
+ pId:0,
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh(){
|
|
@@ -125,9 +156,74 @@ export default {
|
|
|
},500)
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
+ let eduStr = uni.getStorageSync('eduObj')
|
|
|
+ if(eduStr){
|
|
|
+ this.selObj = JSON.parse(eduStr)
|
|
|
+ this.subjectList({businessId:this.selObj.bId,projectId:this.selObj.pId,educationId:this.selObj.eId})
|
|
|
+ this.mergeBusiness()
|
|
|
+ }else{
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
this.initList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ mergeBusiness(){
|
|
|
+ this.paramList[0].educationTypeId = this.selObj.eId
|
|
|
+ this.paramList[0].businessId = this.selObj.bId
|
|
|
+ this.paramList[0].subjectId = 0
|
|
|
+ this.paramList[1].educationTypeId = this.selObj.eId
|
|
|
+ this.paramList[1].businessId = this.selObj.bId
|
|
|
+ this.paramList[1].subjectId = 0
|
|
|
+ },
|
|
|
+ subjectList(data) {
|
|
|
+ var self = this;
|
|
|
+ this.$api.subjectList(data).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ self.sList = res.data.rows
|
|
|
+ let allItem = {id:0,subjectName:'全部'}
|
|
|
+ self.sList.unshift(allItem)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ active2(item){
|
|
|
+ this.selObj.bId = item.id
|
|
|
+ this.show = false
|
|
|
+ this.selObj.pId = item.projectId
|
|
|
+ this.selObj.bName = item.businessName
|
|
|
+ this.selObj.pName = item.projectName
|
|
|
+ uni.setStorageSync('eduObj', JSON.stringify(this.selObj));
|
|
|
+ this.subjectList({businessId:item.id,projectId:item.projectId,educationId:this.selObj.eId})
|
|
|
+ this.mergeBusiness()
|
|
|
+ //初始化
|
|
|
+ this.initList();
|
|
|
+ },
|
|
|
+ businessList(data) {
|
|
|
+ var self = this;
|
|
|
+ this.$api.businessList(data).then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ self.bList = res.data.rows
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ active1(item){
|
|
|
+ this.selObj.eId = item.id
|
|
|
+ this.selObj.eName = item.educationName
|
|
|
+ this.businessList({educationId:item.id})
|
|
|
+ },
|
|
|
+ educationList() {
|
|
|
+ var self = this;
|
|
|
+ this.$api.educationTypeList().then(res => {
|
|
|
+ if(res.data.code==200){
|
|
|
+ self.eList = res.data.rows
|
|
|
+ if(self.selObj.eId){
|
|
|
+ self.businessList({educationId:self.selObj.eId})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ openLeft(){
|
|
|
+ this.show = true
|
|
|
+ },
|
|
|
initList() {
|
|
|
this.paramList[0].pageNum = 1
|
|
|
this.paramList[1].pageNum = 1
|
|
@@ -135,12 +231,21 @@ export default {
|
|
|
this.list2 = []
|
|
|
this.courseList();
|
|
|
this.bankList();
|
|
|
+ this.educationList()
|
|
|
},
|
|
|
cMenu(index){
|
|
|
- this.menuIndex = index;
|
|
|
+ this.paramList[0].pageNum = 1
|
|
|
+ this.paramList[0].subjectId= index;
|
|
|
+ this.list1 = []
|
|
|
+ // this.menuIndex
|
|
|
+ this.courseList();
|
|
|
},
|
|
|
cMenu1(index){
|
|
|
- this.menuIndex1 = index;
|
|
|
+ this.paramList[1].pageNum = 1
|
|
|
+ this.paramList[1].subjectId= index;
|
|
|
+ this.list2 = []
|
|
|
+ // this.menuIndex1 = index;
|
|
|
+ this.bankList();
|
|
|
},
|
|
|
change(index){
|
|
|
this.current = index;
|
|
@@ -171,7 +276,6 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
- console.log(34535)
|
|
|
if (this.current == 0) {
|
|
|
if (this.list1.length < this.paramList[0].total) {
|
|
|
this.paramList[0].pageNum++;
|
|
@@ -200,6 +304,87 @@ export default {
|
|
|
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
+ .popuBox{
|
|
|
+ position: fixed;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .activeStys2{
|
|
|
+ background: #007AFF !important;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .tylszB{
|
|
|
+ height: 66rpx;
|
|
|
+ line-height: 66rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border: 2rpx solid #EEEEEE;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 0 10rpx;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ }
|
|
|
+ .activeStys{
|
|
|
+ background: linear-gradient(90deg, rgba(1,94,234,0.2),rgba(255,255,255,.6));
|
|
|
+ border-radius: 16rpx;
|
|
|
+ color: #007AFF!important;
|
|
|
+ }
|
|
|
+ .tylsz{
|
|
|
+ height: 66rpx;
|
|
|
+ line-height: 66rpx;
|
|
|
+ color: #666;
|
|
|
+ font-weight: 400;
|
|
|
+
|
|
|
+ font-weight: bold;
|
|
|
+ padding:0 30rpx;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ }
|
|
|
+ .popup_t1 {
|
|
|
+ padding-left: 35rpx;
|
|
|
+ border-bottom: 1rpx solid #eee;
|
|
|
+ height: 57rpx;
|
|
|
+ margin-top: 86rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #007AFF;
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
+ .flex-d {
|
|
|
+ height: 130%;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ padding: 0 5%;
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
+ .contentZ {
|
|
|
+ overflow-y: auto;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ padding: 10rpx;
|
|
|
+ }
|
|
|
+ .contentZ::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .fots {
|
|
|
+ height: 100rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
+ border-top: 1rpx solid #eee;
|
|
|
+ }
|
|
|
+ .leftBtns {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #007AFF;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .right_Btns {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #007AFF;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ padding: 0rpx 23rpx;
|
|
|
+ box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
|
|
|
+ }
|
|
|
.blackFont{
|
|
|
color: #333333;
|
|
|
margin: 0 4rpx;
|
|
@@ -251,7 +436,7 @@ export default {
|
|
|
background-color: #EAEEF1;
|
|
|
padding: 30rpx;
|
|
|
position: relative;
|
|
|
- top: 240rpx;
|
|
|
+ top: 235rpx;
|
|
|
}
|
|
|
.menuSel{
|
|
|
width: 100%;
|