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