zoukankan      html  css  js  c++  java
  • 小程序下拉加载

    /**
    * 页面上拉触底事件的处理函数
    */
    onReachBottom: function () {
    if (this.data.ismore) {
    page++;
    this.tabadd(page);
    }
    },
     
    //上啦加载tab选项卡内容
    tabadd(page) {
    let that = this;
    // console.log(that.data.tabcontent)
    let arrs = that.data.tabcontent;
                 // newarr.push(arrs.splice(0,5));//上拉加载几条数据
    let contents = [                       //上拉加载新的数据
    {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    }, {
    img: "../images/lunbo1.png",
    shopName: "的挥洒的哈实打实",
    shopType: "是接撒介绍",
    shopJie: "水水水水",
    shopjuli: 14.2,
    shopTaocan: "读好书的和撒旦",
    shopXiaofen: 555,
    },
    ]
    let len = contents.length;
    for (var i = 0; i < len; i++) {
    contents[i].shopName += page;
    arrs.push(contents[i]);
    }
    that.setData({
    tabcontent: arrs
    })
    },
  • 相关阅读:
    win10下安装Anaconda3+keras+tensorflow
    Ubuntu 下安装安装 Anaconda3 与Keras
    ESP32开发之Windows开发环境
    LinuxE2系统刷机后OSCAM安装与读卡器设置
    安德鲁1.2Ku全下125C波(CCTV4K除外)
    安德鲁1.2Ku使用感受
    ubuntu10.04换官方源
    密室逃脱游戏解决方案-森林迷宫-炸弹人等
    Qt linux获取cpu使用率、内存、网络收发速度、磁盘读写速度、磁盘剩余空间等
    ESP32 做Web服务器 http Server步骤
  • 原文地址:https://www.cnblogs.com/isuansuan/p/9922233.html
Copyright © 2011-2022 走看看