package com.rv.travel.fragment;

import android.webkit.JavascriptInterface;

import com.rv.travel.GoOtherUtil;

/**
 * Js调用Android 是在子线程完成的
 */

public class AndroidInterface {

    private TravelWebFragment travelWebFragment;

    public AndroidInterface(TravelWebFragment travelWebFragment) {
        this.travelWebFragment = travelWebFragment;
    }


    @JavascriptInterface
    public void showButton(String param) {
        travelWebFragment.showButtonLayout();
    }

    @JavascriptInterface
    public void readyOrder(String orderJson) {
        GoOtherUtil.goTravelCommitOrder(orderJson, travelWebFragment.getContext());

    }

}
