let nativeInterface: any;
let nativeBridge: any;
let nativeHandler: (funName: string, params?: any, cb?: (retVal?: any) => void) => void;

nativeBridge = uni.requireNativePlugin("NativeBridge");
nativeHandler = function (funName: string, params?: any, cb?: (retVal?: any) => void) {
	if (nativeBridge) {
		if (params) {
			nativeBridge[funName](params, cb);
		} else {
			nativeBridge[funName](cb);
		}
	} else {
		 if (cb) {
			 cb("没有nativeBridge")
		 }
	}
}

export let NativeHandler = nativeHandler;