我的积分
This commit is contained in:
@@ -1,149 +1,185 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="myIntegral">
|
||||||
<div class="header-bg">
|
<div class="header-content">
|
||||||
<u-navbar title="积分明细" title-color="#FFF" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" back-icon-color="#fff"></u-navbar>
|
<div class="top">
|
||||||
<div class="header-info">
|
<div class="total">
|
||||||
<p>我的积分</p>
|
<h1>4233</h1>
|
||||||
<h1>{{total}}</h1>
|
<p>积分总额</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list">
|
<div class="bottom">
|
||||||
<div class="title">积分明细</div>
|
<div class="item">
|
||||||
<div class="item" v-for="(item, index) in list" :key="index">
|
<div class="num">{{ info['家庭积分'] || '0' }}</div>
|
||||||
<div class="flex">
|
<div class="label">积分排行</div>
|
||||||
<div class="left">
|
</div>
|
||||||
<p>{{item.integralRuleName}}: {{item.eventDesc}}</p>
|
<div class="item">
|
||||||
<div>{{item.createTime}}</div>
|
<div class="num">{{ info['剩余总分'] || '0' }}</div>
|
||||||
</div>
|
<div class="label">历史累计获取</div>
|
||||||
<div class="right" :class="'status'+item.integralCalcType">{{item.integralCalcType ? '+' : '-'}}{{item.changeIntegral}}</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
<span> {{ item.doTime }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="item-num" :class="'color-' + (item.changeIntegral >= 0 ? 0 : 1)">
|
||||||
|
{{ (item.integralCalcType == 1 ? '+' : '-') + item.changeIntegral }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-if="!list.length"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "myIntegral",
|
name: "myIntegral",
|
||||||
customNavigation: true,
|
appName: "我的积分",
|
||||||
appName: "积分明细",
|
computed: {
|
||||||
|
...mapState(['user', 'token'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
backgroundNavbar: {
|
info: {},
|
||||||
background: 'url(https://cdn.cunwuyun.cn/qujing/my-header-nav.png) no-repeat',
|
|
||||||
backgroundSize: '100% 100%',
|
|
||||||
},
|
|
||||||
current: 1,
|
current: 1,
|
||||||
pages: 2,
|
|
||||||
list: [],
|
list: [],
|
||||||
total: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getTotal()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {// 积分明细列表
|
||||||
if(this.current > this.pages) return
|
let url = `/app/appvillagerintegraldetail/IntegralList?residentId=${this.user.residentId}&queryType=0¤t=${this.current}&size=10` //积分明细
|
||||||
this.$instance.post(`/app/appwechatuserqujing/queryUserIntegralDetail?size=20¤t=${this.current}`).then(res => {
|
this.$instance.post(url).then(res => {
|
||||||
if (res.code == 0) {
|
if (res?.data) {
|
||||||
this.pages = res.data.pages
|
if (this.current > res.data.pages) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTotal() {
|
|
||||||
this.$instance.post(`/app/appwechatuserqujing/queryUserIntegral`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.total = res.data.integral || 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
this.current ++
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "~dvcp-wui/common";
|
.myIntegral {
|
||||||
.page {
|
width: 100vw;
|
||||||
width: 100%;
|
overflow-x: hidden;
|
||||||
background-color: #F4F5FA;
|
height: calc(100% - 136px);
|
||||||
.header-bg {
|
background-color: #f3f6f9;
|
||||||
width: 100%;
|
|
||||||
.header-info {
|
.header-content {
|
||||||
width: 100%;
|
width: 690px;
|
||||||
height: 304px;
|
height: 358px;
|
||||||
background: url("https://cdn.cunwuyun.cn/qujing/my-header-bg.png") no-repeat no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 32px 0 0 32px;
|
|
||||||
p {
|
|
||||||
font-family: PingFangSC-SNaNpxibold;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 34px;
|
|
||||||
color: #FFF;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-family: AlibabaPuHuiTiB;
|
|
||||||
font-size: 96px;
|
|
||||||
color: #FFF;
|
|
||||||
line-height: 112px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.list {
|
|
||||||
width: calc(100% - 64px);
|
|
||||||
margin: -56px 0 0 32px;
|
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 0 32px 66px;
|
margin: 70px 0 40px 30px;
|
||||||
box-sizing: border-box;
|
position: relative;
|
||||||
.title {
|
.top {
|
||||||
line-height: 108px;
|
width: 100%;
|
||||||
font-family: PingFangSC-Medium;
|
height: 213px;
|
||||||
font-weight: 500;
|
z-index: 99;
|
||||||
font-size: 34px;
|
.total {
|
||||||
color: #333;
|
width: 50%;
|
||||||
|
padding-top: 48px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
h1 {
|
||||||
|
font-size: 68px;
|
||||||
|
color: #5AAD6A;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 100%;
|
||||||
|
height: 145px;
|
||||||
|
padding: 16px 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-top: 2px solid #EEEEEE;
|
||||||
|
.item {
|
||||||
|
text-align: center;
|
||||||
|
z-index: 99;
|
||||||
|
|
||||||
|
.num {
|
||||||
|
font-family: DIN;
|
||||||
|
font-size: 48px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 24px;
|
||||||
|
color: #999;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
position: absolute;
|
||||||
|
width: 360px;
|
||||||
|
height: 250px;
|
||||||
|
top: -40px;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-content {
|
||||||
|
width: 690px;
|
||||||
|
background: #FFF;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 0 0 0 32px;
|
||||||
|
padding: 30px 30px 94px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
border-bottom: 1px solid #eee;
|
padding: 34px 0 32px 0;
|
||||||
padding: 32px 0;
|
border-bottom: 2px solid #ddd;
|
||||||
.flex {
|
display: flex;
|
||||||
display: flex;
|
|
||||||
.left {
|
.item-info {
|
||||||
width: calc(100% - 120px);
|
width: 500px;
|
||||||
p {
|
|
||||||
font-family: PingFangSC-Regular;
|
p {
|
||||||
font-size: 32px;
|
word-break: break-all;
|
||||||
color: #333;
|
font-size: 32px;
|
||||||
margin-bottom: 8px;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
line-height: 44px;
|
font-weight: 400;
|
||||||
}
|
color: #333;
|
||||||
div {
|
line-height: 44px;
|
||||||
font-family: PingFangSC-Regular;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.right {
|
|
||||||
width: 120px;
|
span {
|
||||||
text-align: right;
|
display: inline-block;
|
||||||
font-family: PingFangSC-SNaNpxibold;
|
margin-top: 8px;
|
||||||
font-weight: 600;
|
font-size: 24px;
|
||||||
font-size: 36px;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
}
|
font-weight: 400;
|
||||||
.status0 {
|
color: #999;
|
||||||
color: #2C51CE;
|
line-height: 34px;
|
||||||
}
|
|
||||||
.status1 {
|
|
||||||
color: #E6736E;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-num {
|
||||||
|
width: calc(100% - 500px);
|
||||||
|
text-align: right;
|
||||||
|
font-size: 36px;
|
||||||
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user