我的积分
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
<div class="header-content">
|
||||
<div class="top">
|
||||
<div class="total">
|
||||
<h1>4233</h1>
|
||||
<h1>{{info.integral || '0'}}</h1>
|
||||
<p>积分总额</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="item">
|
||||
<div class="num">{{ info['家庭积分'] || '0' }}</div>
|
||||
<div class="num">{{ info.serialNo || '0'}}</div>
|
||||
<div class="label">积分排行</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num">{{ info['剩余总分'] || '0' }}</div>
|
||||
<div class="num">{{ info.totalIntegral|| '0'}}</div>
|
||||
<div class="label">历史累计获取</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,10 +22,10 @@
|
||||
<div class="detail-content">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>{{ item.residentName + ':' }}{{ item.eventDesc }}</p>
|
||||
<p>{{ item.integralRuleName + ':' }}{{ item.eventDesc }}</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-' + (item.changeIntegral >= 0 ? 0 : 1)">
|
||||
<div class="item-num" :class="'color-'+ item.integralCalcType">
|
||||
{{ (item.integralCalcType == 1 ? '+' : '-') + item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,12 +49,19 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getToatl()
|
||||
},
|
||||
methods: {
|
||||
getList() {// 积分明细列表
|
||||
let url = `/app/appvillagerintegraldetail/IntegralList?residentId=${this.user.residentId}&queryType=0¤t=${this.current}&size=10` //积分明细
|
||||
this.$instance.post(url).then(res => {
|
||||
getToatl() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegraldetail/list?integralUserId=${this.info.id}¤t=${this.current}&size=10`).then(res => {
|
||||
if (res?.data) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
@@ -64,6 +71,10 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@@ -182,5 +193,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.color-1 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user