| | |
| | | mToatUtils.showSingletonToast("请输入手机号"); |
| | | return; |
| | | } |
| | | sendMessage(mobile,1); |
| | | sendMessage(mobile,"register"); |
| | | break; |
| | | case R.id.bt_sure: |
| | | String userphone = et_phone.getText().toString().trim(); |
| | |
| | | } |
| | | |
| | | |
| | | private void sendMessage(String tel, int type) { |
| | | private void sendMessage(String tel,String type) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("tel", tel); |
| | | params.put("type", type + ""); |
| | | params.put("phone", tel); |
| | | params.put("type", type); |
| | | String url = API.REQUEST_CODE; |
| | | HttpUtils.doPost(url, params, CacheMode.DEFAULT, true, new HttpCallBack() { |
| | | @Override |
| | |
| | | private void registerUser(String tel, final String pwd, String code) { |
| | | String url = API.REGISTER; |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("username", tel); |
| | | params.put("phone", tel); |
| | | params.put("password", pwd); |
| | | params.put("code", code); |
| | | HttpUtils.doPost(url, params, CacheMode.DEFAULT, true, new HttpCallBack() { |