use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class RouterModule method setHomePage.
@JSMethod
public void setHomePage(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_SET_HOMEPAGE);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class RouterModule method toWebView.
@JSMethod
public void toWebView(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_TOWEBVIEW);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class RouterModule method clearHomePage.
@JSMethod
public void clearHomePage() {
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
storageManager.setData(mWXSDKInstance.getContext(), Constant.SP.SP_HOMEPAGE_URL, "");
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class TabBarModule method watchIndex.
@JSMethod(uiThread = false)
public void watchIndex(JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_WATCHINDEX);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setExpand(mWXSDKInstance.hashCode());
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class TabBarModule method hideBadge.
@JSMethod(uiThread = true)
public void hideBadge(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_HIDBADGE);
weexEventBean.setJsParams(params);
weexEventBean.setContext(mWXSDKInstance.getContext());
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Aggregations