| | |
| | | title = "个人资料" |
| | | |
| | | image_placeholder.isHidden = !UserViewModel.getAvatarInfo().avatar.isEmpty |
| | | image_user.sd_setImage(with: URL(string: UserViewModel.getAvatarInfo().avatar)!) |
| | | |
| | | if let url = URL(string: UserViewModel.getAvatarInfo().avatar){ |
| | | image_user.sd_setImage(with: url) |
| | | } |
| | | |
| | | tf_nickName.text = UserViewModel.getAvatarInfo().nickname |
| | | tf_realName.text = UserViewModel.getAvatarInfo().realname |
| | | tf_sign.text = UserViewModel.getAvatarInfo().signature |
| | |
| | | || location != UserViewModel.getAvatarInfo().location |
| | | || hometown != UserViewModel.getAvatarInfo().hometown |
| | | || email != UserViewModel.getAvatarInfo().email{ |
| | | Services.updateUserInfo(birthday: birthday, company: company, education: education, email: email, gender: gender, hometown: hometown, industry: industry, location: location, nickname: nickname, realname: realname, occupation: occupation, signature: signature).subscribe(onNext: {data in |
| | | NotificationCenter.default.post(name: UpdateUserProfile_Noti, object: nil) |
| | | weakSelf.navigationController?.popViewController(animated: true) |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | |
| | | CommonAlertView.show(title: "提示", content: "是否保存修改?",cancelStr: "不保存",completeStr: "保存") { state in |
| | | if state{ |
| | | Services.updateUserInfo(birthday: birthday, company: company, education: education, email: email, gender: gender, hometown: hometown, industry: industry, location: location, nickname: nickname, realname: realname, occupation: occupation, signature: signature).subscribe(onNext: {data in |
| | | NotificationCenter.default.post(name: UpdateUserProfile_Noti, object: nil) |
| | | weakSelf.navigationController?.popViewController(animated: true) |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | }else{ |
| | | weakSelf.navigationController?.popViewController(animated: true) |
| | | } |
| | | } |
| | | }else{ |
| | | weakSelf.navigationController?.popViewController(animated: true) |
| | | } |