|
|
|
@ -5,8 +5,13 @@ |
|
|
|
|
<view class="name-text"> |
|
|
|
|
头像 |
|
|
|
|
</view> |
|
|
|
|
<image @click="chooseImage()" :src="info.avatar_url ? info.avatar_url : '/static/default-logo.png'" |
|
|
|
|
class="image_logo"></image> |
|
|
|
|
<view class="avatar"> |
|
|
|
|
<image :src="info.avatar_url ? info.avatar_url : '/static/default-logo.png'" |
|
|
|
|
class="image_logo"></image> |
|
|
|
|
<button open-type="chooseAvatar" @chooseavatar="chooseavatar"></button> |
|
|
|
|
</view> |
|
|
|
|
<!-- <image @click="chooseImage()" :src="info.avatar_url ? info.avatar_url : '/static/default-logo.png'" |
|
|
|
|
class="image_logo"></image> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="box-avter conten-height"> |
|
|
|
|
<view class="name-text"> |
|
|
|
@ -100,6 +105,17 @@ export default { |
|
|
|
|
this.genderIndex = this.info.gender == '男' ? 0 : 1 |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
chooseavatar(e){ |
|
|
|
|
console.log(e) |
|
|
|
|
let tempFiles = e.detail.avatarUrl; |
|
|
|
|
this.info.avatar_url = tempFiles |
|
|
|
|
this.imageList = this.imageList.concat([ |
|
|
|
|
{ |
|
|
|
|
path: tempFiles |
|
|
|
|
} |
|
|
|
|
]) |
|
|
|
|
this.uploadFile() |
|
|
|
|
}, |
|
|
|
|
sureSubmit() { |
|
|
|
|
let params = { |
|
|
|
|
nick_name: this.info.nick_name, |
|
|
|
@ -265,7 +281,20 @@ page { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #303030; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.avatar{ |
|
|
|
|
width: 114rpx; |
|
|
|
|
height: 114rpx; |
|
|
|
|
position: relative; |
|
|
|
|
} |
|
|
|
|
.avatar button{ |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
position: absolute; |
|
|
|
|
left: 0; |
|
|
|
|
top: 0; |
|
|
|
|
z-index: 2; |
|
|
|
|
opacity: 0; |
|
|
|
|
} |
|
|
|
|
.image_logo { |
|
|
|
|
width: 114rpx; |
|
|
|
|
height: 114rpx; |
|
|
|
|