update code according to comments

1. switch to prod env
2. update error message
3. remove reponse data when weibo login failed.
This commit is contained in:
yahjiang 2018-10-22 15:44:47 +08:00
Родитель d844533473
Коммит 756357fb63
3 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -12,7 +12,7 @@
//--------------CEFServiceManager-----------------------
#define CEFService_DefaultEndpoint @"https://dev.cef.chinacloudapi.cn"
#define CEFService_DefaultEndpoint @"https://cef.chinacloudapi.cn"
#define CEFService_APIVersion @"api-version=2018-10-01"
//--------------CEFServiceSocialLogin----------------

Просмотреть файл

@ -4,10 +4,10 @@
#define CEFEM_CEFAccount_NotSetted @"CEF Account Config Error!"
#define CEFEM_CEFSocialLogin_WechatNotInstalled @"WeChat App does not installed."
#define CEFEM_CEFSocialLogin_WechatNotConfig @"wechatAppkey appkey or wechatSecret not configured."
#define CEFEM_CEFSocialLogin_WeiboNotConfig @"weiboAppkey or weiboRedirectURL not configured."
#define CEFEM_CEFSocialLogin_QQNotConfig @"qqAppkey not configured."
#define CEFEM_CEFSocialLogin_WechatNotInstalled @"WeChat App is not installed."
#define CEFEM_CEFSocialLogin_WechatNotConfig @"wechatAppkey or wechatSecret are not configured."
#define CEFEM_CEFSocialLogin_WeiboNotConfig @"weiboAppkey or weiboRedirectURL are not configured."
#define CEFEM_CEFSocialLogin_QQNotConfig @"qqAppkey is not configured."
#define CEFEM_CEFSocialLogin_QQUpdateFailed @"TencentDidUpdate Failed."
#define CEFEM_CEFSocialLogin_QQDidNotNetWork @"tencentDidNotNetWork issue."

Просмотреть файл

@ -53,18 +53,17 @@
if(resp.statusCode == WeiboSDKResponseStatusCodeSuccess)
{
self.response.resultCode = CEFSocialLoginResultSuccess;
self.response.ID = resp.userID;
self.response.accessToken = resp.accessToken;
self.response.refreshToken = resp.refreshToken;
self.response.expirationDate = resp.expirationDate;
}else if(resp.statusCode == WeiboSDKResponseStatusCodeUserCancel){
self.response.resultCode = CEFSocialLoginResultUserCancel;
}else{
self.response.resultCode = CEFSocialLoginResultTokenFailure;
}
self.response.ID = resp.userID;
self.response.accessToken=resp.accessToken;
self.response.refreshToken = resp.refreshToken;
self.response.expirationDate = resp.expirationDate;
self.completion(self.response);
}else {
self.response.resultCode = CEFSocialLoginResultUnknownError;