1. Wechat applet uses Web-view to embed H5 pages. Some applet functions need to reference H5 pages, and use web-view tag to reference SRC to introduce H5 page links that need to be nested
<web-view src="{{loginsrc}}"></web-view>
Copy the code
In the H5 page, the header needs to be introduced
< script type = "text/javascript" SRC = "https://res.wx.qq.com/open/js/jweixin-1.3.2.js" > < / script >Copy the code
After the js file is introduced, you can use the wechat API interface to jump back to the corresponding page of the applet
wx.miniProgram.reLaunch({url: '/pages/login/others? istoken=false&istokens=ss5'})Copy the code
At the same time, you can link the applet with parameters to the corresponding applet page, and obtain the corresponding status by receiving the link with parameters.
onLoad: function (options) { wx.showLoading({ title: 'Just a moment, please.' Mask :true}) console.log(options) if(options.istoken=="false"){wx.hideloading () console.log("false ") wx.showtoast ({ }else if(options.istoken=="true"){console.log("true into ")}}Copy the code
Specific can consult developers.weixin.qq.com/miniprogram…
2. Configure the service domain name: When using web-view to nest H5 pages, you need to configure the service domain name in the wechat development platform for the connection domain of the H5 page
Development Development Settings Service domain nameCopy the code
Then download. TXT file to download the TXT file into the root of the domain name, specific can refer to www.cnblogs.com/dashucoding…