index.vue
1.2 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
<template>
<view class="container">
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.name" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.telephone" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="部门" :rightText="user.deptPathsText" />
</uni-list>
</view>
</template>
<script>
export default {
data() {
return {
user: {},
}
},
onShow() {
const color = getApp().globalData.config.themeColor
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: color
})
},
onLoad() {
},
created() {
console.log('this.$store.state.user', this.$store.state.user)
this.user = {
name : this.$store.state.user.name || '',
deptPathsText : this.$store.state.user.deptPaths.length ? this.$store.state.user.deptPaths.join(',') : '',
telephone: this.$store.state.user.telephone || ''
}
},
methods: {
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
</style>