user-info.vue
1.4 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
<template>
<view class="user-info">
<image :src="infoList.avatar" mode=""></image>
<view class="info-desc">
<view class="name-wrap">
<text class="name">{{infoList.name}}</text>
<text class="work-or-off">{{infoList.status==1?'上班':'休息'}}</text>
</view>
<view style="color: #ffffffff;font-size: 28rpx;margin-top: 20rpx;">{{infoList.mobile}}</view>
</view>
</view>
</template>
<script>
export default {
props: {
infoList:{
type:Object
}
},
data() {
return {
// avatar: '',
// mobile: '',
// // status: '',
// name: '',
}
},
mounted() {
// this.avatar = uni.getStorageSync('avatar')
// this.name = uni.getStorageSync('name')
// this.mobile = uni.getStorageSync('mobile')
// this.status = uni.getStorageSync('status') === 1 ? '上班' : '休息'
}
}
</script>
<style lang="scss">
.user-info {
position: relative;
@include flexcenter();
margin-top: 60rpx;
margin-left: 40rpx;
image {
@include commonIconWh(120rpx);
margin-right: 24rpx;
}
.info-desc {
color: #ffffffff;
.name-wrap {
@include flexcenter();
.name {
font-size: 32rpx;
font-weight: 700;
margin-right: 12rpx
}
}
.work-or-off {
@include flexCj(center);
color: #ed3f24ff;
font-size: 24rpx;
width: 96rpx;
height: 32rpx;
border-radius: 96rpx;
background: #ffffffff;
}
}
}
</style>