以前小程序跳小程序直接通过api调用跳转即可,但在2018.11.1下午微信公众平台通知需做navigateToMiniProgramAppIdList配置,否则无法提交审核
配置要跳转的微信小程序id ,最多不能超过10个
每个小程序可跳转的其他小程序数量限制为不超过10个,而且跳转appid必须在配置列表中,负责回调 fail appId "${appId}" is not in navigateToMiniProgramAppIdList
"navigateToMiniProgramAppIdList": [
"wx8abaf00sd8fsdfsdfs",
"wx9db2c16d0633c3r9"
],
"
一、通过navigator标签跳转
<navigator target="miniProgram" open-type="navigate" app-id="wx9db2c16d0633c3r9" extra-data="{{ data }}"
version="release">
<view>跳转微信小程序</view>
</navigator>>
- target: 跳转目标
- app-id 要打开的小程序id
- path: 打开的页面路径(如果为空则打开首页)
- version: develop(开发版)、trial(体验版)、release(正式版)
二、通过事件跳转
wx.navigateToMiniProgram(Object object)
wx.navigateToMiniProgram({
appId: '',
path: 'page/index/index?id=123',
extraData: {
foo: 'bar'
},
envVersion: 'develop',
success(res) {
// 打开成功
}
})