An open API service indexing awesome lists of open source software.

https://github.com/dingyong0214/uni.webview.js

使用uni-app开发的H5网页,嵌套在uni-app中,可互相通信。兼容微信小程序
https://github.com/dingyong0214/uni.webview.js

Last synced: 2 months ago
JSON representation

使用uni-app开发的H5网页,嵌套在uni-app中,可互相通信。兼容微信小程序

Awesome Lists containing this project

README

        

# uni.webview.js
使用uni-app开发的H5网页,嵌套在uni-app项目中使用,互相通信,兼容小程序

## 使用示例
``` js
1、下载js库,包含 jweixin_1.4.0.js 和 uni.webview.js

2、在main.js中引入
const tui = require("@/static/js/uni.webview.js")
Vue.prototype.tui = tui

3、在页面中使用跳转api
this.tui.webView.navigateTo({
url: url
})

this.tui.webView.switchTab({
url: "/pages/index/index"
})

this.tui.webView.getEnv(res => {
uni.showModal({
content: JSON.stringify(res)
});
});

...

```

## 赞赏

![image](https://thorui.cn/img/reward_small.jpg)