There is no return button and title when jumping to the webview page in the applet

The applet can use the webview tag to jump to h5 and web pages, but the return button and title are missing after jumping over. The solution is as follows:
set the title in the JSON in the webview page

在小程序中使用webview嵌入h5页面步骤:
1.在小程序中新建一个页面/pages/myPage/index
2.在新建的index页面中使用webview嵌入h5.<web-view src='h5页面链接'></web-view>
3.在新建的myPage文件下新建index.config.ts
4.在index.config.ts中加入如下配置,保证此时的页面中有返回按钮和标题

// index.config.ts
export default {
    
    
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTitleText": "我的标题",
  "navigationBarTextStyle": "black"
}

Guess you like

Origin blog.csdn.net/weixin_42342065/article/details/131103241