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.

91 lines
3.8 KiB

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>
  11. <style>
  12. .account{text-align:center;margin-top:30px;}
  13. .account .icon{color:#FFCC00;font-size:100px;}
  14. .account .money{color:#353535;font-size:36px;}
  15. .account .tit{color:#000;font-size:18px;}
  16. .bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
  17. </style>
  18. <div class="floor account">
  19. <div class="icon"><i class="fa fa-google-wallet"></i></div><br>
  20. <div class="tit"><b style="color:#f23030;">1、填写金额</b> > 2、确认并支付 > 3、完成</div>
  21. <input type="hidden" name="pay_type" id="pay_type" value="1">
  22. <br>
  23. <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>
  24. <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>
  25. <!-- <p style="margin:0 10px 10px 10px;">支付金额:<span style="color:#f23030;">¥ 99.80</span>
  26. 实际到账:¥ 100.00</p> -->
  27. </div>
  28. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  29. <script>
  30. function chongzhi()
  31. {
  32. var money = $('#money').val();
  33. var re = /^[0-9]+$/; //判断字符串是否为数字
  34. if(money == '')
  35. {
  36. //提示
  37. layer.open({
  38. content: '请输入充值金额'
  39. ,skin: 'msg'
  40. ,time: 2 //2秒后自动关闭
  41. });
  42. return false;
  43. }
  44. if(!re.test(money))
  45. {
  46. //提示
  47. layer.open({
  48. content: '金额格式不正确'
  49. ,skin: 'msg'
  50. ,time: 2 //2秒后自动关闭
  51. });
  52. return false;
  53. }
  54. //询问框
  55. layer.open({
  56. content: '确定要充值吗?'
  57. ,btn: ['确定', '取消']
  58. ,yes: function(){
  59. var url = '<?php echo env('APP_API_URL')."/user_recharge_add"; ?>';
  60. var pay_type = $('#pay_type').val();
  61. $.post(url,{access_token:'<?php echo $_SESSION['weixin_user_info']['access_token']; ?>',money:money,pay_type:pay_type},function(res)
  62. {
  63. //提示
  64. layer.open({
  65. content: res.msg
  66. ,skin: 'msg'
  67. ,time: 2 //2秒后自动关闭
  68. });
  69. if(res.code==0)
  70. {
  71. location.href = '<?php echo substr(route('weixin_user_recharge_order_detail',array('id'=>1)), 0, -1); ?>' + res.data;
  72. }
  73. else
  74. {
  75. }
  76. },'json');
  77. }
  78. });
  79. }
  80. </script>
  81. @include('weixin.common.footer')
  82. </body></html>