Bitliker před 7 roky
rodič
revize
46540f98ec

+ 10 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/PushNetMessageReceiver.java

@@ -1,7 +1,9 @@
 package com.xzjmyk.pm.activity.ui;
 
 import android.content.Context;
+import android.content.Intent;
 import android.content.SharedPreferences;
+import android.text.TextUtils;
 import android.util.Log;
 
 import com.alibaba.fastjson.JSON;
@@ -17,6 +19,7 @@ import com.loopj.android.http.RequestParams;
 import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.rx.Result2Listener;
 import com.me.network.app.http.rx.ResultSubscriber;
+import com.uas.appworks.activity.ScheduleActivity;
 import com.xzjmyk.pm.activity.util.oa.CommonUtil;
 
 import org.apache.http.Header;
@@ -64,8 +67,8 @@ public class PushNetMessageReceiver extends PushMessageReceiver {
     }
 
     private void update(String channelId) {
-        String imid=MyApplication.getInstance().getLoginUserId();
-        Log.d("wang","channelId="+channelId+"||imid="+imid);
+        String imid = MyApplication.getInstance().getLoginUserId();
+        Log.d("wang", "channelId=" + channelId + "||imid=" + imid);
         HttpClient mHttpClient = new HttpClient.Builder()
                 .url("channelset/saveChannelset")
                 .add("imid", imid)
@@ -78,12 +81,12 @@ public class PushNetMessageReceiver extends PushMessageReceiver {
         httpClient.Api().post(mHttpClient, new ResultSubscriber<>(new Result2Listener<Object>() {
             @Override
             public void onResponse(Object o) {
-                Log.d("wang", "onResponse上传channelId成功了"+o.toString());
+                Log.d("wang", "onResponse上传channelId成功了" + o.toString());
             }
 
             @Override
             public void onFailure(Object t) {
-                Log.d("wang", "onResponse 上传channelId失败了"+t.toString());
+                Log.d("wang", "onResponse 上传channelId失败了" + t.toString());
             }
         }));
     }
@@ -143,7 +146,9 @@ public class PushNetMessageReceiver extends PushMessageReceiver {
         Log.i("wang", "title=" + title);
         Log.i("wang", "content=" + content);
         Log.i("wang", "params=" + params);
-        if (JSONUtil.validate(params)) {
+        if (!TextUtils.isEmpty(title) && title.equals("UU日程")) {
+            ct.startActivity(new Intent(ct, ScheduleActivity.class));
+        } else if (JSONUtil.validate(params)) {
             String titlePage = JSON.parseObject(params).getString("title");
             String url = JSON.parseObject(params).getString("url");
             String master = JSON.parseObject(params).getString("master");