[关闭]
@Rookie 2019-04-03T11:16:01.000000Z 字数 1425 阅读 990

定制公交-熊猫js

panda


  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf8">
  4. <script language="javascript">
  5. <!-- // 调用原生登录方法 -->
  6. function loginClick() {
  7. PandaWebView.loginAction();
  8. }
  9. <!-- // 调用原生分享方法 -->
  10. function shareClick() {
  11. // 标题 内容 imgurl (图片URL) shareurl(分享url)
  12. PandaWebView.shareAction('标题','内容','imgurl', 'shareurl');
  13. }
  14. <!-- // 调用原生支付 -->
  15. function payClick() {
  16. <!-- // 订单号 金额 订单信息 支付方式(wxpay:微信支付 aliPay: 支付宝支付 pursePay:钱包余额支付) -->
  17. PandaWebView.payAction('201511120981234','3','wxpay','单程车票');
  18. }
  19. <!-- // 调用原生返回 -->
  20. function backClick() {
  21. PandaWebView.backAction();
  22. }
  23. <!-- // 登录成功返回 用户ID 登录ID 名字 -->
  24. function loginResult(userId,loginId,name) {
  25. var content = userId+","+loginId+","+name;
  26. asyncAlert(content);
  27. document.getElementById("returnValue").value = content;
  28. }
  29. <!-- // 支付订单ID 支付金额 支付结果code 支付渠道 信息 -->
  30. function payResult(orderid,amount,resultCode,channel,message) {
  31. var content = resultCode+","+channel+","+message+","+orderid+","+amount;
  32. asyncAlert(content);
  33. document.getElementById("returnValue").value = content;
  34. }
  35. function asyncAlert(content) {
  36. setTimeout(function(){
  37. alert(content);
  38. },1);
  39. }
  40. </script>
  41. </head>
  42. <body>
  43. <h1>这是按钮调用</h1>
  44. <input type="button" value="支付" onclick="payClick()" />
  45. </body>
  46. </html>

淮安打电话

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf8">
  4. <script language="javascript">
  5. <!-- // 调用原生登录方法 -->
  6. function callPhoneClick() {
  7. PandaWebView.callPhoneAction('1312312341');
  8. }
  9. </script>
  10. </head>
  11. <body>
  12. <h1>这是按钮调用</h1>
  13. <input type="button" value="打电话" onclick="callPhoneClick()" />
  14. </body>
  15. </html>
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注