|
@@ -9,7 +9,7 @@
|
|
|
<uni-th align="center">积分变动来源</uni-th>
|
|
|
<uni-th align="center">时间</uni-th>
|
|
|
</uni-tr>
|
|
|
- <uni-tr v-for="(item, index) in tableData" :key="index">
|
|
|
+ <uni-tr v-for="(item, index) in tableData" :key="index" style="height: 5em;">
|
|
|
<uni-td>{{item.name == null || item.name == '' ? item.wechatName : item.name}}</uni-td>
|
|
|
<uni-td>{{ item.scoreOperate }}</uni-td>
|
|
|
<uni-td align="center">{{ item.scoreNum }}</uni-td>
|
|
@@ -17,9 +17,9 @@
|
|
|
<uni-td align="center">{{ item.createTime }}</uni-td>
|
|
|
</uni-tr>
|
|
|
</uni-table>
|
|
|
- <view class="uni-pagination-box">
|
|
|
+ <!-- <view class="uni-pagination-box">
|
|
|
<uni-pagination show-icon :page-size="queryParams.pageSize" :current="queryParams.pageNum" :total="total" @change="change" />
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
// 当前页
|
|
|
pageNum: 1,
|
|
|
// 每页数据量
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 15,
|
|
|
//请求参数
|
|
|
userId: getApp().globalData.userId
|
|
|
},
|
|
@@ -46,22 +46,37 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
- this.selectedIndexs = [];
|
|
|
- this.getData(1);
|
|
|
+ // this.selectedIndexs = [];
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ let pageNum = this.queryParams.pageNum;
|
|
|
+ let pageSize = this.queryParams.pageSize;
|
|
|
+ let total = this.total;
|
|
|
+ if (pageNum * pageSize >= total) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无更多数据'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.queryParams.pageNum += 1;
|
|
|
+ this.getData();
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
// 分页触发
|
|
|
- change(e) {
|
|
|
+ /* change(e) {
|
|
|
this.$refs.table.clearSelection();
|
|
|
this.selectedIndexs.length = 0;
|
|
|
this.getData(e.current);
|
|
|
- },
|
|
|
+ }, */
|
|
|
// 获取数据
|
|
|
- getData(pageNum) {
|
|
|
+ getData() {
|
|
|
this.loading = true;
|
|
|
- this.queryParams.pageNum = pageNum;
|
|
|
+ // this.queryParams.pageNum = pageNum;
|
|
|
listScoreInfo(this.queryParams).then(res =>{
|
|
|
- this.tableData = res.rows
|
|
|
+ this.tableData = [...this.tableData,...res.rows]
|
|
|
+ // this.tableData = res.rows
|
|
|
this.total = res.total
|
|
|
this.loading = false;
|
|
|
});
|