WeChat applet - open the link to jump to the H5 webpage (open the webpage in the applet)

foreword

This article will split from 0 to 1, step by step, and introduce in detail how to implement this function.

This requirement is very common in small programs, as shown in the following figure:

insert image description here

first step

First, there needs to be a page app.json → page[], properly registered in , that hosts the webviewcomponent.

Create a new page in the pagedirectory (the same method as creating a normal page), as shown in the following figure:
insert image description here

second step

The settings webviewpage is used to receive the webpage link of the business jump.

Open the file you just created, you just need to move the wxml / jsfile and copy the following code:

<web-view
src

Guess you like

Origin blog.csdn.net/weixin_44198965/article/details/123897954