APP跳转小程序
plus.share.getServices(function(res) {
var sweixin = null;
for (var i = 0; i < res.length; i++) {
var t = res[i];
if (t.id == ‘weixin’) {
sweixin = t;
}
}
if (sweixin) {
sweixin.launchMiniProgram({
id: item.id, //小程序原始id
type: item.type, //环境 0-正式版; 1-测试版; 2-体验版
path: path //指定页的路径,如需传参直接字符串拼接
});
}
}, function(res) {
console.log(JSON.stringify(res));
});
APP跳转H5
plus.runtime.openWeb(path)//使用内置Webview窗口打开URL
plus.runtime.openURL(path)//调用第三方程序打开指定的URL
微信小程序互跳
uni.navigateToMiniProgram({
appId: item.id,
path: item.path,
extraData: {},//传递的参数
envVersion: type, //要打开的小程序版本,有效值: develop(开发版),trial(体验版),release(正式版)(非必填,默认正式版,string),
success(res) {
// 打开成功
},
fail(err) {
//打开失败
},
})文章来源:https://www.toymoban.com/news/detail-482386.html
微信小程序打开H5
使用webView标签打开H5页面文章来源地址https://www.toymoban.com/news/detail-482386.html
到了这里,关于APP跳转H5、微信小程序与微信小程序之间互跳的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!