|
@@ -100,16 +100,18 @@
|
|
|
<view v-for="(item, index) in menu" :key="index" class="tab_item" :class="{nactive: tabNum == index}" @click="tab(index)">{{ item.name }}</view>
|
|
|
</view>
|
|
|
<view class="filters">
|
|
|
- <template v-if="tabNum == 0">
|
|
|
- <view v-for="(item, index) in courseName" :key="index" class="filter_item" :class="{nactive: couIndex == index}" @click="changeCou(item.recommendId, index)">
|
|
|
- {{ item.name }}
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- <template v-if="tabNum == 1">
|
|
|
- <view v-for="(item, index) in bankName" :key="index" class="filter_item" :class="{nactive: bankIndex == index}" @click="changebank(item.recommendId, index)">
|
|
|
- {{ item.name }}
|
|
|
- </view>
|
|
|
- </template>
|
|
|
+ <scroll-view class="scroll_view_H" scroll-x="true" >
|
|
|
+ <template v-if="tabNum == 0">
|
|
|
+ <view v-for="(item, index) in courseName" :key="index" class="filter_item" @click="changeCou(item.recommendId, index)">
|
|
|
+ <view class="name" :class="{nactive: couIndex == index}">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-if="tabNum == 1">
|
|
|
+ <view v-for="(item, index) in bankName" :key="index" class="filter_item" @click="changebank(item.recommendId, index)">
|
|
|
+ <view class="name" :class="{nactive: couIndex == index}">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
<view class="course-list" v-show="tabCurrent==0">
|
|
|
<template v-if="list1.length">
|
|
@@ -322,6 +324,8 @@ export default {
|
|
|
this.getInfo() // 判断有没有关注公众号
|
|
|
this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
|
|
|
uni.removeStorageSync('goPath')
|
|
|
+ this.list1 = []
|
|
|
+ this.list2 = []
|
|
|
this.courseLists();
|
|
|
// this.bankList();
|
|
|
if (uni.getStorageSync('updateHome')){
|
|
@@ -362,9 +366,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async onReachBottom() {
|
|
|
- console.log('加载加载--', this.tabNum)
|
|
|
- console.log(this.paramList[0].total,'total', this.paramList[1].total)
|
|
|
- console.log(this.list1.length,'length', this.list2.length)
|
|
|
+ // console.log('加载加载--', this.tabNum)
|
|
|
+ // console.log(this.paramList[0].total,'total', this.paramList[1].total)
|
|
|
+ // console.log(this.list1.length,'length', this.list2.length)
|
|
|
if (this.tabNum == 0) {
|
|
|
if (this.list1.length < this.paramList[0].total) {
|
|
|
this.paramList[0].pageNum++
|
|
@@ -586,14 +590,15 @@ export default {
|
|
|
//课程
|
|
|
this.courseName = list.filter(x => x.type == 1).sort((a,b) => a.sort - b.sort).map(x => {
|
|
|
return {
|
|
|
- name: x.educationName,
|
|
|
+ name: x.name,
|
|
|
recommendId: x.recommendId
|
|
|
}
|
|
|
});
|
|
|
+ console.log('couIndex', this.couIndex, this.courseName)
|
|
|
//题库
|
|
|
this.bankName = list.filter(x => x.type == 2).sort((a,b) => a.sort - b.sort).map(x => {
|
|
|
return {
|
|
|
- name: x.educationName,
|
|
|
+ name: x.name,
|
|
|
recommendId: x.recommendId
|
|
|
}
|
|
|
});
|
|
@@ -1169,29 +1174,35 @@ page {
|
|
|
}
|
|
|
|
|
|
.filters {
|
|
|
+ width: 100%;
|
|
|
padding: 0rpx 16rpx;
|
|
|
margin-bottom: 32rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ .scroll_view_H {
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
.filter_item {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #666666;
|
|
|
- padding: 12rpx 16rpx;
|
|
|
- width: 152rpx;
|
|
|
- height: 56rpx;
|
|
|
- text-align: center;
|
|
|
- background: #FFFFFF;
|
|
|
- border-radius: 8rpx;
|
|
|
+ display: inline-block;
|
|
|
margin-right: 16rpx;
|
|
|
- &.nactive {
|
|
|
- color: #3F8DFD;
|
|
|
+ .name {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #666666;
|
|
|
+ padding: 12rpx 16rpx;
|
|
|
+ height: 56rpx;
|
|
|
+ text-align: center;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ &.nactive {
|
|
|
+ color: #3F8DFD;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // .botms {
|
|
|
- // padding-bottom: 100rpx;
|
|
|
- // }
|
|
|
+
|
|
|
|
|
|
.my-list {
|
|
|
margin:32rpx 0;
|