diff --git a/common/src/main/java/com/yunbao/common/bean/FirstLoginBean.java b/common/src/main/java/com/yunbao/common/bean/FirstLoginBean.java index cb70f49..34480d1 100644 --- a/common/src/main/java/com/yunbao/common/bean/FirstLoginBean.java +++ b/common/src/main/java/com/yunbao/common/bean/FirstLoginBean.java @@ -4,7 +4,7 @@ import com.google.gson.annotations.SerializedName; public class FirstLoginBean extends BaseModel{ @SerializedName("status") - int status;//0是第一次登陸,1是已經登錄過的 + int status=-1;//0是第一次登陸,1是已經登錄過的 public int getStatus() { return status; diff --git a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java index 93cb369..37fb3fe 100644 --- a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java @@ -94,8 +94,8 @@ public class InstructorOperationDialog extends AbsDialogFragment { mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - EventBus.getDefault().post(new InstructorOperationEvent()); dismiss(); + EventBus.getDefault().post(new InstructorOperationEvent()); } }); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index ea8f6d1..347a901 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -3233,14 +3233,14 @@ public class LiveNetManager { String user_nicename, String avatar, String birthday, - HttpCallback> callback) { + HttpCallback callback) { API.get().pdLiveApi(mContext) .initUserInfo(sex, user_nicename, avatar, birthday) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(roomMicStatusModelResponseModel -> { + .subscribe(listResponseModel -> { if (callback != null) { - callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo()); + callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg())); } }, new Consumer() { @Override diff --git a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java index 9c285b2..dba9107 100644 --- a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java @@ -20,6 +20,7 @@ import com.lxj.xpopup.XPopup; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.HttpCallbackModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.LiveHttpUtil; @@ -126,9 +127,13 @@ public class CompleteUserInfoActivity extends AbsActivity { userName.getText().toString(), (String) avatar.getTag(), year + "-" + (month + 1) + "-" + day, - new HttpCallback>() { + new HttpCallback() { @Override - public void onSuccess(List data) { + public void onSuccess(HttpCallbackModel data) { + if (data.getCode() == 500) { + ToastUtil.show(data.getMsg()); + return; + } String anchorId = getIntent().getStringExtra("anchor_id"); if (StringUtil.isEmpty(anchorId)) { Intent intent = new Intent(CompleteUserInfoActivity.this, MainActivity.class); @@ -226,7 +231,7 @@ public class CompleteUserInfoActivity extends AbsActivity { @Override public void onItemClick(String bean, int position) { avatar.setTag(bean); - ImgLoader.display(mContext,bean,avatar); + ImgLoader.display(mContext, bean, avatar); loading.dismiss(); } }); diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index d65665e..d600937 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -879,7 +879,11 @@ public class EditProfileActivity extends AbsActivity { public void onSuccess(MessageUserInfoBean data) { userInfoBean = data; ((TextView) findViewById(R.id.occupation)).setText(data.getInfo().getCareer()); - ((TextView) findViewById(R.id.height)).setText(data.getInfo().getHeight() + "cm"); + String height = data.getInfo().getHeight(); + if("0".equals(height)||StringUtil.isEmpty(height)){ + height="170"; + } + ((TextView) findViewById(R.id.height)).setText(height + "cm"); List tags = WordUtil.isNewZh() ? data.getInfo().getCn_label() : data.getInfo().getEn_label(); if (tags == null || tags.isEmpty()) return; StringBuilder sb = new StringBuilder(); diff --git a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java index de72741..423f00e 100644 --- a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java @@ -511,7 +511,7 @@ public class RegisterActivity extends AbsActivity { }; private void jumpMain(boolean showInvite, String anchorId) { - Intent intent = new Intent(activity, CompleteUserInfoActivity.class); + Intent intent = new Intent(activity, MainActivity.class); intent.putExtra(Constants.SHOW_INVITE, showInvite); intent.putExtra("anchor_id", anchorId); startActivity(intent); diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index 74bf5a6..8fb8121 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -395,7 +395,7 @@ public class MainHttpUtil { * @param fields 用户资料 ,以json形式出现 */ public static void updateFields(String fields, HttpCallback callback) { - HttpClient.getInstance().get("User.updateFields", MainHttpConsts.UPDATE_FIELDS) + HttpClient.getInstance().get("Pdluser.updateFields", MainHttpConsts.UPDATE_FIELDS) .params("fields", fields) .execute(callback); } diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index a64ab50..031dfb5 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -8,7 +8,6 @@ import android.text.TextUtils; import android.text.TextWatcher; import android.util.Log; import android.util.TypedValue; -import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; @@ -34,9 +33,6 @@ import com.umeng.analytics.MobclickAgent; import com.yunbao.common.bean.ImUserInfoModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.MessageChatIsAnchor; -import com.yunbao.common.bean.MessageUserInfoBean; -import com.yunbao.common.dialog.MessageSayHiNotifyDialog; -import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.live.LiveNetManager; @@ -49,8 +45,6 @@ import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.utils.StringUtil; -import com.yunbao.common.utils.ToastUtil; -import com.yunbao.common.utils.ViewUtils; import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.activity.SystemMessageActivity; @@ -58,9 +52,7 @@ import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.event.RecommendLiveRoomEvent; import com.yunbao.live.http.ImHttpUtil; import com.yunbao.main.R; -import com.yunbao.main.activity.CompleteUserInfoActivity; import com.yunbao.main.activity.MainActivity; -import com.yunbao.main.activity.MessageHiConfigRecordActivity; import com.yunbao.main.adapter.SystemMessageAdapter; import com.yunbao.main.dialog.MsgMoreDialog; import com.yunbao.main.fragment.MainMessageChatFragment; diff --git a/main/src/main/res/layout/activity_edit_profile.xml b/main/src/main/res/layout/activity_edit_profile.xml index 2dd2d68..638620b 100644 --- a/main/src/main/res/layout/activity_edit_profile.xml +++ b/main/src/main/res/layout/activity_edit_profile.xml @@ -201,6 +201,7 @@