WeChat applet jumps from the current applet to another applet

open another applet

Use wx.navigateToMiniProgram(Object object)

Official document address: wx.navigateToMiniProgram(Object object) | WeChat open document

wx.navigateToMiniProgram({
					    appId: '9879848894184941',
					    path: 'pages/me/me',
					    extraData: {
					      foo: 'bar'
					    },
					    envVersion: 'trial',
					    success(res) {
							console.log(res)
					      console.log('跳转小程序成功')
					    },
					    fail(err){
					      console.log('跳转小程序失败')
					    }
					  })

Return to the previous applet. It can only be called successfully when the current applet is opened by other applets

wx.navigateBackMiniProgram(Object object)

Note: WeChat client iOS 6.5.9, Android 6.5.10 and above versions support

Official document address: wx.navigateBackMiniProgram(Object object) | WeChat open document

The code is not demonstrated, just look at the official documentation. Get off the plane! ! ! Get off the plane! ! ! Get off the plane! ! !

Guess you like

Origin blog.csdn.net/maowencai/article/details/127281679