liuxue
2021-07-29 7e2df20ccc7cdfb528d309369460a4f3d66afdf1
SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdOpenWebView.java
@@ -1,17 +1,24 @@
package com.secondworld.sdk.command;
import com.secondworld.sdk.utils.CodeU2A;
import com.secondworld.sdk.utils.WebViewUtil;
import org.json.JSONException;
import org.json.JSONObject;
public class CmdOpenWebView implements  ICommand {
public class CmdOpenWebView implements ICommand {
    @Override
    public int getCode() {
        return CodeU2A.OpenWebView;
    }
    @Override
    public void process(JSONObject json) {
    public void process(JSONObject json) throws JSONException {
        String url = json.getString("url");
        if (json.has("delay")) {
            boolean delay = json.getBoolean("delay");
            WebViewUtil.I.open(url, delay);
        } else
            WebViewUtil.I.open(url, true);
    }
}