the first time h5 interacts with APP, there are some problems.
there is a requirement:
the front end of H5 needs to call the camera and photo album to upload a picture. Then the developers on the native APP side said to me that you can just call my method for opening photo albums.
here are the methods provided by native APP:
Open album:
showAppByOneParam("SHOW_ALBUM");
turn on the camera:
showAppByOneParam("TAKE_PHOTO");
Common callback function:
getUploadUrl(url) //url
my code:
//
onSelect:function(item){
this.showImages = false;
if(item.name == ""){
showAppByOneParam("SHOW_ALBUM");
}
else{
showAppByOneParam("TAKE_PHOTO");
}
},
//
callbackImages:function(url){
if(url){
Toast(url);
}
else{
Toast("");
}
}
-------------------------------------
mounted:function(){
//APP
window.getUploadUrl = this.callbackImages;
}
finally, after the release of H5 and native packaging, there was no response at all when I clicked the button. What went wrong? ~