初始化代码
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
package com.qxcm.modulelogin.present;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
import com.qxcm.modulelogin.bean.UserFillResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class ImproveInfoPresenter extends BasePresenter<ImproveInfoContacts.View> implements ImproveInfoContacts.IImproveInfoPre {
|
||||
public ImproveInfoPresenter(ImproveInfoContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
@Override
|
||||
public void upDateUserInfo(Map<String, String> map) {
|
||||
// ApiClient.getInstance().userUpdate(map, new BaseObserver<String>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(String s) {
|
||||
// MvpRef.get().updateSuccess();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// }
|
||||
// });
|
||||
}
|
||||
@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) {
|
||||
// MvpRef.get().showLoadings("上传中...");
|
||||
// String url = OSSOperUtils.getPath(file, type);
|
||||
// OSSOperUtils.newInstance().putObjectMethod(url, file.getPath(), new OSSOperUtils.OssCallback() {
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// if (isViewAttach()) {
|
||||
// MvpRef.get().disLoadings();
|
||||
// MvpRef.get().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail() {
|
||||
// if (isViewAttach()) {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAvatar(String headPicture) {
|
||||
MvpRef.get().showLoadings();
|
||||
// ApiClient.getInstance().updateAvatar(headPicture, new BaseObserver<String>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(String s) {
|
||||
// MvpRef.get().updateAvatarSuccess(headPicture);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateNickname() {
|
||||
// TODO: 2019/1/15 完善昵称修改功能
|
||||
MvpRef.get().showLoadings();
|
||||
// api.upUserNickname(new BaseObserver<UserNickBean>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(UserNickBean s) {
|
||||
// MvpRef.get().updateNicknameSuccess(s.getNickname());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSexTrue(String sex) {
|
||||
// TODO: 2019/1/15 完善性别获取头像信息
|
||||
MvpRef.get().showLoadings();
|
||||
// api.upUserTrue(sex, new BaseObserver<UserPictrue>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(UserPictrue userPictrue) {
|
||||
// MvpRef.get().updateSexTrue(userPictrue);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user