|
|
@@ -18,6 +18,7 @@ import com.sheep.gamegroup.event.ImageHeadChange;
|
|
|
import com.sheep.gamegroup.event.MoneyChange;
|
|
|
import com.sheep.gamegroup.event.RealNameAutehrChange;
|
|
|
import com.sheep.gamegroup.event.UserNameChange;
|
|
|
+import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.entity.UserInfoEntity;
|
|
|
import com.sheep.gamegroup.presenter.AccountAndSecuritContract;
|
|
|
import com.sheep.gamegroup.presenter.AccountAndSecuritPresenter;
|
|
|
@@ -240,6 +241,16 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
|
|
|
|
|
|
@Override
|
|
|
public void showTask(final UserInfoEntity entity) {
|
|
|
+ UserEntity userEntity = null;
|
|
|
+ try{
|
|
|
+ userEntity = MyDbManager.getInstance()
|
|
|
+ .dbFindUser();
|
|
|
+ if(userEntity == null){
|
|
|
+ userEntity = new UserEntity();
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
mEntity = entity;
|
|
|
tvName.setText(entity.getNickname());
|
|
|
tvLinkContent.setText("绵羊号:" + entity.getInvitation_code());
|
|
|
@@ -247,6 +258,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
|
|
|
tvPhone.setText("未绑定");
|
|
|
} else {
|
|
|
tvPhone.setText(entity.getMobile());
|
|
|
+ userEntity.setMobile(entity.getMobile());
|
|
|
}
|
|
|
|
|
|
Glide.with(AccountAndSecurityAct.this)
|
|
|
@@ -257,6 +269,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
|
|
|
tvWx.setText("未绑定");
|
|
|
} else {
|
|
|
tvWx.setText(entity.getWx_nickname());
|
|
|
+ userEntity.setWx_nickname(entity.getWx_nickname());
|
|
|
}
|
|
|
|
|
|
refalshAuther(entity);
|
|
|
@@ -266,6 +279,13 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
|
|
|
EventBus.getDefault().post(change);
|
|
|
|
|
|
|
|
|
+ //Todo user 类都没有统一,先这样
|
|
|
+ try{
|
|
|
+ MyDbManager.getInstance()
|
|
|
+ .saveOrUpdateUser(userEntity);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|