Files
dvcp_v2_wechat_app/project/sanjianxi/AppGreatPowerIntegral/AppGreatPowerIntegral.vue

128 lines
2.5 KiB
Vue
Raw Normal View History

2022-04-20 11:48:27 +08:00
<template>
<div class="AppGreatPowerIntegral">
2022-04-20 15:49:33 +08:00
<div class="myIntegral">
2022-04-20 17:50:10 +08:00
<p>{{ data['integral'] + data['learningIntegral'] }}</p>
2022-04-20 15:49:33 +08:00
<label>我的积分</label>
</div>
2022-04-20 17:50:10 +08:00
<div class="tabs">
<div class="item">
<p>{{ data['integral'] }}</p>
<label>个人积分</label>
</div>
<div class="item">
<p>{{ data['familySurplusIntegral'] }}</p>
<label>家庭积分</label>
</div>
<div class="item">
<p>{{ data['learningIntegral'] }}</p>
<label>学习强国</label>
</div>
</div>
<div class="btn">
<div class="editBtn" @click="$linkTo(`./editIntegral?partyMemberId=${user.partyId}&id=${user.id}`)">修改学习强国</div>
</div>
2022-04-20 11:48:27 +08:00
</div>
</template>
<script>
2022-04-20 17:50:10 +08:00
import {mapState} from 'vuex'
2022-04-20 11:48:27 +08:00
export default {
name: 'AppGreatPowerIntegral',
2022-04-20 15:49:33 +08:00
appName: '学习强国',
2022-04-20 11:48:27 +08:00
data() {
return {
2022-04-20 17:50:10 +08:00
data: {}
2022-04-20 11:48:27 +08:00
}
},
2022-04-20 17:50:10 +08:00
onShow() {
this.getIntegral()
uni.$on('update', ()=>{
this.getIntegral()
})
},
computed: {
...mapState(['user'])
},
methods: {
getIntegral() {
this.$instance.post('/app/appparty/getPartyIntegralDetail',null,{
params: {
id: this.user.id,
}
}).then((res) => {
if(res?.data) {
this.data = res.data
}
})
}
}
2022-04-20 11:48:27 +08:00
}
</script>
<style lang="scss" scoped>
.AppGreatPowerIntegral {
2022-04-20 15:49:33 +08:00
.myIntegral {
2022-04-20 17:50:10 +08:00
position: relative;
2022-04-20 15:57:52 +08:00
padding-top: 30px;
box-sizing: border-box;
2022-04-20 15:49:33 +08:00
height: 344px;
width: 100%;
background: #4181FF;
text-align: center;
2022-04-20 17:50:10 +08:00
p {
2022-04-20 15:57:52 +08:00
font-size: 100px;
font-weight: 600;
color: #FFFFFF;
}
label {
font-size: 32px;
color: #FFFFFF;
}
2022-04-20 15:08:58 +08:00
}
2022-04-20 17:50:10 +08:00
.tabs {
display: flex;
position: absolute;
left: 35px;
top: 250px;
height: 176px;
width: 90%;
background: #FFF;
border-radius: 32px;
.item {
flex: 1;
text-align: center;
padding: 30px 0;
p {
font-size: 50px;
color: #333333;
font-weight: 600;
}
label {
font-size: 28px;
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 120px;
padding: 16px 32px;
box-sizing: border-box;
display: flex;
background: #F3F6F9;
.editBtn {
flex: 1;
height: 88px;
line-height: 88px;
text-align: center;
color: #FFF;
background: #4181FF;
border-radius: 16px;
}
}
2022-04-20 11:48:27 +08:00
}
</style>