Commit a8dcb8c8 authored by jyx's avatar jyx

首页列表加载100条,优化样式

parent 912f56cb
<template> <template>
<view class="body"> <view class="body">
<view style="height: 100%;"> <view :style="{'height': clientHeight + 'px'}">
<indexPage v-show="currentPage==0" ref="index" /> <indexPage v-show="currentPage==0" ref="index" />
<recommendPage v-on:showEditBarH="showEditBarH" v-on:changeBottomBarColor="changeBottomBarColor" <recommendPage v-on:showEditBarH="showEditBarH" v-on:changeBottomBarColor="changeBottomBarColor"
v-show="currentPage==1" ref="recommend" /> v-show="currentPage==1" ref="recommend" />
<userPage v-show="currentPage==2" ref="user" /> <userPage v-show="currentPage==2" ref="user" />
</view> </view>
<view v-if="!isShowBlackBar" class="tabs-bar" style="height: 70px;"> <view v-if="!isShowBlackBar" class="tabs-bar" style="height: 65px;">
<view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)"> <view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)">
<view style="margin: 12rpx 0 8rpx;"> <view style="margin: 12rpx 0 8rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png" <image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</view> </view>
</view> </view>
<view v-if="isShowBlackBar" class="tabs-bar2" style="height: 70px;"> <view v-if="isShowBlackBar" class="tabs-bar2" style="height: 65px;">
<view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)"> <view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)">
<view style="margin: 12rpx 0 8rpx;"> <view style="margin: 12rpx 0 8rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png" <image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
...@@ -100,7 +100,8 @@ ...@@ -100,7 +100,8 @@
currentPage: 0, currentPage: 0,
showEditBar: false, showEditBar: false,
isFullChoice: false, isFullChoice: false,
isShowBlackBar: false isShowBlackBar: false,
clientHeight: app.globalData.clientHeight,
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -109,12 +110,11 @@ ...@@ -109,12 +110,11 @@
this.currentPage = index this.currentPage = index
} }
// 禁止截屏
if (wx.setVisualEffectOnCapture) { if (wx.setVisualEffectOnCapture) {
wx.setVisualEffectOnCapture({ wx.setVisualEffectOnCapture({
visualEffect: 'hidden', visualEffect: 'hidden',
success: (res) => { success: (res) => {}
},
}) })
} }
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<text @click="showMask=false">我知道了</text> <text @click="showMask=false">我知道了</text>
</view> </view>
<scroll-view v-if="clientHeight != 0" scroll-y :style="{'height': clientHeight + 'px'}" @scroll="onScroll"> <scroll-view style="height: 100%;" scroll-y @scroll="onScroll">
<view class="content" :style="'padding-top:'+statusBarHeight+'px'"> <view class="content" :style="'padding-top:'+statusBarHeight+'px'">
<swiper class="banner" :indicator-dots="true" :autoplay="true" :interval="2000" :duration="500"> <swiper class="banner" :indicator-dots="true" :autoplay="true" :interval="2000" :duration="500">
<swiper-item v-for="banner in bannerList" :key="banner.vedioId" @click="handleBanner(banner)"> <swiper-item v-for="banner in bannerList" :key="banner.vedioId" @click="handleBanner(banner)">
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
clientHeight: app.globalData.clientHeight, clientHeight: app.globalData.clientHeight,
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
page: 1, page: 1,
size: 10, size: 100,
loadStatus: 'loadmore', loadStatus: 'loadmore',
}; };
}, },
...@@ -273,7 +273,6 @@ ...@@ -273,7 +273,6 @@
}); });
this.page = 1 this.page = 1
this.size = 10
this.loadList() this.loadList()
}, },
hide() {}, hide() {},
......
<template> <template>
<view class="body"> <view class="body">
<scroll-view v-if="clientHeight != 0" scroll-y :style="{'height': clientHeight + 'px'}"> <scroll-view style="height: 100%;" scroll-y>
<view <view
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'"> :style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image> <image class="avatar" src="@/static/logo-about.png"></image>
......
<template> <template>
<view v-if="clientHeight != 0" :style="{'height': clientHeight + 'px'}"> <view style="height: 100%;">
<view class="tabContainer" <view class="tabContainer"
:style="'height:' +titleBarHeight +'px;line-height:'+titleBarHeight +'px;padding-top:'+statusBarHeight+'px;background-color:transparent'"> :style="'height:' +titleBarHeight +'px;line-height:'+titleBarHeight +'px;padding-top:'+statusBarHeight+'px;background-color:transparent'">
<view v-if="(current==0 && showEdit)" <view v-if="(current==0 && showEdit)"
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
showTap: false, showTap: false,
titleBarHeight: app.globalData.titleBarHeight, titleBarHeight: app.globalData.titleBarHeight,
statusBarHeight: app.globalData.statusBarHeight, statusBarHeight: app.globalData.statusBarHeight,
clientHeight: app.globalData.clientHeight,
} }
}, },
onLoad(e) {}, onLoad(e) {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment