| | |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.KeFuUtil; |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.ui.dialog.DialogUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.UserCustomEvent; |
| | |
| | | } |
| | | |
| | | private synchronized void openOneKeyLogin(final boolean notify) { |
| | | aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | ShoppingApi.allowOneKeyLogin(this, new BasicTextHttpResponseHandler() { |
| | | |
| | | //TODO 一键登录权限请求 |
| | | @Override |
| | | public void onStart() { |
| | | DialogUtil.show(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); |
| | | // } |
| | | // }); |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | } else { |
| | | if (notify) { |
| | | Toast.makeText(LoginSelectActivity.this, jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | DialogUtil.dismiss(loadingDialog); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void initData(Intent intent) { |
| | |
| | | mAquery.id(R.id.tv_login_wx).clicked(this); |
| | | mAquery.id(R.id.tv_login_qq).clicked(this); |
| | | mAquery.id(R.id.tv_agree).clicked(this); |
| | | mAquery.id(R.id.tv_help).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent(getApplicationContext(), ShareBrowserActivity.class).putExtra("url", SystemParamsUtil.getHelpUrl(getApplicationContext()))); |
| | | } |
| | | }); |
| | | |
| | | |
| | | et_mobile_num.addTextChangedListener(new TextWatcher() { |