The uni-app applet jumps to other applets and obtains the page address of the target applet

1. Jump to other applets in the applet
1. Add configuration under the mp-weixin directory in manifest.json (replace the target applet appid)
insert image description here

		"navigateToMiniProgramAppIDList" : [ "wx8280850d07d385eb" ],

2. Add a button click event on the page that needs to be redirected, replace the path and pass parameters

uni.navigateToMiniProgram({
    
    
  appId: '',
  path: 'pages/index/index?id=123', // 不填默认首页
  extraData: {
    
    
    'data1': 'test'
  },
  success(res) {
    
    
    // 打开成功
  }
})

2. Obtain the page address of other mini-programs
The official document acquisition address entry in the WeChat mini-program has been closed and cannot be used
. Obtain
1. Log in to the official account, open the edit article, click on the applet, and enter the applet to get the address in the pop-up window. It must be a published applet. 2. Click to get more addresses, and enter your own WeChat ID (
insert image description here
WeChat The signal must have followed the registered official account)
insert image description here
After filling in the correct information, click Open
insert image description here

After opening, open the page of the target applet and click the three dots button on the upper right to copy the address

ps: Some information related to vuex storage is not passed through url. It is recommended to use the method of long pressing the picture to identify the QR code

<image src="../../static/invoice.jpg" :show-menu-by-longpress="true"></image>

Guess you like

Origin blog.csdn.net/qq_29184685/article/details/127442541