uniapp封装了一个网站,现在想实现app进行微信登录和微信支付的功能,必须调用uniapp原生页,实现方法如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title></title>
</head>
<body>
<div class="btn-list">
<button class="btn" type="button" data-action="navigateTo">跳转</button>
</div>
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.1.js"></script>
<script>
document.addEventListener('UniAppJSBridgeReady', function () {
document.querySelector('.btn-list').addEventListener('click'
|