2345网址大全设首页,seo做的好的网站 知乎,德宏做网站,潍坊哪里做网站准备工作 tip 管理后台配置 设置-》第三方设置-》半屏小程序管理-》我调用的 添加小程序 有些手机会唤起失败#xff0c;直接唤起了全屏的小程序#xff0c;所以我们为了兼容#xff0c;需要在app.config.ts加上
{embeddedAppIdList: [wxxxxxxxx]/…准备工作 tip 管理后台配置 设置-》第三方设置-》半屏小程序管理-》我调用的 添加小程序 有些手机会唤起失败直接唤起了全屏的小程序所以我们为了兼容需要在app.config.ts加上
{embeddedAppIdList: [wxxxxxxxx]//appid 是你要跳转到的小程序的 appid。
}跳转方式
export const openHalfMini () {const platform wx.getSystemInfoSync().platformif (platform ! android) {wx.showLoading({title: 打开小程序中,mask: true})}const token wx.getStorageSync(token)wx.openEmbeddedMiniProgram({// 要跳转的小程序的appidappId: wxcfxxxx,envVersion: __ENV__ ! production ? trial : release,path: /pages/index/index?idxxx,success: () {},fail: (error) {console.log(跳转小程序失败, error)},complete: () {wx.hideLoading()}})
}半屏小程序使用的限制条件
被半屏跳转的小程序需要通过来源小程序的调用申请最多申请10个2.23.1版本以下基础库被半屏打开的小程序需要在app.json的embeddedAppIdList字段中声明当前小程序需为竖屏被半屏跳转的小程序需为非个人主体小程序不含小游戏。wx.openEmbeddedMiniProgram 打开半屏小程序 然后半屏小程序里不能分享