微信小程序跳转到外部、其他小程序
app.json文件,添加小程序appId
"navigateToMiniProgramAppIdList": [ "wx867ea05eaf079b91", "wx18a2ac992306a5a4" ]
WXML文件:
<view class="user_draw" bindtap="openwx"> <view class="word"><image src="/asset/img/small.png"></image><view class="tname">其他小程序</view></view> <view class="wimg"><image src="/asset/img/more.png"></image></view> </view>
js代码:
openwx:function(){ wx.navigateToMiniProgram({ appId: 'wx887aa15eac079b91', path: 'pages/index/index', extraData: { from: 'xxxxx' }, envVersion: 'release', success(res) { // 打开其他小程序成功同步触发 wx.showToast({ title: '跳转成功' }) } }) },
文章评论(0)