Browse Source

添加push,跳转至我的页面

hy 3 years ago
parent
commit
9362e31269

+ 6 - 1
app/src/main/java/com/electric/chargingpile/jpush/PushMessageReceiver.java

@ -1,4 +1,4 @@
1
package com.electric.chargingpile.jpush;
1
   package com.electric.chargingpile.jpush;
2 2
3 3
import android.app.Activity;
4 4
import android.content.Context;
@ -20,6 +20,7 @@ import com.electric.chargingpile.activity.MyMessageActivity;
20 20
import com.electric.chargingpile.activity.MyWebViewActivity;
21 21
import com.electric.chargingpile.activity.RankingListActivity;
22 22
import com.electric.chargingpile.activity.UserCenterActivity;
23
import com.electric.chargingpile.activity.UserInfoActivity;
23 24
import com.electric.chargingpile.application.MainApplication;
24 25
import com.electric.chargingpile.data.ChargingShareBean;
25 26
import com.electric.chargingpile.util.DES3;
@ -197,6 +198,10 @@ public class PushMessageReceiver extends JPushMessageReceiver {
197 198
            } catch (Exception e) {
198 199
                e.printStackTrace();
199 200
            }
201
        }else if ("PushUserInfo".equals(type) && MainApplication.isLogin()) {
202
            intent = new Intent(context, UserCenterActivity.class);
203
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
204
            context.startActivity(intent);
200 205
        } else {
201 206
            intent = new Intent(context, MainMapActivity.class);
202 207
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);