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中,可互相通信。兼容微信小程序
- Host: GitHub
- URL: https://github.com/dingyong0214/uni.webview.js
- Owner: dingyong0214
- Created: 2019-10-21T14:59:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-17T05:32:18.000Z (almost 5 years ago)
- Last Synced: 2025-01-13T23:45:42.654Z (4 months ago)
- Homepage:
- Size: 7.81 KB
- Stars: 50
- Watchers: 2
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# uni.webview.js
使用uni-app开发的H5网页,嵌套在uni-app项目中使用,互相通信,兼容小程序## 使用示例
``` js
1、下载js库,包含 jweixin_1.4.0.js 和 uni.webview.js2、在main.js中引入
const tui = require("@/static/js/uni.webview.js")
Vue.prototype.tui = tui3、在页面中使用跳转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)
});
});...
```
## 赞赏
