profile.vue
2.73 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
<view class="list">
<view class="my-info">
<view class="item">
<view class="u-f content">
<view class="u-f1">
姓名
</view>
<view class="u-f3 common">
{{info.userName}}
</view>
</view>
</view>
<view class="item">
<view class="u-f content">
<view class="u-f1">
账号
</view>
<view class="u-f3 common">
{{info.createBy}}
</view>
</view>
</view>
<view class="item">
<view class="u-f content">
<view class="u-f1">
性别
</view>
<view class="u-f3 common">
{{info.sex == '0'?'男':'女'}}
</view>
</view>
</view>
<view class="item">
<view class="u-f content">
<view class="u-f1">
手机号码
</view>
<view class="u-f3 common">
{{info.phonenumber}}
</view>
</view>
</view>
<view class="item">
<view class="u-f content">
<view class="u-f1">
邮箱
</view>
<view class="u-f3 common">
{{info.email}}
</view>
</view>
</view>
<view class="item">
<view class="u-f content">
<view class="u-f1">
所属部门
</view>
<view class="u-f3 common">
{{info.dept.deptName}}
</view>
</view>
</view>
<view class="item last">
<view class="u-f content">
<view class="u-f1">
所属角色
</view>
<view class="u-f3 common">
{{info.roles[0].roleName}}
</view>
</view>
</view>
</view>
<view class="line">
</view>
<view class="footer">
<button class="btn" type="default" @tap="back" plain>返回</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {}
}
},
onLoad() {
try {
const obj = uni.getStorageSync('my_profile');
if (obj) {
this.info = obj
}
} catch (e) {
// error
}
},
methods: {
back() {
uni.navigateBack({
delta: 1,
});
}
},
}
</script>
<style lang="scss" scoped>
.list {
position: fixed;
width: 100%;
.my-info {
margin-top: $uni-spacing-col-base;
padding-left: $uni-spacing-row-base;
background-color: $uni-bg-color;
font-size: $uni-font-size-lg;
.item {
height: 90rpx;
line-height: 90rpx;
border-bottom: 2rpx solid $uni-border-color;
.content {
padding: 0 $uni-spacing-row-base;
.common {
text-align: right;
}
}
}
.last {
border-bottom: none;
}
}
.line {
border-top: 2rpx solid $uni-border-color;
}
.footer {
margin-top: 50rpx;
padding: 0 50rpx;
.btn {
height: 80rpx;
line-height: 80rpx;
border-radius: 50rpx;
font-size: 36rpx;
border: 2rpx solid $uni-border-color;
background-color: $uni-bg-color;
}
}
}
</style>