index.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
<template>
<view class="UserInfo" @click="$service.jump" data-url="/page_admin/one_setting/one_setting">
<view class="UserInfo-l">
<u--image
shape="circle"
height="88rpx"
width="88rpx"
:src="info.img_url"></u--image>
<text class="UserInfo-l-n">{{ info.name }}</text>
<text class="UserInfo-l-l">管理员</text>
</view>
<view class="UserInfo-r">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</template>
<script>
export default {
name: 'UserInfo',
data() {
return {
info: {}
}
},
mounted() {
this.getData()
},
methods: {
getData() {
var datas = {}
var jkurl = '/admin'
this.$service.P_get(jkurl, datas).then(res => {
console.log(res)
this.info = res.data
this.$store.commit('setuserinfo', res.data)
})
}
}
}
</script>
<style lang="scss" scoped>
.UserInfo{
border-radius: 15rpx;
box-shadow: 7px 0px 24px 0px rgba(153,153,153,0.22);
background: #F8F8F8;
height: 180rpx;
padding: 0 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
.UserInfo-l{
display: flex;
align-items: center;
.UserInfo-l-n{
font-size: 30rpx;
color: #3D4054;
margin: 0 20rpx;
font-weight: bold;
}
.UserInfo-l-l{
border-radius: 3rpx;
background: #EBF2F8;
font-size: 22rpx;
line-height: 32rpx;
padding: 0 10rpx;
color: #3C80D7;
}
}
}
</style>