Commit 3dabade5 by TakeItEasyJQ

删除消息接口的schoolid

parent c6703e27
......@@ -67,7 +67,6 @@ public class ONService extends CordovaPlugin {
Intent intent = new Intent(cordova.getActivity(), NotificationService.class);
try {
intent.putExtra("idCard", args.getString(0));
intent.putExtra("schoolId", args.getString(1));
} catch (JSONException e) {
e.printStackTrace();
}
......
......@@ -97,8 +97,7 @@ public class NotificationService extends Service {
}
};
final String webSocket = "ws://messagesrv.dev.campus.orhonedu.com:31288";
// final String api = "https://api.dev.campus.orhonedu.com/messagesrv/messagePush/userUnread/%s/%s";
final String api = "https://www.edu.mongol.pub/api/messagesrv/messagePush/userUnread/%s/%s";
final String api = "https://api.dev.campus.orhonedu.com/messagesrv/messagePush/userUnread/%s";
// ---------------------------------------------
......@@ -106,9 +105,6 @@ public class NotificationService extends Service {
// 17652
private String userId;
// 535
private String schoolId;
public static CordovaWebView webView;
public static CordovaInterface cordovaPlugin;
......@@ -157,7 +153,7 @@ public class NotificationService extends Service {
};
clientOffline = new OkHttpClient.Builder().build();
Request request = new Request.Builder().url(String.format(api, userId, schoolId)).build();
Request request = new Request.Builder().url(String.format(api, userId)).build();
if (null == timer) {
timer = new Timer();
......@@ -212,7 +208,6 @@ public class NotificationService extends Service {
Intent intentPending;
intentPending = new Intent(this, HandleService.class);
intentPending.putExtra("userId", userId);
intentPending.putExtra("schoolId", schoolId);
intentPending.putExtra("object", gson.toJson(content));
PendingIntent pendingIntent = PendingIntent.getService(this, 0, intentPending,
......@@ -238,9 +233,8 @@ public class NotificationService extends Service {
}
public class MyBinder extends Binder {
public void setId(String idCard, String schoolId) {
public void setId(String idCard) {
NotificationService.this.userId = idCard;
NotificationService.this.schoolId = schoolId;
}
public void startForeGround() {
......@@ -295,7 +289,6 @@ public class NotificationService extends Service {
Log.e(TAG, "onBind: ");
NotificationService.this.userId = intent.getStringExtra("idCard");
NotificationService.this.schoolId = intent.getStringExtra("schoolId");
client = new OkHttpClient.Builder().readTimeout(3, TimeUnit.SECONDS).writeTimeout(3, TimeUnit.SECONDS)
.connectTimeout(3, TimeUnit.SECONDS).build();
Request request = new Request.Builder().url(webSocket).build();
......
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