张海江
2017-08-07 957b8e9d4bc63524dad27c2f8458856da0bf5c06
app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java
@@ -55,8 +55,8 @@
        tv_register = findView(R.id.tv_register);
        et_phone = findView(R.id.et_phone);
        et_pwd = findView(R.id.et_pwd);
        et_phone.setText("15950198162");
        et_pwd.setText("888888");
        et_phone.setText("18362724160");
        et_pwd.setText("123456");
    }
    @Override
@@ -106,7 +106,7 @@
    private void login(String tel, final String pwd) {
        String url = API.LOGIN;
        Map<String, String> params = new HashMap<>();
        params.put("username", tel);
        params.put("phone", tel);
        params.put("password", pwd);
        HttpUtils.doPost(url, params, CacheMode.DEFAULT, true, new HttpCallBack() {
            @Override
@@ -118,7 +118,7 @@
                User user = FastJsonTools.getJson(res,User.class);
                if(user!=null){
                    MainApp.theApp.sharedPreferencesUtil.saveLoginInfo(user);
//                    MainApp.theApp.userId = user.get_id();
                    MainApp.theApp.userId = user.get_id();
                    Intent intent = new Intent(getApplicationContext(), MainActivity.class);
                    Bundle bundle = new Bundle();
                    bundle.putBoolean("islogin",true);