incomeHeader.vue
1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
<div>
<p class="income-title">¥<span class="amount">{{amountPart1}}</span>.{{amountPart2}}</p>
<div class="view-button" @click="goPage">查看明细</div>
<p class="income-tip">提现请至yoho!buy 有货我的钱包中提现,如需要帮助可致电400-889-9646联系电话客服</p>
</div>
</template>
<script>
import { createNamespacedHelpers } from 'vuex';
const {mapState, mapActions} = createNamespacedHelpers('home/mine');
export default {
name: 'income-header',
data() {
return {
};
},
created() {
this.fetchUserWalletInfo()
},
computed: {
...mapState(
{
amountPart1: (state) => {
return (''+state.userWalletInfo.walletAmount).split('.')[0].split('¥')[1]
},
amountPart2: (state) => {
return (''+state.userWalletInfo.walletAmount).split('.')[1]
},
}
)
},
methods: {
...mapActions(['fetchUserWalletInfo']),
goPage() {
this.$router.push({
name: 'incomeDetail'
})
}
}
};
</script>
<style lang="scss" scoped>
.income-title {
font-size: 40px;
color: #000;
margin-top: 20px;
text-align: center;
margin: 100px 0;
.amount {
font-size: 84px;
}
}
.view-button {
width: 100%;
text-align: center;
height: 88px;
line-height: 88px;
background-color: #002B47;
border-radius: 88px;
color: #fff;
font-size: 34px;
margin-bottom: 32px;
}
.income-tip {
font-size: 24px;
text-align: center;
color: #000;
}
</style>