orderGenerate.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title><?=$goodName ?></title>
  6. <link href="/css/payment/order.css?version=<?= $this->context->version ?>" rel="stylesheet" type="text/css">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
  9. <meta name="apple-mobile-web-app-capable" content="yes" />
  10. <meta name="format-detection" content="telephone=no, email=no" />
  11. <link rel="stylesheet" href="/css/bootstrap.css?version=<?= $this->context->version ?>">
  12. <link rel="stylesheet" href="/css/custom.css?version=<?= $this->context->version ?>">
  13. <script src="/js/jquery-1.11.1.min.js?version=<?= $this->context->version ?>"></script>
  14. <script src="/js/bootstrap.min.js?version=<?= $this->context->version ?>"></script>
  15. <script type="text/javascript" src="/js/jweixin-1.0.0.js?version=<?= $this->context->version ?>" ></script>
  16. <style>
  17. label{
  18. font-weight:normal;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div name="generateCenterMask" style="position:fixed;left:0;top:0;width:100%;height:100%;z-index:990;background-color:gray;filter:alpha(opacity=10);opacity:0.8;display:none;"><img style="float:right;width:60%;" src="/images/payment/sendToCustomer.png" /></div>
  24. <div class="panel panel-default" style="border:none;-webkit-box-shadow:none;">
  25. <div class="panel-body">
  26. <form role="form">
  27. <div class="form-group">
  28. <div style="text-align:center;"><img width="60" src="/images/payment/success.png" /></div>
  29. <div style="text-align:center;font-size:12px;margin-top:5px;">订单创建成功</div>
  30. <div style="text-align:center;font-size:12px;margin-top:5px;">单号:<?=$payId ?></div>
  31. </div>
  32. <div class="form-group">
  33. <div style="border:1px dotted #ccc; padding:12px 12px 4px 12px;">
  34. <!-- 商品图片与介绍 -->
  35. <p>名称:<?=$goodName ?></p>
  36. <p>价格:<?=$price ?></p>
  37. </div>
  38. </div>
  39. <div class="form-group-separator"></div>
  40. <div class="form-group" style="text-align:center;">
  41. <button type="button" name="sendToCustomer" class="btn btn-info btn-single" style="background-color: #68b828;border-color: #e5e5e5;border-radius:5px;">分享订单</button>
  42. <a href='<?= Yii::$app->params['frontUrl'] ?>/pay/receive-info?account=<?=$this->context->merchant['id'] ?>&payId=<?=$payId ?>' class="btn btn-info btn-single" style="background-color: #68b828;border-color: #e5e5e5;border-radius:5px;">填写收花人并付款</a>
  43. </div>
  44. <!-- <a href="/pay/receive-info?account=<?=$this->context->merchant['id'] ?>&payId=<?=$payId ?>">后续链接</a> -->
  45. </form>
  46. </div>
  47. </div>
  48. <script src="/js/util.js?version=<?= $this->context->version ?>"></script>
  49. </body>
  50. </html>
  51. <script>
  52. var generateCenterMask = $("div[name=generateCenterMask]");
  53. $("button[name=sendToCustomer]").click(function(){
  54. generateCenterMask.css('display','block');
  55. });
  56. generateCenterMask.click(function(){
  57. $(this).css("display","none");
  58. });
  59. //微信端
  60. <?php if($this->context->isWeixin){ ?>
  61. //微信分享
  62. var shareTitle = "<?=$goodName ?>";
  63. var descContent = "价格:<?= $price ?>元\n请填写收花人信息";
  64. var lineLink = '<?= Yii::$app->params['frontUrl'] ?>/pay/receive-info?account=<?=$this->context->merchant['id'] ?>&payId=<?=$payId ?>';
  65. var imgUrl = '<?= Yii::$app->params['imgUrl'] ?><?= $logo?>';
  66. wx.config({
  67. debug:false,
  68. appId: '<?= $this->context->signPackage['appId'] ?>',
  69. timestamp: <?= $this->context->signPackage['timestamp'] ?>,
  70. nonceStr: '<?= $this->context->signPackage['nonceStr'] ?>',
  71. signature: '<?= $this->context->signPackage['signature'] ?>',
  72. jsApiList: [
  73. 'checkJsApi',
  74. 'onMenuShareTimeline',
  75. 'onMenuShareAppMessage',
  76. 'onMenuShareQQ',
  77. 'onMenuShareWeibo',
  78. ]
  79. });
  80. wx.ready(function () {
  81. var shareData = {
  82. title: shareTitle,
  83. link: lineLink,
  84. imgUrl: imgUrl,
  85. desc:descContent,
  86. };
  87. //发送给朋友
  88. wx.onMenuShareAppMessage(shareData);
  89. wx.onMenuShareTimeline({
  90. title: shareTitle,
  91. link: lineLink,
  92. imgUrl: imgUrl,
  93. desc:descContent,
  94. success: function () {
  95. //分享成功后的操作
  96. },
  97. cancel: function () {
  98. // 用户取消分享后执行的回调函数
  99. }
  100. });
  101. wx.onMenuShareQQ({
  102. title: shareTitle,
  103. link: lineLink,
  104. imgUrl: imgUrl,
  105. desc:descContent,
  106. success: function () {
  107. //分享成功后的操作
  108. },
  109. cancel: function () {
  110. // 用户取消分享后执行的回调函数
  111. }
  112. });
  113. wx.onMenuShareWeibo(shareData);
  114. });
  115. <?php } ?>
  116. </script>