持续集成分支
This commit is contained in:
229
library/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue
Normal file
229
library/project/qianxinan/AppGirdIntegral/AppGirdIntegral.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="AppGirdIntegral">
|
||||
<AiTopFixed>
|
||||
<div class="header">
|
||||
<div class="header-bg"></div>
|
||||
<img src="./img/header-top.png" alt="" class="header-top-img" />
|
||||
<div class="header-content">
|
||||
<p class="text">个人积分</p>
|
||||
<h2>{{totalInfo['积分余额']}}</h2>
|
||||
<div class="flex">
|
||||
<div class="flex-item">
|
||||
<p class="text">累计获取积分</p>
|
||||
<div>{{totalInfo['累计获取积分']}}</div>
|
||||
</div>
|
||||
<div class="flex-item">
|
||||
<p class="text">积分排名</p>
|
||||
<div>{{totalInfo['积分排行']}}</div>
|
||||
</div>
|
||||
<span class="border-line"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div class="list-data">
|
||||
<div flex>
|
||||
<div class="title fill">积分明细</div>
|
||||
<u-icon name="question-circle" label="积分规则" color="#3F8DF5" label-color="#3F8DF5" @click="toRules"/>
|
||||
</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="flex-left">
|
||||
<p>{{item.eventDesc}}</p>
|
||||
<div>{{item.createTime}}</div>
|
||||
</div>
|
||||
<div class="flex-right" :class="`status${item.scoreCalcType}`">{{item.scoreCalcType == 0 ? '-' : '+'}}{{item.changeScore}}</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
appName: '网格员积分',
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
list: [],
|
||||
totalInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
document.title = '我的积分'
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post("/app/appscoredetail/list", null, {
|
||||
params: {
|
||||
size: 10,
|
||||
current: this.current,
|
||||
sysUserId: this.user.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res && res.data) {
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
toRules() {
|
||||
console.log(123)
|
||||
uni.navigateTo({url: './integralRules'})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppGirdIntegral {
|
||||
min-height: 100%;
|
||||
background-color: #F5F5F5;
|
||||
padding-bottom: 32px;
|
||||
|
||||
::v-deep .content {
|
||||
padding: 0;
|
||||
}
|
||||
.header {
|
||||
position: relative;
|
||||
.header-bg {
|
||||
height: 272px;
|
||||
background-color: #3975C6;
|
||||
}
|
||||
img {
|
||||
width: 342px;
|
||||
height: 218px;
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
right: 40px;
|
||||
z-index: 99;
|
||||
}
|
||||
.header-content {
|
||||
width: 686px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
position: absolute;
|
||||
top: 72px;
|
||||
left: 32px;
|
||||
text-align: center;
|
||||
padding-top: 76px;
|
||||
.text {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
}
|
||||
h2 {
|
||||
font-family: DINAlternate-Bold;
|
||||
font-weight: 700;
|
||||
font-size: 104px;
|
||||
color: #000;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
padding-bottom: 50px;
|
||||
position: relative;
|
||||
.flex-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
div {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 36px;
|
||||
color: #000;
|
||||
margin-top: 4px;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.border-line {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 14px;
|
||||
height: 60px;
|
||||
border-right: 1px solid #EDEDED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-data {
|
||||
box-sizing: border-box;
|
||||
margin: 256px 32px 0 32px;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 0 24px 52px;
|
||||
.title {
|
||||
line-height: 108px;
|
||||
padding-left: 8px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
}
|
||||
.item {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #D8DDE6;
|
||||
padding: 32px 0;
|
||||
.flex-left {
|
||||
width: calc(100% - 160px);
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
div {
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
letter-spacing: -0.29px;
|
||||
}
|
||||
}
|
||||
.flex-right {
|
||||
margin-top: 18px;
|
||||
line-height: 50px;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 36px;
|
||||
color: #2C51CE;
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
}
|
||||
.status0 {
|
||||
color: #2C51CE;
|
||||
}
|
||||
.statsu1 {
|
||||
color: #E6736E;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
library/project/qianxinan/AppGirdIntegral/img/header-top.png
Normal file
BIN
library/project/qianxinan/AppGirdIntegral/img/header-top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
45
library/project/qianxinan/AppGirdIntegral/integralRules.vue
Normal file
45
library/project/qianxinan/AppGirdIntegral/integralRules.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<section class="integralRules">
|
||||
<div v-for="(e,i) in list" :key="i" class="item">
|
||||
<span>{{e.remark}}</span>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "integralRules",
|
||||
appName: "积分规则",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post("/app/appscorerule/list?size=20").then(res => {
|
||||
if (res?.data) {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralRules {
|
||||
padding-top: 32px;
|
||||
.item{
|
||||
width: 688px;
|
||||
word-break: break-all;
|
||||
margin: 0 0 8px 32px;
|
||||
font-size: 30px;
|
||||
line-height: 44px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user