|
@@ -1,5 +1,7 @@
|
|
|
package com.cooleshow.usercenter.presenter;
|
|
|
|
|
|
+import com.cooleshow.base.bean.QueryParamsConfigBean;
|
|
|
+import com.cooleshow.base.common.BaseApplication;
|
|
|
import com.cooleshow.base.data.net.ApiException;
|
|
|
import com.cooleshow.base.presenter.BasePresenter;
|
|
|
import com.cooleshow.base.rx.BaseObserver;
|
|
@@ -39,4 +41,39 @@ public class BindPasswordPresenter extends BasePresenter<BindPasswordContract.Bi
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ public void queryModifyConfig() {
|
|
|
+ getView().showLoading();
|
|
|
+ String params = "last_username_month";
|
|
|
+ if(BaseApplication.Companion.isTeacherClient()){
|
|
|
+ addSubscribe(create(UserApi.class).queryModifyNickConfigForTeacher(params), new BaseObserver<QueryParamsConfigBean>(getView()) {
|
|
|
+ @Override
|
|
|
+ protected void onSuccess(QueryParamsConfigBean data) {
|
|
|
+ if (getView() != null) {
|
|
|
+ getView().queryModifyConfigSuccess(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onError(Throwable e) {
|
|
|
+ super.onError(e);
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ addSubscribe(create(UserApi.class).queryModifyNickConfigForStu(params), new BaseObserver<QueryParamsConfigBean>(getView()) {
|
|
|
+ @Override
|
|
|
+ protected void onSuccess(QueryParamsConfigBean data) {
|
|
|
+ if (getView() != null) {
|
|
|
+ getView().queryModifyConfigSuccess(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onError(Throwable e) {
|
|
|
+ super.onError(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|