Commit cca05159 authored by mengcuiguang2's avatar mengcuiguang2

token失效,进入登录页

parent 9c1e942f
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.myopicparadised"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 712
versionName "7.1.2"
versionCode 714
versionName "7.1.4"
flavorDimensions "default"
// dex突破65535的限制
......
package com.duben.myopicparadised.net;
import android.app.Activity;
import android.content.Intent;
import com.duben.myopicparadised.ui.activitys.AlipayLoginActivity;
import com.duben.myopicparadised.utils.ForegroundOrBackground;
import com.google.gson.Gson;
import com.duben.myopicparadised.common.Constant;
import com.duben.myopicparadised.manager.UserManager;
......@@ -94,12 +99,10 @@ public class GsonConverterFactory extends Converter.Factory {
if (code == 401) {
try {
UserManager.getInstance().userLogout();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// if (forwardActivity != null) {
// if (!forwardActivity.isFinishing()) {
// forwardActivity.startActivity(new Intent(forwardActivity, LoginActivity.class));
// }
// }
Activity forwardActivity = ForegroundOrBackground.getTopActivity();
if (forwardActivity != null) {
forwardActivity.startActivity(new Intent(forwardActivity, AlipayLoginActivity.class));
}
} catch (Exception e) {
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment