修正头像

This commit is contained in:
wucongxing8150 2025-07-30 13:49:38 +08:00
parent 7f6dcd5061
commit 5ef855aa2d
2 changed files with 6 additions and 3 deletions

View File

@ -38,6 +38,9 @@ public class GetUserInfoResponse {
/** 手机号 */
private String mobile;
/** 头像地址 */
private String img_host;
/** 头像地址 */
private String photo;

View File

@ -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);
}
}