From e69170307ccab9096549067c2b2d571810f4021f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 23 Mar 2021 20:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E6=8E=92=E5=90=8D=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=89=8D10=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/examtest/rate.js | 9 ++++----- pages/examtest/rate.json | 3 +-- pages/examtest/rate.wxml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pages/examtest/rate.js b/pages/examtest/rate.js index 04fc836..4f5d6f2 100644 --- a/pages/examtest/rate.js +++ b/pages/examtest/rate.js @@ -66,9 +66,9 @@ Page({ */ onReachBottom: function () { //上拉分页,将页码加1,然后调用分页函数 - this.data.page = this.data.page + 1; - this.getRatelist(); - wx.stopPullDownRefresh(); + // this.data.page = this.data.page + 1; + // this.getRatelist(); + // wx.stopPullDownRefresh(); }, /** @@ -91,7 +91,6 @@ Page({ }, success: res => { if (res.statusCode === 200) { - console.log(res.data) if (res.data.rows.length == 0) { if (page == 1) { this.setData({ @@ -109,7 +108,7 @@ Page({ } else { let list if (page == 1) { - list = res.data.rows + list = res.data.rows.slice(0,10) } else { list = this.data.ratelist.concat(res.data.rows) } diff --git a/pages/examtest/rate.json b/pages/examtest/rate.json index f32dd8d..ff1efdf 100644 --- a/pages/examtest/rate.json +++ b/pages/examtest/rate.json @@ -1,5 +1,4 @@ { "usingComponents": {}, - "navigationBarTitleText": "考试排名", - "enablePullDownRefresh": true + "navigationBarTitleText": "考试排名" } \ No newline at end of file diff --git a/pages/examtest/rate.wxml b/pages/examtest/rate.wxml index 45580f1..949e92f 100644 --- a/pages/examtest/rate.wxml +++ b/pages/examtest/rate.wxml @@ -1,6 +1,6 @@ {{examtestname}} -已有{{total}}人参与 +已有{{total}}人参与,前10名如下