修正头像
This commit is contained in:
parent
7f6dcd5061
commit
5ef855aa2d
@ -38,6 +38,9 @@ public class GetUserInfoResponse {
|
||||
/** 手机号 */
|
||||
private String mobile;
|
||||
|
||||
/** 头像地址 */
|
||||
private String img_host;
|
||||
|
||||
/** 头像地址 */
|
||||
private String photo;
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ public class UserService {
|
||||
user.setUnionId("");
|
||||
user.setSex(0);
|
||||
if (data.getPhoto() != null) {
|
||||
String ossPath = UserService.handleUserImage(data.getPhoto());
|
||||
String ossPath = UserService.handleUserImage(data.getImg_host() + data.getPhoto());
|
||||
user.setAvatar(ossPath);
|
||||
}else{
|
||||
user.setAvatar("");
|
||||
@ -193,10 +193,10 @@ public class UserService {
|
||||
}
|
||||
|
||||
if (data.getPhoto() != null) {
|
||||
String phone = Replace.removeOssDomain(data.getPhoto());
|
||||
String phone = Replace.removeOssDomain(data.getImg_host() + data.getPhoto());
|
||||
|
||||
if (!Objects.equals(user.getAvatar(),phone )){
|
||||
String ossPath = UserService.handleUserImage(data.getPhoto());
|
||||
String ossPath = UserService.handleUserImage(data.getImg_host() + data.getPhoto());
|
||||
user.setAvatar(ossPath);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user