| | |
| | | } |
| | | |
| | | |
| | | Services.confirmByApple(cellPhone: tf_phone.text!, captcha: tf_code.text!, loginType: threePlantformLoginType, wxOrAppleId: unionId,name: formatName, mail: credential!.email).subscribe(onNext: {data in |
| | | Services.confirmByApple(cellPhone: tf_phone.text!, captcha: tf_code.text!, loginType: threePlantformLoginType, wxOrAppleId: unionId,name: formatName, mail: credential?.email).subscribe(onNext: {data in |
| | | if var model = data.data{ |
| | | model.loginByAppleToken = String(data: self.credential!.identityToken!, encoding: .utf8) |
| | | |
| | | if threePlantformLoginType == .apple{ |
| | | model.loginByAppleToken = String(data: self.credential!.identityToken!, encoding: .utf8) |
| | | model.appleId = self.credential!.user |
| | | } |
| | | |
| | | if threePlantformLoginType == .wechat{ |
| | | model.wechatOpenId = unionId |
| | | } |
| | | |
| | | model.accessToken = model.accessToken |
| | | model.appleId = self.credential!.user |
| | | |
| | | UserViewModel.saveLoginInfo(model) |
| | | |
| | | Services.getUserInfo().subscribe(onNext: {data in |