alipay-h5-app.html 663 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. </head>
  5. <body>
  6. <noscript>
  7. <strong>Please enable JavaScript to continue.</strong>
  8. </noscript>
  9. <div id="app"></div>
  10. <!-- built files will be auto injected -->
  11. </body>
  12. <!-- uni 的 SDK -->
  13. <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
  14. <script>
  15. document.addEventListener('UniAppJSBridgeReady', function() {
  16. //向uniapp传值
  17. uni.postMessage({
  18. data: {
  19. action: 'success'
  20. }
  21. });
  22. uni.getEnv(function(res) {
  23. console.log('当前环境:' + JSON.stringify(res));
  24. });
  25. });
  26. </script>