|
@@ -67,10 +67,10 @@
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- 列表-->
|
|
|
|
|
- <view>
|
|
|
|
|
|
|
+ <!-- 课程列表-->
|
|
|
|
|
+ <view v-if="current==0">
|
|
|
<view @click="jumpDetail" class="list_box" v-for="(item, index) in list1" :key="index">
|
|
<view @click="jumpDetail" class="list_box" v-for="(item, index) in list1" :key="index">
|
|
|
- <image src="http://192.168.0.222:8080/img/banner1.png" class="list_img"></image>
|
|
|
|
|
|
|
+ <image :src="$method.splitImgHost(item.coverUrl)" class="list_img"></image>
|
|
|
<view class="list_content">
|
|
<view class="list_content">
|
|
|
<view style="margin-left: 280rpx;margin-top: 10rpx;">
|
|
<view style="margin-left: 280rpx;margin-top: 10rpx;">
|
|
|
<view class="list_title">{{item.courseName}}</view>
|
|
<view class="list_title">{{item.courseName}}</view>
|
|
@@ -80,7 +80,33 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="showStatus" style="text-align: center;margin-top: 24rpx;">
|
|
|
|
|
|
|
+ <!-- 题库列表-->
|
|
|
|
|
+ <view v-if="current==1">
|
|
|
|
|
+ <view @click="jumpDetail" class="list_box" v-for="(item, index) in list2" :key="index">
|
|
|
|
|
+ <image :src="$method.splitImgHost(item.coverUrl)" class="list_img"></image>
|
|
|
|
|
+ <view class="list_content">
|
|
|
|
|
+ <view style="margin-left: 280rpx;margin-top: 10rpx;">
|
|
|
|
|
+ <view class="list_title">{{item.bankName}}</view>
|
|
|
|
|
+ <view class="old_price">原价:¥{{item.price}}</view>
|
|
|
|
|
+ <view class="price">现价:¥{{item.price}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- 重点列表-->
|
|
|
|
|
+ <view v-if="current==2">
|
|
|
|
|
+ <view @click="jumpDetail" class="list_box" v-for="(item, index) in list3" :key="index">
|
|
|
|
|
+ <image :src="$method.splitImgHost(item.coverUrl)" class="list_img"></image>
|
|
|
|
|
+ <view class="list_content">
|
|
|
|
|
+ <view style="margin-left: 280rpx;margin-top: 10rpx;">
|
|
|
|
|
+ <view class="list_title">{{item.name}}</view>
|
|
|
|
|
+ <view class="old_price">原价:¥{{item.price}}</view>
|
|
|
|
|
+ <view class="price">现价:¥{{item.price}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="paramList[current].showStatus" style="text-align: center;margin-top: 24rpx;">
|
|
|
到底啦~
|
|
到底啦~
|
|
|
</view>
|
|
</view>
|
|
|
<u-popup v-model="show">
|
|
<u-popup v-model="show">
|
|
@@ -92,6 +118,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
name: 'home',
|
|
name: 'home',
|
|
|
data() {
|
|
data() {
|
|
@@ -120,13 +147,32 @@ export default {
|
|
|
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg'
|
|
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- pageNum:1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
|
|
+ paramList:[
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum:1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total:0,
|
|
|
|
|
+ showStatus:0
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum:1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total:0,
|
|
|
|
|
+ showStatus:0
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum:1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total:0,
|
|
|
|
|
+ showStatus:0
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
date: ['日', '一', '二', '三', '四', '五', '六'],
|
|
date: ['日', '一', '二', '三', '四', '五', '六'],
|
|
|
date_num: [23, 24, 25, 26, 27, 28, 29],
|
|
date_num: [23, 24, 25, 26, 27, 28, 29],
|
|
|
list1: [],
|
|
list1: [],
|
|
|
|
|
+ list2: [],
|
|
|
|
|
+ list3: [],
|
|
|
windowHeight: 0,
|
|
windowHeight: 0,
|
|
|
- showStatus: false,
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(){},
|
|
onLoad(){},
|
|
@@ -136,30 +182,70 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
initList(){
|
|
initList(){
|
|
|
- var self = this
|
|
|
|
|
- var data = {
|
|
|
|
|
- status: '1',
|
|
|
|
|
- pageNum : this.pageNum,
|
|
|
|
|
- pageSize: this.pageSize
|
|
|
|
|
- }
|
|
|
|
|
- this.$api.courselist(data).then(res => {
|
|
|
|
|
- if(self.list1.length === res.data.total){
|
|
|
|
|
- this.showStatus = true
|
|
|
|
|
- }else{
|
|
|
|
|
- res.data.rows.forEach((item,index) => {
|
|
|
|
|
- self.list1.push(item)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.courseList()
|
|
|
|
|
+ this.bankList()
|
|
|
|
|
+ this.noteList()
|
|
|
},
|
|
},
|
|
|
scroll(e) {},
|
|
scroll(e) {},
|
|
|
scrollTolower(){
|
|
scrollTolower(){
|
|
|
- this.pageNum++
|
|
|
|
|
- this.initList()
|
|
|
|
|
|
|
+ if(this.current==0){
|
|
|
|
|
+ if(this.list1.length<this.paramList[0].total){
|
|
|
|
|
+ this.paramList[0].pageNum++
|
|
|
|
|
+ this.courseList()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.current==1){
|
|
|
|
|
+ if(this.list1.length<this.paramList[1].total){
|
|
|
|
|
+ this.paramList[1].pageNum++
|
|
|
|
|
+ this.bankList()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.current==2){
|
|
|
|
|
+ if(this.list1.length<this.paramList[2].total){
|
|
|
|
|
+ this.paramList[2].pageNum++
|
|
|
|
|
+ this.noteList()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
sectionChange(index) {
|
|
sectionChange(index) {
|
|
|
this.current = index;
|
|
this.current = index;
|
|
|
},
|
|
},
|
|
|
|
|
+ //课程
|
|
|
|
|
+ courseList(){
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ var param = this.paramList[0]
|
|
|
|
|
+ this.$api.courselist(param).then(res => {
|
|
|
|
|
+ self.paramList[0].total = res.data.total
|
|
|
|
|
+ self.list1.push.apply(self.list1,res.data.rows)
|
|
|
|
|
+ if(self.list1.length === res.data.total){
|
|
|
|
|
+ self.paramList[0].showStatus = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ //题库
|
|
|
|
|
+ bankList(){
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ var param = this.paramList[1]
|
|
|
|
|
+ this.$api.banklist(param).then(res => {
|
|
|
|
|
+ self.paramList[1].total = res.data.total
|
|
|
|
|
+ self.list2.push.apply(self.list2,res.data.rows)
|
|
|
|
|
+ if(self.list2.length === res.data.total){
|
|
|
|
|
+ self.paramList[1].showStatus = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ //考试重点
|
|
|
|
|
+ noteList(){
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ var param = this.paramList[2]
|
|
|
|
|
+ this.$api.notelist(param).then(res => {
|
|
|
|
|
+ self.paramList[2].total = res.data.total
|
|
|
|
|
+ self.list3.push.apply(self.list3,res.data.rows)
|
|
|
|
|
+ if(self.list3.length === res.data.total){
|
|
|
|
|
+ self.paramList[2].showStatus = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
jumpDetail() {
|
|
jumpDetail() {
|
|
|
if (this.current == 0) {
|
|
if (this.current == 0) {
|
|
|
this.$navTo.togo('/pages2/course/detail', {});
|
|
this.$navTo.togo('/pages2/course/detail', {});
|