uniapp下拉刷新,锚点等功能实现
<template>
<!-- v-if : 防止网络请求完毕之前的 DOM 加载 -->
<!-- scroll-view 专门的滚动组件, 拥有更多的功能 -->
<!-- scroll-y: 允许竖向滚动, 默认 false -->
<!-- 必须指定高度, 否则无法竖向滚动 -->
<!-- @scrolltolower: scroll-view 的触底事件 -->
<scroll-view
v-if="data"
@scroll="onScroll"
:style="{ height: wh + 'px' }"
:scroll-y="true"
@scrolltolower="onReachBottom1()"
:scroll-top="curST"
:scroll-with-animation="true"
>
<uni-list>
<uni-list-item v-for="(item, index) in data.data" :key="index">
<image
style="width: 240rpx; height: 240rpx; min-width: 240rpx;"
slot="header"
:src="'http://101.96.128.94:9999/' + item.pic"
mode=""
></image>
<view class="content" slot="body">
<text class="title">{
{
item.title }}</text>
<text class="price">¥{
{
item.price }}</text>
<<