Showing
1 changed file
with
15 additions
and
6 deletions
| @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 26 | }else{ | 26 | }else{ |
| 27 | this.headPhotoUrl = "" | 27 | this.headPhotoUrl = "" |
| 28 | this.levelHead = "" | 28 | this.levelHead = "" |
| 29 | + this.userType = "1" | ||
| 29 | } | 30 | } |
| 30 | } | 31 | } |
| 31 | 32 | ||
| @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI { | @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 33 | Row(){ | 34 | Row(){ |
| 34 | //头像 | 35 | //头像 |
| 35 | Stack(){ | 36 | Stack(){ |
| 36 | - Image(this.headPhotoUrl) | ||
| 37 | - .alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) | ||
| 38 | - .width(`${this.calcHeight(100)}lpx`) | ||
| 39 | - .height(`${this.calcHeight(100)}lpx`) | ||
| 40 | - .objectFit(ImageFit.Cover) | ||
| 41 | - .borderRadius(50) | 37 | + if (this.headPhotoUrl.length > 0){ |
| 38 | + Image(this.headPhotoUrl) | ||
| 39 | + .alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) | ||
| 40 | + .width(`${this.calcHeight(100)}lpx`) | ||
| 41 | + .height(`${this.calcHeight(100)}lpx`) | ||
| 42 | + .objectFit(ImageFit.Cover) | ||
| 43 | + .borderRadius(50) | ||
| 44 | + }else { | ||
| 45 | + Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) | ||
| 46 | + .width(`${this.calcHeight(100)}lpx`) | ||
| 47 | + .height(`${this.calcHeight(100)}lpx`) | ||
| 48 | + .objectFit(ImageFit.Cover) | ||
| 49 | + .borderRadius(50) | ||
| 50 | + } | ||
| 42 | 51 | ||
| 43 | if(StringUtils.isNotEmpty(this.levelHead)){ | 52 | if(StringUtils.isNotEmpty(this.levelHead)){ |
| 44 | Image(this.levelHead) | 53 | Image(this.levelHead) |
-
Please register or login to post a comment