How do I call native methods after Weex is downgraded to H5?

now the page can load the layout of weex or H5 and render successfully, but when rendering in the form of H5, the native method cannot be called.
for example:
1, implement a test method in the native project
2, I implement const nativeApi = weex.requireModule ("test")
3 in vue, and finally call nativeApi.test ()
when loading with weex, it"s no problem at all, but when using H5, js reported an error: TypeError: undefined is not an object (evaluating" nativeApi.test")

.
Mar.01,2021

because you are going to write the extension of H5
iOS Android H5 must implement your extension at the same time


the method of downgrading weex to h5 in app can call app through jsbridge

Menu