diff --git a/hybrid/html/local.html b/hybrid/html/local.html index a42893deae2c99ab4335e2d452834c6c22a0d0f0..a07951b27f7004efd861a2d29df0c24148917c05 100644 --- a/hybrid/html/local.html +++ b/hybrid/html/local.html @@ -55,29 +55,29 @@ console.log(action); switch (action) { case 'switchTab': - uni.switchTab({ + uni.webView.switchTab({ url: '/pages/tabBar/API' }); break; case 'reLaunch': - uni.reLaunch({ + uni.webView.reLaunch({ url: '/pages/tabBar/component' }); break; case 'navigateBack': - uni.navigateBack({ + uni.webView.navigateBack({ delta: 1 }); break; case 'getEnv': - uni.getEnv((res) => { + uni.webView.getEnv((res) => { uni.postMessage({ data: res }) }); break; default: - uni[action]({ + uni.webView[action]({ url: '/pages/component/button/button' }); break; @@ -86,7 +86,7 @@ }) // }); document.querySelector("#postMessage").addEventListener('click', function() { - uni.postMessage({ + uni.webView.postMessage({ data: { action: 'message' }