use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ModalModule method confirm.
@JSMethod(uiThread = true)
public void confirm(String options, final JSCallback cancel, final JSCallback ok) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_MODAL_CONFIRM);
eventBean.setJsParams(options);
ArrayList<JSCallback> jsCallbacks = new ArrayList<>();
jsCallbacks.add(cancel);
jsCallbacks.add(ok);
eventBean.setCallbacks(jsCallbacks);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ModalModule method alert.
@JSMethod(uiThread = true)
public void alert(String options, final JSCallback callback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_MODAL_ALERT);
eventBean.setJsParams(options);
eventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ModalModule method toast.
@JSMethod(uiThread = true)
public void toast(String options) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_MODAL_TOAST);
eventBean.setJsParams(options);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class PayModule method payByWechat.
@JSMethod(uiThread = true)
public void payByWechat(String params, JSCallback callback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_PAYBYWECHAT);
eventBean.setJsParams(params);
eventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class RouterModule method toMap.
@JSMethod
public void toMap(String destination) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_TOMAP);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(destination);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Aggregations