package com.sheep.gamegroup.util;

import android.app.Activity;
import android.webkit.JavascriptInterface;

import com.kfzs.duanduan.KFZSApp;
import com.kfzs.duanduan.datashare.DDProviderHelper;

/**
 * 分享js注入
 * Created by ljy on 2018/6/13.
 */

public class ShareJs {
    private Activity activity;

    public ShareJs(Activity activity) {
        this.activity = activity;
    }

    @JavascriptInterface
    public String getHeader() {
        return DDProviderHelper.getInstance().getLastUserToken(KFZSApp.context);
    }

    @JavascriptInterface
    public String getInvitationCode(){
        return DataUtil.getInstance().getInvitationCode();
    }
    @JavascriptInterface
    public String popShare(String url, String type) {
        CommonUtil.getInstance().popShare(activity, url, type);
        return "";
    }
}
