package com.rv.travel.fragment;

import android.webkit.JavascriptInterface;

import com.rv.travel.GoOtherUtil;

/**
 * Created by cenxiaozhong on 2017/5/14.
 * source code  https://github.com/Justson/AgentWeb
 */

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) {

        //travelWebFragment.showToastLong("readyOrder:" + orderJson);
        GoOtherUtil.goTravelCommitOrder(orderJson, travelWebFragment.getActivity());

    }

}
