Commit 3976cd66 authored by jyx's avatar jyx

首页加载100条数据

parent 664f4bc7
......@@ -50,6 +50,12 @@
console.log(e);
}
uni.getSystemInfo({
success: (res => {
this.globalData.clientHeight = res.windowHeight - 50;
})
});
// checkUpdate(this);
// #ifdef H5
......@@ -89,6 +95,7 @@
// baseUrl: 'http://test.mints-id.com/camera-api/miniApi',
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth: 38,
clientHeight: 0,
token: '',
userId: 0,
inviteUId: '',
......
......@@ -32,7 +32,7 @@
看点
</view>
</view>
<view v-if="point>0" style="width: 60rpx;"></view>
<view v-if="userBean.point>0" style="width: 60rpx;"></view>
<view style="display: flex;flex-direction: row;margin-top: 10rpx;">
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">账户余额:</view>
<view style="font-size: 42rpx;color: red;font-weight: 777;">{{userBean.point??0}}
......
......@@ -13,8 +13,7 @@
<image :src="maskImage2" mode="widthFix"></image>
</view>
<scroll-view v-if="clientHeight != 0" scroll-y="true" :style="{'height': clientHeight + 'px'}"
@scroll="onScroll">
<scroll-view v-if="clientHeight != 0" scroll-y :style="{'height': clientHeight + 'px'}" @scroll="onScroll">
<view class="content">
<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)">
......@@ -209,19 +208,13 @@
showMask: false,
maskImage1: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png',
maskImage2: 'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png',
clientHeight: 0,
clientHeight: app.globalData.clientHeight,
page: 1,
size: 10,
loadStatus: 'loadmore'
};
},
mounted() {
let that = this
uni.getSystemInfo({
success: (res => {
this.clientHeight = res.windowHeight - 50;
})
});
// 匹配视频
this.showFirstDialog();
},
......@@ -262,6 +255,7 @@
this.bannerList = data.list;
}
});
// 排行榜
this.post({
url: '/vedio/orders',
......@@ -288,7 +282,7 @@
});
this.page = 1
this.size = 10
this.size = 100
this.loadList()
},
hide() {},
......@@ -304,7 +298,7 @@
success: ({
data
}) => {
this.loadStatus = data.list.size < this.size ? 'nomore' : 'loadmore';
this.loadStatus = (data.list.length < this.size || !data.list) ? 'nomore' : 'loadmore';
if (data.list.size <= 10) {
this.dataList = [...this.dataList, ...data.list];
......@@ -351,14 +345,14 @@
},
showFirstDialog() {
let that = this;
let loadEpisode_id = uni.getStorageSync('tt_episode_id') || '';
let loadAlbum_id = uni.getStorageSync('tt_album_id') || '';
// let loadEpisode_id = uni.getStorageSync('tt_episode_id') || '';
// let loadAlbum_id = uni.getStorageSync('tt_album_id') || '';
setTimeout(() => {
that.post({
url: '/vedio/firstVedio/douyin',
data: {
episode_id: loadEpisode_id,
album_id: loadAlbum_id
episode_id: '',
album_id: ''
},
showLoading: false,
success: ({
......
<template>
<view class="body">
<z-paging style="height: 100%;background-color: #f5f5f5;">
<view :style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'">
<scroll-view v-if="clientHeight != 0" scroll-y :style="{'height': clientHeight + 'px'}" @scroll="onScroll">
<view
:style="'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'">
<image class="avatar" src="@/static/logo-about.png"></image>
<view>
<view style="font-size: 32rpx;color: black;margin-left: 20rpx;">用户ID:{{userBean.idcode}}</view>
......@@ -60,7 +61,7 @@
<view style="display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;">
{{ versionName }}
</view>
</z-paging>
</scroll-view>
<coin-popup :show="showAnimate" @close="showAnimate = false" @paySuccess="paySuccess">
</coin-popup>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
......@@ -99,17 +100,17 @@
userBean: {},
showAnimate: false,
showKefuPop: false,
windowHeight: 0,
os: 'android',
versionName: app.globalData.versionName,
corpid: '', // 企业ID
curl: '', // 客服链接
clientHeight: app.globalData.clientHeight,
};
},
methods: {
show() {
// this.os = wx.getSystemInfoSync().platform;
this.windowHeight = uni.getSystemInfoSync().windowHeight
// loadData() {
this.post({
url: '/user/baseMsg',
......@@ -145,8 +146,6 @@
navigateTo(`/pagesA/vipPay/vipPay`)
},
handlePhone() {
this.showKefuPop = true
},
paySuccess(largeType) {
......
<template>
<view class="body">
<view v-if="clientHeight != 0" :style="{'height': clientHeight + 'px'}">
<view class="tabContainer" :style="
'height:' +
titleBarHeight +
......@@ -55,8 +54,6 @@
import followPage from "@/components/home/follow.vue";
import recommendVideoPage from "@/components/home/recommendVideo.vue";
// import followPage from "@/pages/recommend/follow.vue"
// import recommendVideoPage from "@/pages/recommend/recommendVideo.vue";
import {
navigateTo,
......@@ -84,8 +81,8 @@
showEdit: false,
showTap: false,
titleBarHeight: app.globalData.titleBarHeight,
titleButtonWidth: app.globalData.titleButtonWidth,
statusBarHeight: app.globalData.statusBarHeight,
clientHeight: app.globalData.clientHeight,
}
},
onLoad(e) {},
......@@ -150,12 +147,6 @@
</script>
<style lang="scss" scoped>
.body {
background: white;
width: 100%;
height: 100%;
}
.tabContainer {
width: 100%;
position: absolute;
......
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