1、个人信息完善
2、集成聊天功能 3、完成登录
This commit is contained in:
@@ -30,6 +30,8 @@ import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -98,25 +100,6 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
||||
return new ImproveInfoPresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void success(UserFillResp resp) {
|
||||
// UserBean user = MyApplication.getInstance().getUser();
|
||||
// user.setSex(Integer.parseInt(sex));
|
||||
// user.setNickname(nickname);
|
||||
// try {
|
||||
// user.setSex(Integer.parseInt(sex));
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// MyApplication.getInstance().setUser(user);
|
||||
// ToastUtils.showShort("设置成功");
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
// if (resp != null && !"0".equals(resp.getGift_bag_id())) {
|
||||
// intent.putExtra("giftBagUrl", resp.getGift_bag_url());
|
||||
// }
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
@@ -276,6 +259,7 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
||||
@Override
|
||||
public void updateSuccess(UserBean userBean) {
|
||||
SpUtil.saveUserInfo(userBean);
|
||||
EventBus.getDefault().post(userBean);
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
||||
@@ -16,7 +16,6 @@ public final class ImproveInfoContacts {
|
||||
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
void success(UserFillResp s);
|
||||
|
||||
void upLoadSuccess(String url, int type);
|
||||
|
||||
@@ -30,7 +29,6 @@ public final class ImproveInfoContacts {
|
||||
}
|
||||
|
||||
public interface IImproveInfoPre extends IPresenter {
|
||||
void fill(String user_no, String nickname, String sex);
|
||||
|
||||
void uploadFile(File file, int type);
|
||||
|
||||
|
||||
@@ -33,26 +33,6 @@ public class ImproveInfoPresenter extends BasePresenter<ImproveInfoContacts.View
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void fill(String user_no, String nickname, String sex) {
|
||||
MvpRef.get().showLoadings();
|
||||
// ApiClient.getInstance().userFill(user_no, nickname, sex, new BaseObserver<UserFillResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(UserFillResp s) {
|
||||
MvpRef.get().success(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFile(File file, int type) {
|
||||
|
||||
@@ -164,6 +164,7 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
EventBus.getDefault().post(userBean.get(0));
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
|
||||
}
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user