You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.9 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  2. <title>充值</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
  3. <link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
  4. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
  5. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
  6. <link href="<?php echo env('APP_URL'); ?>/css/font-awesome.min.css" type="text/css" rel="stylesheet"></head><body>
  7. <div class="classreturn loginsignup">
  8. <div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
  9. <div class="ds-in-bl tit center"><span>充值</span></div>
  10. <div class="ds-in-bl nav_menu"><a href="<?php echo route('weixin_user_recharge_order'); ?>">充值明细</a></div>
  11. </div>
  12. <style>
  13. .account{text-align:center;margin-top:30px;}
  14. .account .icon{color:#FFCC00;font-size:100px;}
  15. .account .money{color:#353535;font-size:36px;}
  16. .account .tit{color:#000;font-size:18px;}
  17. .bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
  18. </style>
  19. <div class="floor account">
  20. <div class="icon"><i class="fa fa-google-wallet"></i></div><br>
  21. <div class="tit"><b style="color:#f23030;">1、填写金额</b> > 2、确认并支付 > 3、完成</div>
  22. <input type="hidden" name="pay_type" id="pay_type" value="1">
  23. <br>
  24. <div style="margin:10px;"><input name="money" min="10" max="10000" type="text" id="money" placeholder="充值金额(元)、整数" style="width:100%;text-align:center;border:1px solid #bfbfbf;color:#999;box-sizing:border-box;" class="bottoma"></div>
  25. <a style="margin:0 10px 10px 10px;background-color:#1aad19;text-align:center;color:#fff;border:1px solid #179e16;" class="bottoma" href="javascript:chongzhi();">开始充值</a>
  26. <!-- <p style="margin:0 10px 10px 10px;">支付金额:<span style="color:#f23030;">¥ 99.80</span>
  27. 实际到账:¥ 100.00</p> -->
  28. </div>
  29. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  30. <script>
  31. function chongzhi()
  32. {
  33. var money = $('#money').val();
  34. var re = /^[0-9]+$/; //判断字符串是否为数字
  35. if(money == '')
  36. {
  37. //提示
  38. layer.open({
  39. content: '请输入充值金额'
  40. ,skin: 'msg'
  41. ,time: 2 //2秒后自动关闭
  42. });
  43. return false;
  44. }
  45. if(!re.test(money))
  46. {
  47. //提示
  48. layer.open({
  49. content: '金额格式不正确'
  50. ,skin: 'msg'
  51. ,time: 2 //2秒后自动关闭
  52. });
  53. return false;
  54. }
  55. //询问框
  56. layer.open({
  57. content: '确定要充值吗?'
  58. ,btn: ['确定', '取消']
  59. ,yes: function(){
  60. var url = '<?php echo env('APP_API_URL')."/user_recharge_add"; ?>';
  61. var pay_type = $('#pay_type').val();
  62. $.post(url,{access_token:'<?php echo $_SESSION['weixin_user_info']['access_token']; ?>',money:money,pay_type:pay_type},function(res)
  63. {
  64. //提示
  65. layer.open({
  66. content: res.msg
  67. ,skin: 'msg'
  68. ,time: 2 //2秒后自动关闭
  69. });
  70. if(res.code==0)
  71. {
  72. location.href = '<?php echo route('weixin_user_recharge_order_detail'); ?>?id=' + res.data;
  73. }
  74. else
  75. {
  76. }
  77. },'json');
  78. }
  79. });
  80. }
  81. </script>
  82. @include('weixin.common.footer')
  83. </body></html>