Browse Source

2021-7-27

cmy 3 years ago
parent
commit
ed5ce0afba
2 changed files with 59 additions and 1 deletions
  1. 1 1
      pages/index/index.vue
  2. 58 0
      pages/index/node.vue

+ 1 - 1
pages/index/index.vue

@@ -7,7 +7,7 @@
 		<view class="box-body">
 			<view class="navBox">
 				<view class="navBox-left">
-					<view class="navBox-item" @click="nav()">
+					<view class="navBox-item" @click="nav('./node')">
 						<image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image>
 					</view>
 				</view>

+ 58 - 0
pages/index/node.vue

@@ -0,0 +1,58 @@
+<template>
+	<view class="center">
+		<u-tabs-swiper ref="uTabs" :list="tabList" :current="current" @change="tabsChange" :is-scroll="false"></u-tabs-swiper>
+		<swiper :current="current" @animationfinish="transition">
+			<swiper-item class="swiper-item">
+				<scroll-view scroll-y @scrolltolower="onreachBottom"><u-loadmore :status="tabList[0].loding"></u-loadmore></scroll-view>
+			</swiper-item>
+			<swiper-item class="swiper-item">
+				<scroll-view scroll-y @scrolltolower="onreachBottom"><u-loadmore :status="tabList[1].loding"></u-loadmore></scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			current: 0, //当前选中的标签
+			tabList: [
+				{
+					name: '十年',
+					list:[],
+					pages:1,
+					limit:10,
+					loding:'loadmore'//loading加载中 nomore没有数据
+				},
+				{
+					name: '青春',
+					pages:1,
+					limit:10,
+					list:[],
+					loding:'loadmore'//loading加载中 nomore没有数据
+				},
+			]
+		};
+	},
+	//页面加载即刻发生
+	onload() {},
+	methods: {
+		// 内容框切换事件
+		transition(e) {
+			console.log(e);
+		},
+		// tab切换事件
+		tabsChange(e) {
+			console.log(e);
+		},
+		// 下拉到底部加载事件
+		onreachBottom(e) {
+			console.log(e);
+		}
+	}
+};
+</script>
+<style lang="scss">
+.center {
+}
+</style>