diff --git a/common/src/main/java/com/yunbao/common/bean/DressModel.java b/common/src/main/java/com/yunbao/common/bean/DressModel.java new file mode 100644 index 000000000..7ea89d1ce --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/DressModel.java @@ -0,0 +1,59 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +/** + * 用户关联数据 + */ +public class DressModel extends BaseModel { + /** + * avatar_frame : + * bubble : + * medal_new : + */ + + @SerializedName("avatar_frame") + private String avatarFrame = ""; + @SerializedName("bubble") + private String bubble = ""; + @SerializedName("medal_new") + private String medalNew = ""; + @SerializedName("medal") + private String medal = ""; + + public String getAvatarFrame() { + return avatarFrame; + } + + public DressModel setAvatarFrame(String avatarFrame) { + this.avatarFrame = avatarFrame; + return this; + } + + public String getBubble() { + return bubble; + } + + public DressModel setBubble(String bubble) { + this.bubble = bubble; + return this; + } + + public String getMedalNew() { + return medalNew; + } + + public DressModel setMedalNew(String medalNew) { + this.medalNew = medalNew; + return this; + } + + public String getMedal() { + return medal; + } + + public DressModel setMedal(String medal) { + this.medal = medal; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java index a0e843545..f67c931c1 100644 --- a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java +++ b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java @@ -2,8 +2,11 @@ package com.yunbao.common.bean; import com.google.gson.annotations.SerializedName; +import java.util.List; + /** * 登录账号的数据类型(和com.yunbao.common.bean.UserBean重复分别单独使用,后续优化去掉其中一个) + * 整合getBaseInfos接口数据 */ public class IMLoginModel extends BaseModel { @@ -38,6 +41,34 @@ public class IMLoginModel extends BaseModel { * vip : {"type":"0"} * votestotal : 0 */ + /** + * agent_switch : 0 + * avatar2 : + * coin : 7928433 + * consumption : 5093777 + * dress : {"avatar_frame":"","bubble":"","medal_new":""} + * family_switch : 0 + * fans : 0 + * follows : 0 + * front_task : 1 + * gold : 3648 + * goldsumption : 0 + * id : 97809 + * is_bind : 1 + * list : [[{"href":"","id":"2","name":"我的錢包","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/money.png"},{"href":"https://ceshi.yaoulive.com/h5/shoppingMall.html","id":"4","name":"購物商城","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/nshop.png"},{"href":"https://ceshi.yaoulive.com/index.php?g=Appapi&m=Equipment&a=index","id":"5","name":"個性裝扮","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/equipment.png"},{"href":"https://ceshi.yaoulive.com/index.php?g=Appapi&m=task&a=index","id":"23","name":"獎勵中心","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/LEFTNAV-ICON-2.png"},{"href":"https://ceshi.yaoulive.com/index.php?g=Appapi&m=Fans&a=index","id":"31","name":"粉絲徽章","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/fens.png"},{"href":"https://ceshi.yaoulive.com/index.php?g=Appapi&m=Level&a=index","id":"3","name":"我的等級","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/level.png"},{"href":"https://ceshi.yaoulive.com/index.php?g=Appapi&m=Auth&a=index","id":"11","name":"主播中心","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/auth.png"},{"href":"","id":"20","name":"房間管理","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/room.png"},{"href":"https://ceshi.yaoulive.com/h5/table/package.html?t=1","id":"24","name":"我的包裹","thumb":"https://qny.shayucm.com/icon_baoguo%402x.png"}],[{"href":"","id":"13","name":"設定","thumb":"https://ceshi.yaoulive.com/public/appapi/images/personal/set.png"}]] + * lives : 0 + * medal_level : 0 + * medal_no_display_src : + * mobile : 66001 + * noble_id : 0 + * noble_name : 贵族 + * sex : 1 + * slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}] + * users_type : A + * votes : 0.00 + * votestotal : 0 + * yuanbao : 4294838407 + */ //用户头像 @SerializedName("avatar") private String avatar = ""; @@ -137,42 +168,40 @@ public class IMLoginModel extends BaseModel { //是否是管理员 @SerializedName("is_admin") private String isAdmin = ""; + @SerializedName("agent_switch") + private String agentSwitch = ""; + @SerializedName("avatar2") + private String avatar2 = ""; - public String getIsAdmin() { - return isAdmin; - } + @SerializedName("dress") + private DressModel dress = new DressModel(); + @SerializedName("family_switch") + private long familySwitch = 0; + @SerializedName("fans") + private long fans = 0; + @SerializedName("follows") + private long follows = 0; - public IMLoginModel setIsAdmin(String isAdmin) { - this.isAdmin = isAdmin; - return this; - } - - public String getNum() { - return num; - } - - public IMLoginModel setNum(String num) { - this.num = num; - return this; - } - - public long getFirstLogin() { - return firstLogin; - } - - public IMLoginModel setFirstLogin(long firstLogin) { - this.firstLogin = firstLogin; - return this; - } - - public long getIsagent() { - return isagent; - } - - public IMLoginModel setIsagent(long isagent) { - this.isagent = isagent; - return this; - } + @SerializedName("is_bind") + private long isBind = 0; + @SerializedName("lives") + private long lives = 0; + @SerializedName("medal_no_display_src") + private String medalNoDisplaySrc = ""; + @SerializedName("mobile") + private String mobile = ""; + @SerializedName("noble_name") + private String nobleName = ""; + @SerializedName("users_type") + private String usersType; + @SerializedName("votes") + private String votes; + @SerializedName("yuanbao") + private long yuanbao; + @SerializedName("list") + private List> list; + @SerializedName("slide") + private List slide; public String getAvatar() { return avatar; @@ -434,4 +463,186 @@ public class IMLoginModel extends BaseModel { this.votestotal = votestotal; return this; } + + public long getFirstLogin() { + return firstLogin; + } + + public IMLoginModel setFirstLogin(long firstLogin) { + this.firstLogin = firstLogin; + return this; + } + + public long getIsagent() { + return isagent; + } + + public IMLoginModel setIsagent(long isagent) { + this.isagent = isagent; + return this; + } + + public String getNum() { + return num; + } + + public IMLoginModel setNum(String num) { + this.num = num; + return this; + } + + public String getIsAdmin() { + return isAdmin; + } + + public IMLoginModel setIsAdmin(String isAdmin) { + this.isAdmin = isAdmin; + return this; + } + + public String getAgentSwitch() { + return agentSwitch; + } + + public IMLoginModel setAgentSwitch(String agentSwitch) { + this.agentSwitch = agentSwitch; + return this; + } + + public String getAvatar2() { + return avatar2; + } + + public IMLoginModel setAvatar2(String avatar2) { + this.avatar2 = avatar2; + return this; + } + + + public DressModel getDress() { + return dress; + } + + public IMLoginModel setDress(DressModel dress) { + this.dress = dress; + return this; + } + + public long getFamilySwitch() { + return familySwitch; + } + + public IMLoginModel setFamilySwitch(long familySwitch) { + this.familySwitch = familySwitch; + return this; + } + + public long getFans() { + return fans; + } + + public IMLoginModel setFans(long fans) { + this.fans = fans; + return this; + } + + public long getFollows() { + return follows; + } + + public IMLoginModel setFollows(long follows) { + this.follows = follows; + return this; + } + + + public long getIsBind() { + return isBind; + } + + public IMLoginModel setIsBind(long isBind) { + this.isBind = isBind; + return this; + } + + public long getLives() { + return lives; + } + + public IMLoginModel setLives(long lives) { + this.lives = lives; + return this; + } + + public String getMedalNoDisplaySrc() { + return medalNoDisplaySrc; + } + + public IMLoginModel setMedalNoDisplaySrc(String medalNoDisplaySrc) { + this.medalNoDisplaySrc = medalNoDisplaySrc; + return this; + } + + public String getMobile() { + return mobile; + } + + public IMLoginModel setMobile(String mobile) { + this.mobile = mobile; + return this; + } + + public String getNobleName() { + return nobleName; + } + + public IMLoginModel setNobleName(String nobleName) { + this.nobleName = nobleName; + return this; + } + + public String getUsersType() { + return usersType; + } + + public IMLoginModel setUsersType(String usersType) { + this.usersType = usersType; + return this; + } + + public String getVotes() { + return votes; + } + + public IMLoginModel setVotes(String votes) { + this.votes = votes; + return this; + } + + public long getYuanbao() { + return yuanbao; + } + + public IMLoginModel setYuanbao(long yuanbao) { + this.yuanbao = yuanbao; + return this; + } + + public List> getList() { + return list; + } + + public IMLoginModel setList(List> list) { + this.list = list; + return this; + } + + public List getSlide() { + return slide; + } + + public IMLoginModel setSlide(List slide) { + this.slide = slide; + return this; + } } diff --git a/common/src/main/java/com/yunbao/common/bean/ListModel.java b/common/src/main/java/com/yunbao/common/bean/ListModel.java new file mode 100644 index 000000000..a39a1416d --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/ListModel.java @@ -0,0 +1,57 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class ListModel extends BaseModel { + /** + * href : + * id : 2 + * name : 我的錢包 + * thumb : https://ceshi.yaoulive.com/public/appapi/images/personal/money.png + */ + + @SerializedName("href") + private String href = ""; + @SerializedName("id") + private String id = ""; + @SerializedName("name") + private String name = ""; + @SerializedName("thumb") + private String thumb = ""; + + public String getHref() { + return href; + } + + public ListModel setHref(String href) { + this.href = href; + return this; + } + + public String getId() { + return id; + } + + public ListModel setId(String id) { + this.id = id; + return this; + } + + public String getName() { + return name; + } + + public ListModel setName(String name) { + this.name = name; + return this; + } + + public String getThumb() { + return thumb; + } + + public ListModel setThumb(String thumb) { + this.thumb = thumb; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/SlideModel.java b/common/src/main/java/com/yunbao/common/bean/SlideModel.java new file mode 100644 index 000000000..af3290f9b --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/SlideModel.java @@ -0,0 +1,117 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class SlideModel extends BaseModel { + /** + * listorder : 0 + * slide_cid : 4 + * slide_content : + * slide_des : 首充特惠大禮包 + * slide_id : 91 + * slide_name : 首充特惠大禮包 + * slide_pic : https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif + * slide_status : 1 + * slide_url : https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html + */ + + @SerializedName("listorder") + private long listorder = 0; + @SerializedName("slide_cid") + private long slideCid = 0; + @SerializedName("slide_content") + private String slideContent = ""; + @SerializedName("slide_des") + private String slideDes = ""; + @SerializedName("slide_id") + private long slideId = 0; + @SerializedName("slide_name") + private String slideName = ""; + @SerializedName("slide_pic") + private String slidePic = ""; + @SerializedName("slide_status") + private long slideStatus = 0; + @SerializedName("slide_url") + private String slideUrl = ""; + + public long getListorder() { + return listorder; + } + + public SlideModel setListorder(long listorder) { + this.listorder = listorder; + return this; + } + + public long getSlideCid() { + return slideCid; + } + + public SlideModel setSlideCid(long slideCid) { + this.slideCid = slideCid; + return this; + } + + public String getSlideContent() { + return slideContent; + } + + public SlideModel setSlideContent(String slideContent) { + this.slideContent = slideContent; + return this; + } + + public String getSlideDes() { + return slideDes; + } + + public SlideModel setSlideDes(String slideDes) { + this.slideDes = slideDes; + return this; + } + + public long getSlideId() { + return slideId; + } + + public SlideModel setSlideId(long slideId) { + this.slideId = slideId; + return this; + } + + public String getSlideName() { + return slideName; + } + + public SlideModel setSlideName(String slideName) { + this.slideName = slideName; + return this; + } + + public String getSlidePic() { + return slidePic; + } + + public SlideModel setSlidePic(String slidePic) { + this.slidePic = slidePic; + return this; + } + + public long getSlideStatus() { + return slideStatus; + } + + public SlideModel setSlideStatus(long slideStatus) { + this.slideStatus = slideStatus; + return this; + } + + public String getSlideUrl() { + return slideUrl; + } + + public SlideModel setSlideUrl(String slideUrl) { + this.slideUrl = slideUrl; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index b0bf88e46..41d7cf7cb 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -27,7 +27,8 @@ public class IMLoginManager extends BaseCacheManager { private IMLoginModel userInfo; private final static String isNewUserGif = "isNewUserGif"; private final static String isNewUserOne = "isNewUserOne"; - + //暂时缓存token + private String token = ""; //根据用户信息 private Handler netHandler = null; @@ -102,12 +103,28 @@ public class IMLoginManager extends BaseCacheManager { */ public void setupLoginUser(@NonNull IMLoginModel model) { this.userInfo = model; + if (userInfo != null && !TextUtils.isEmpty(userInfo.getToken())) { + token = userInfo.getToken(); + } if (netHandler == null) { netHandler = new Handler(); } netHandler.post(isInstructorRunnable); } + /** + * 调用User.getBaseInfos接口时更新用户本地数据 + * + * @param json + */ + public void upDataUserInfo(@NonNull String json) { + userInfo = new Gson().fromJson(json, IMLoginModel.class); + userInfo.setToken(token); + put(KEY_USER_INFO, new Gson().toJson(userInfo)); + //兼容老模块(之后要把用户维护的类更换掉) + SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo)); + } + /** * 重新请求管理员身份信息 */ @@ -125,8 +142,8 @@ public class IMLoginManager extends BaseCacheManager { @Override public void run() { HttpClient.getInstance().get("User.isInstructor", "isInstructor") - .params("uid", userInfo.getId(),true) - .params("token", userInfo.getToken(),true) + .params("uid", userInfo.getId(), true) + .params("token", userInfo.getToken(), true) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -192,6 +209,7 @@ public class IMLoginManager extends BaseCacheManager { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { userInfo = new Gson().fromJson(info[0], IMLoginModel.class); + userInfo.setToken(uidAndToken[1]); EventBus.getDefault().post(new DataUserInfoEvent().setUpDataSuccess(true)); } else { EventBus.getDefault().post(new DataUserInfoEvent().setUpDataSuccess(false)); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 6201948aa..a7f5c3298 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -858,7 +858,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL * 打开聊天输入框 */ public void openChatWindow() { -// if ("1".equals(Constants.isSend)) { if (mKeyBoardHeightUtil == null) { mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this); mKeyBoardHeightUtil.start(); @@ -872,9 +871,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL bundle.putString(Constants.COIN_NAME, mCoinName); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveInputDialogFragment"); -// } else { -// showTaskDialog(); -// } } private void showTaskDialog() { diff --git a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java index 047fcd66f..fd810069a 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java @@ -2,6 +2,7 @@ package com.yunbao.live.activity; import android.net.Uri; import android.os.Bundle; +import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -22,6 +23,7 @@ import com.blankj.utilcode.util.GsonUtils; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.InstructorRemarkManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.live.R; import com.yunbao.live.adapter.SystemChatMessageAdapter; @@ -148,10 +150,19 @@ public class PDLIiveChatActivity extends FragmentActivity { if (code == 0 && info.length > 0) { JSONObject obj = JSON.parseObject(info[0]); SearchUserBean userBean = JSON.toJavaObject(obj, SearchUserBean.class); - UserInfo userInfo = new UserInfo(userId, userBean.getUserNiceName(), Uri.parse(userBean.getAvatar())); - //使用空白字段存储自己服务器用户的所有的信息 - userInfo.setExtra(GsonUtils.toJson(userBean)); - RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); + String userNiceName = ""; + String remark = InstructorRemarkManager.get(mContext).getInstructorRemark().get(userId); + if (!TextUtils.isEmpty(remark)) { + userNiceName = remark; + } else { + userNiceName = userBean.getUserNiceName(); + } + if (!TextUtils.isEmpty(userNiceName) && !TextUtils.isEmpty(userBean.getAvatar())) { + UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar())); + //使用空白字段存储自己服务器用户的所有的信息 + userInfo.setExtra(GsonUtils.toJson(userBean)); + RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); + } } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java index e4dedf646..4fba3b959 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java @@ -59,7 +59,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O window.setWindowAnimations(R.style.bottomToTopAnim); WindowManager.LayoutParams params = window.getAttributes(); params.width = WindowManager.LayoutParams.MATCH_PARENT; - params.height = DpUtil.dp2px(50); + params.height = DpUtil.dp2px(100); params.gravity = Gravity.BOTTOM; window.setAttributes(params); } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketClient.java b/live/src/main/java/com/yunbao/live/socket/SocketClient.java index e56abe0d5..a5b49714b 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketClient.java @@ -393,8 +393,6 @@ public class SocketClient { buyGuardMsgBean.setUid(map.getString("uid")); buyGuardMsgBean.setUserName(map.getString("ct")); buyGuardMsgBean.setVotes(map.getString("votestotal")); -// buyGuardMsgBean.setGuardNum(map.getIntValue("guard_nums")); -// buyGuardMsgBean.setGuardType(map.getIntValue("guard_type")); mListener.onBuyNobility(buyGuardMsgBean); } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index e5d9374f4..15395e6f3 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -301,25 +301,6 @@ public class SocketRyChatUtil { Log.i("tag", "禮物im"); } }); -// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+liveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback() { -// @Override -// public void onProgress(int progress) { -// Log.i("tx","发送中"+progress); -// -// } -// -// @Override -// public void onSuccess(V2TIMMessage v2TIMMessage) { -// Log.i("tx","发送成功"); -//// SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString()+""); -// } -// -// @Override -// public void onError(int code, String desc) { -// Log.i("tx",code+"发送失败"+desc); -// -// } -// }); } diff --git a/live/src/main/res/drawable/background_horn.xml b/live/src/main/res/drawable/background_horn.xml new file mode 100644 index 000000000..2ffbb36c5 --- /dev/null +++ b/live/src/main/res/drawable/background_horn.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/dialog_live_chat_input.xml b/live/src/main/res/layout/dialog_live_chat_input.xml index f1e19f1b2..af3acbfc0 100644 --- a/live/src/main/res/layout/dialog_live_chat_input.xml +++ b/live/src/main/res/layout/dialog_live_chat_input.xml @@ -1,54 +1,62 @@ - + android:orientation="vertical"> - + + + + + + + + + - + + - - 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 147bf8f26..a1de051de 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -7,12 +7,14 @@ import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.AppUtils; import com.blankj.utilcode.util.DeviceUtils; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.GoogleBean; import com.yunbao.common.bean.UserBean; import com.yunbao.common.event.UpdateTablePointMe; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.interfaces.CommonCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.SpUtil; import com.yunbao.main.utils.MacUitl; @@ -231,6 +233,7 @@ public class MainHttpUtil { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { + IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).upDataUserInfo(info[0]); JSONObject obj = JSON.parseObject(info[0]); UserBean bean = JSON.toJavaObject(obj, UserBean.class); bean.setMedalName(obj.getString("medal_name")); @@ -496,8 +499,8 @@ public class MainHttpUtil { HttpClient.getInstance().get("Login.bindMobile", MainHttpConsts.BINDMOBILE) .params("mobile", mobile) .params("country_code", countryCode + "") - .params("uid", uid,true) - .params("token", token,true) + .params("uid", uid, true) + .params("token", token, true) .params("user_pass", user_pass) .params("user_pass2", user_pass2) .params("code", code) @@ -511,8 +514,8 @@ public class MainHttpUtil { HttpClient.getInstance().get("Login.updateBindMobile", MainHttpConsts.UPDATEBINDMOBILE) .params("mobile", mobile) .params("country_code", countryCode + "") - .params("uid", uid,true) - .params("token", token,true) + .params("uid", uid, true) + .params("token", token, true) .params("code", code) .execute(callback); }