一、首先在两个小程序的app.json文件里面配置另一个小程序的appid:
navigateToMiniProgramAppIdList,两个小程序都要配置!!!
{
"pages": [
"pages/index/index",
],
"window": {
"backgroundTextStyle": "light",
},
"sitemapLocation": "sitemap.json",
"navigateToMiniProgramAppIdList": [
"appid",//要跳转的小程序的id
]
}
二、设置跳转:
1、使用navigator标签:
<navigator class="red"
app-id="跳转目标小程序的appid"
path="跳转目标小程序的哪一页?拼接参数"
bindsuccess="成功回调"
bindfail="失败回调"
bindcomplete="跳转完成回调"
version="跳转到哪个版本"
target="miniProgram"
open-type="navigate"
extra-data="{拼接参数}&