Third-party (webpage/applet) wake-up WeChat app summary

Third-party (webpage/applet) wake-up WeChat app summary

In actual business, it is actually very simple to wake up the WeChat app on a third-party webpage or small program, paste the code:

<a href="weixin://"></a>
或者
window.location.href = 'weixin://'
或者
window.location.replace('weixin://')

In fact, it is to set the jump address to "weixin://".
Result:
insert image description here
Note:

When realizing this business requirement before, I asked for help from Duo Niang, and all the content of the posts I found were in this way, but in fact, it is different on different devices.

Test results and stepping record sharing:
1. Device differences:
The test found that the results of opening in PC browsers, Android phone browsers, and iOS browsers are different. The picture above is the realization effect of the Google browser on the PC side. A prompt to open WeChat will pop up. If you choose to open it, the WeChat on the PC side will pop up. In the Android mobile phone browser, the jump address is all unresponsive, and WeChat cannot be woken up. The iOS safari browser can recognize "weixin://", and a prompt will pop up, and WeChat will be opened after confirmation.

2. Prerequisite:
Whether it is opened on the PC, Android browser or iOS browser, the prerequisite for recognition is that the device has a WeChat client installed, otherwise it cannot be recognized.

The above is the sharing of personal implementation process. If there is a master who can realize it in the browser of Android mobile phone, it will be very grateful if you can leave a message and give pointers!

If it is helpful to you, thank you for giving me a thumbs up (~~)

Guess you like

Origin blog.csdn.net/start_sea/article/details/124367572