|
@@ -11,14 +11,19 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.LoginEntity;
|
|
import com.sheep.gamegroup.model.entity.LoginEntity;
|
|
|
|
|
+import com.sheep.gamegroup.model.util.EntityUtils;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.util.ChannelContent;
|
|
import com.sheep.gamegroup.util.ChannelContent;
|
|
|
|
|
+import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
|
|
|
+import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.SelfCountDownTimer;
|
|
import com.sheep.gamegroup.util.SelfCountDownTimer;
|
|
|
import com.sheep.gamegroup.util.StringUtils;
|
|
import com.sheep.gamegroup.util.StringUtils;
|
|
|
|
|
+import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
|
|
import butterknife.BindView;
|
|
import butterknife.BindView;
|
|
@@ -132,6 +137,8 @@ public class ActBindMobileRegister extends BaseActivity {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
mMobile = mobile;
|
|
mMobile = mobile;
|
|
|
|
|
+ G.showToast("验证码已经发送");
|
|
|
|
|
+ bindMobileRegisterCodeEt.requestFocus();
|
|
|
selfCountDownTimer.start();
|
|
selfCountDownTimer.start();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -172,7 +179,18 @@ public class ActBindMobileRegister extends BaseActivity {
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
|
@Override
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
-
|
|
|
|
|
|
|
+ LoginEntity loginEty = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ loginEty = JSONObject.parseObject(JSONObject.toJSONString(baseMessage.getData()), LoginEntity.class);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ if (loginEty != null) {
|
|
|
|
|
+ SpUtils.saveToken(activity, loginEty.getToken());
|
|
|
|
|
+ DataUtil.getInstance().setUserEntity(loginEty.getUser());
|
|
|
|
|
+ }
|
|
|
|
|
+ Jump2View.getInstance().goHomePageView(activity, EntityUtils.getUserCode(loginEty));
|
|
|
|
|
+ TestUtil.saveUser(loginEty);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|