张海江
2017-08-07 957b8e9d4bc63524dad27c2f8458856da0bf5c06
app/src/main/java/com/moral/yunfushao/activity/RegisterActivity.java
@@ -93,7 +93,7 @@
                    mToatUtils.showSingletonToast("请输入手机号");
                    return;
                }
                sendMessage(mobile,1);
                sendMessage(mobile,"register");
                break;
            case R.id.bt_sure:
                String userphone = et_phone.getText().toString().trim();
@@ -126,10 +126,10 @@
    }
    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
@@ -160,7 +160,7 @@
    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() {