|
@@ -23,6 +23,7 @@ import com.edufound.reader.bean.ChannelCodeEnum;
|
|
|
import com.edufound.reader.bean.HttpResultBean;
|
|
|
import com.edufound.reader.bean.UserBean;
|
|
|
import com.edufound.reader.contract.LoginAlertContract;
|
|
|
+import com.edufound.reader.interfaces.EfunboxInterfaces;
|
|
|
import com.edufound.reader.model.LoginAlertModel;
|
|
|
import com.edufound.reader.util.Consts;
|
|
|
import com.edufound.reader.util.DeviceUuidFactory;
|
|
@@ -167,7 +168,17 @@ public class LoginAlertPresenter extends BasePresenter<LoginAlertContract.View>
|
|
|
Consts.setUID(bean.getData().getUid());
|
|
|
//用户是否登录,登录了,创建Consts的userbean
|
|
|
Consts.setmConstsUserBean(bean.getData());
|
|
|
- getYFVip();
|
|
|
+ EfunboxUtil.getYFVip(mView.getActivity(), new EfunboxInterfaces.getYFVipInterfaces() {
|
|
|
+ @Override
|
|
|
+ public void success() {
|
|
|
+ mView.getActivity().finish();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void error() {
|
|
|
+ mView.getActivity().finish();
|
|
|
+ }
|
|
|
+ });
|
|
|
//检查活动
|
|
|
EfunboxUtil.checkEvents(mView.getActivity());
|
|
|
|
|
@@ -193,34 +204,6 @@ public class LoginAlertPresenter extends BasePresenter<LoginAlertContract.View>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getYFVip() {
|
|
|
-
|
|
|
- if (!Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
|
|
|
- //不是百度渠道,检查是否是义方VIP
|
|
|
- if (Consts.getmConstsUserBean() != null) {
|
|
|
- OrderApiServerImpl api = new OrderApiServerImpl();
|
|
|
- api.getAuth(mView.getActivity(), new Callback() {
|
|
|
- @Override
|
|
|
- public void onSuccess(HttpInfo info) throws IOException {
|
|
|
- HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
|
|
|
- }.getType());
|
|
|
- Logger.e("info.getRetDetail():" + info.getRetDetail());
|
|
|
- Logger.e("bean.getData():" + bean.getData());
|
|
|
- Consts.setIsYFVip(true);
|
|
|
- mView.getActivity().finish();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onFailure(HttpInfo info) throws IOException {
|
|
|
-// Toast.makeText(mView.getActivity(),"")
|
|
|
- mView.getActivity().finish();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- mView.getActivity().finish();
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public void activityDestory() {
|