|
@@ -2,6 +2,7 @@ package com.usai.apex.apexcrm;
|
|
|
|
|
|
|
|
import com.usai.redant.rautils.utils.RAUtil;
|
|
import com.usai.redant.rautils.utils.RAUtil;
|
|
|
|
|
|
|
|
|
|
+import org.json.JSONException;
|
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
public class RAJSInterface extends Object {
|
|
public class RAJSInterface extends Object {
|
|
@@ -162,9 +163,19 @@ public class RAJSInterface extends Object {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@android.webkit.JavascriptInterface
|
|
@android.webkit.JavascriptInterface
|
|
|
- public void login(String user, String password) {
|
|
|
|
|
|
|
+ public void login(String msg) {
|
|
|
|
|
|
|
|
if (delegate != null) {
|
|
if (delegate != null) {
|
|
|
|
|
+
|
|
|
|
|
+ String user = null, password = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ JSONObject json = new JSONObject(msg);
|
|
|
|
|
+ user = json.getString("user");
|
|
|
|
|
+ password = json.getString("password");
|
|
|
|
|
+ } catch (JSONException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
delegate.Login(user, password);
|
|
delegate.Login(user, password);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|