|
@@ -1,22 +1,75 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
-
|
|
|
|
|
|
+ <view class="uni-container">
|
|
|
|
+ <uni-table ref="table" :loading="loading" border stripe type="selection" emptyText="暂无更多数据">
|
|
|
|
+ <uni-tr>
|
|
|
|
+ <uni-th align="center">姓名</uni-th>
|
|
|
|
+ <uni-th align="center">积分变动</uni-th>
|
|
|
|
+ <uni-th align="center">剩余积分</uni-th>
|
|
|
|
+ <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-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>
|
|
|
|
+ <uni-td align="center">{{ item.relevance }}</uni-td>
|
|
|
|
+ <uni-td align="center">{{ item.createTime }}</uni-td>
|
|
|
|
+ </uni-tr>
|
|
|
|
+ </uni-table>
|
|
|
|
+ <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>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+import {listScoreInfo} from '@/api/me/meOperate.js';
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ searchVal: '',
|
|
|
|
+ tableData: [],
|
|
|
|
+ // 数据总量
|
|
|
|
+ total: 0,
|
|
|
|
+ userId : null,
|
|
|
|
+ queryParams:{
|
|
|
|
+ // 当前页
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ // 每页数据量
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ //请求参数
|
|
|
|
+ userId: getApp().globalData.userId
|
|
|
|
+ },
|
|
|
|
+ loading: false,
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ onLoad() {
|
|
|
|
+ this.selectedIndexs = [];
|
|
|
|
+ this.getData(1);
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 分页触发
|
|
|
|
+ change(e) {
|
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
|
+ this.selectedIndexs.length = 0;
|
|
|
|
+ this.getData(e.current);
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
-
|
|
|
|
|
|
+ // 获取数据
|
|
|
|
+ getData(pageNum) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ this.queryParams.pageNum = pageNum;
|
|
|
|
+ listScoreInfo(this.queryParams).then(res =>{
|
|
|
|
+ this.tableData = res.rows
|
|
|
|
+ this.total = res.total
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
-
|
|
|
|
|
|
+@import './meOperate.css';
|
|
</style>
|
|
</style>
|