| | |
| | | } |
| | | |
| | | private synchronized void openOneKeyLogin(final boolean notify) { |
| | | ShoppingApi.allowOneKeyLogin(this, UserUtil.getLoginUid(this), new BasicTextHttpResponseHandler() { |
| | | aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | |
| | | @Override |
| | | public void onStart() { |
| | | DialogUtil.show(loadingDialog); |
| | | } |
| | | //TODO 一键登录权限请求 |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optBoolean("IsPost")) { |
| | | aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | } else { |
| | | if (notify) { |
| | | Toast.makeText(PhoneLoginActivity.this, jsonObject.optString("Error"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | DialogUtil.dismiss(loadingDialog); |
| | | } |
| | | }); |
| | | // ShoppingApi.allowOneKeyLogin(this, UserUtil.getLoginUid(this), new BasicTextHttpResponseHandler() { |
| | | // |
| | | // @Override |
| | | // public void onStart() { |
| | | // DialogUtil.show(loadingDialog); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | // if (jsonObject.optBoolean("IsPost")) { |
| | | // aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | // } else { |
| | | // if (notify) { |
| | | // Toast.makeText(PhoneLoginActivity.this, jsonObject.optString("Error"), Toast.LENGTH_SHORT).show(); |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onFinish() { |
| | | // DialogUtil.dismiss(loadingDialog); |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | } |