Files
dvcp_v2_wechat_app/src/project/qujing/AppMine/integralInfo.vue
2023-02-23 15:25:36 +08:00

142 lines
3.5 KiB
Vue

<template>
<div class="page">
<div class="header-bg">
<u-navbar title="积分明细" title-color="#FFF" title-width="300" title-size="26" :background="backgroundNavbar" back-icon-color="#fff"></u-navbar>
<div class="header-info">
<p>我的积分</p>
<h1>142</h1>
</div>
</div>
<div class="list">
<div class="title">积分明细</div>
<div class="item" v-for="(item, index) in list" :key="index">
<div class="flex">
<div class="left">
<p>{{item.integralRuleName}}: {{item.eventDesc}}</p>
<div>{{item.createTime}}</div>
</div>
<div class="right" :class="'status'+item.integralCalcType">{{item.integralCalcType ? '+' : '-'}}{{item.changeIntegral}}</div>
</div>
</div>
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-if="!list.length"/>
</div>
</div>
</template>
<script>
export default {
name: "integralInfo",
customNavigation: true,
appName: "积分明细",
data() {
return {
backgroundNavbar: {
background: 'url(https://cdn.cunwuyun.cn/qujing/my-header-nav.png) no-repeat',
backgroundSize: '100% 100%',
},
current: 1,
pages: 2,
list: []
}
},
onLoad() {
this.getList()
},
methods: {
getList() {
if(this.current > this.pages) return
this.$instance.post(`/app/appwechatuserqujing/queryUserIntegralDetail?size=20&current=${this.current}`).then(res => {
if (res.code == 0) {
this.pages = res.data.pages
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
}
},
onReachBottom() {
this.current ++
this.getList()
}
}
</script>
<style scoped lang="scss">
@import "~dvcp-wui/common";
.page {
width: 100%;
background-color: #F4F5FA;
.header-bg {
width: 100%;
.header-info {
width: 100%;
height: 304px;
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;
border-radius: 16px;
padding: 0 32px 66px;
box-sizing: border-box;
.title {
line-height: 108px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #333;
}
.item {
border-bottom: 1px solid #eee;
padding: 32px 0;
.flex {
display: flex;
.left {
width: calc(100% - 120px);
p {
font-family: PingFangSC-Regular;
font-size: 32px;
color: #333;
margin-bottom: 8px;
line-height: 44px;
}
div {
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
}
}
.right {
width: 120px;
text-align: right;
font-family: PingFangSC-SNaNpxibold;
font-weight: 600;
font-size: 36px;
}
.status0 {
color: #2C51CE;
}
.status1 {
color: #E6736E;
}
}
}
}
}
</style>