黔西南积分

This commit is contained in:
liuye
2022-12-30 17:45:53 +08:00
parent 5c5997a5a8
commit 762e538262
8 changed files with 148 additions and 97 deletions

View File

@@ -6,15 +6,15 @@
<img src="./img/header-top.png" alt="" class="header-top-img" />
<div class="header-content">
<p class="text">个人积分</p>
<h2>297</h2>
<h2>{{totalInfo['积分余额']}}</h2>
<div class="flex">
<div class="flex-item">
<p class="text">个人积分</p>
<div>97</div>
<p class="text">累计获取积分</p>
<div>{{totalInfo['累计获取积分']}}</div>
</div>
<div class="flex-item">
<p class="text">积分排名</p>
<div>97</div>
<div>{{totalInfo['积分排行']}}</div>
</div>
<span class="border-line"></span>
</div>
@@ -23,14 +23,14 @@
</AiTopFixed>
<div class="list-data">
<div class="title">积分明细</div>
<div class="item">
<div class="item" v-for="(item, index) in list" :key="index">
<div class="flex-left">
<p>完善居民信息</p>
<div>2022-08-18 13:45:36</div>
<p>{{item.eventDesc}}</p>
<div>{{item.createTime}}</div>
</div>
<div class="flex-right status0">20</div>
<div class="flex-right" :class="`status${item.scoreCalcType}`">{{item.scoreCalcType == 1 ? '-' : '+'}}{{item.changeScore}}</div>
</div>
<!-- <AiEmpty v-if="!list.length"></AiEmpty> -->
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</div>
@@ -44,6 +44,7 @@
return {
current: 1,
list: [],
totalInfo: {}
}
},
@@ -52,42 +53,39 @@
},
created() {
this.$dict.load("workTaskType").then(() => {
this.getList()
})
uni.$on('getList', () => {
this.current = 1
this.getList()
})
this.getList()
this.getTotal()
},
onShow() {
document.title = '网格员积分'
this.current = 1
this.getList()
},
methods: {
getList() {
this.$http.post("/app/appworktaskinfo/list", null, {
this.$http.post("/app/appscoredetail/list", null, {
params: {
...this.map(this.index),
size: 10,
current: this.current
}
}).then(res => {
if (res && res.data) {
if (this.current > 1 && this.current > res.data.pages) {
this.status = "已经到底啦"
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
}
},
getTotal() {
this.$http.post(`/app/appscoredetail/myScore`).then(res=> {
if(res?.data) {
this.totalInfo = res.data
}
})
},
},
onReachBottom() {
this.current = this.current + 1;
this.current++
this.getList()
}
}