59 lines
1.2 KiB
Vue
59 lines
1.2 KiB
Vue
<template>
|
|
<view class="my_avatar">
|
|
<view style="border: 1px solid #EEEEEE;border-radius: 50rpx;">
|
|
<u-avatar :src="avatar" size="100rpx" shape="circle"></u-avatar>
|
|
</view>
|
|
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
|
|
<u--image v-if="show==false" :src="normal" width="84rpx" height="30rpx">
|
|
</u--image>
|
|
<u--image v-else :src="VIP" width="84rpx" height="30rpx">
|
|
</u--image>
|
|
</view>
|
|
<view style="display: flex;align-items: center;">
|
|
<text style="margin-right: 8rpx;">顾发航</text>
|
|
<u--image v-if="showEdit==true" src="/static/my/wd_icon_bj.png" width="22rpx" height="22rpx"
|
|
@click="changeAvatar()">
|
|
</u--image>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "myAvatar",
|
|
props: {
|
|
center: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
show: false,
|
|
showEdit: true,
|
|
avatar: 'https://cdn.uviewui.com/uview/album/2.jpg',
|
|
normal: '/static/my/wo_icon_pthy.png',
|
|
VIP: '/static/my/wo_icon_vip.png',
|
|
};
|
|
},
|
|
created() {
|
|
if (this.center != false) {
|
|
this.showEdit = false
|
|
}
|
|
},
|
|
methods: {
|
|
//修改头像
|
|
changeAvatar() {
|
|
uni.navigateTo({
|
|
url: '../../packageMy/changeAvatar/changeAvatar'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|