clear.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!DOCTYPE html>
  2. <html class="bg-white">
  3. <head>
  4. <meta charset="utf-8">
  5. <!--此行代码为禁止苹果手机自动识别电话号码-->
  6. <meta name="format-detection" content="telephone=no">
  7. <meta name="viewport"
  8. content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
  9. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  10. <title>清楚注册信息</title>
  11. <link rel="stylesheet" type="text/css" href="{{asset('wap/css/weui.min.css')}}"/>
  12. <link rel="stylesheet" type="text/css" href="{{asset('wap/css/common.css')}}"/>
  13. <link rel="stylesheet" type="text/css" href="{{asset('wap/css/pay-page.css')}}"/>
  14. <script src="{{asset('wap/js/jquery-2.1.4.js')}}"></script>
  15. <script src="{{asset('wap/js/vue.js')}}?a=1"></script>
  16. <script src="{{asset('wap/js/common.js')}}?a=1"></script>
  17. </head>
  18. <body>
  19. <div id="app">
  20. <!-- 导航栏 -->
  21. <!-- 支付详情 -->
  22. <div class="pay-detail">
  23. <div class="pay-layout">
  24. <div class="spend-total">清除账户</div>
  25. <div class="input-money">
  26. <form id="zfb_pay" method="post" action="{{route('pay.clear')}}">
  27. <input type="text" v-model="pay_money" name="pay_money" mix="0.01" autofocus="autofocus" style="width: 90%"></input>
  28. </form>
  29. </div>
  30. <div class="prompt">请输入需要清除的手机号码多个使用,连接</div>
  31. </div>
  32. </div>
  33. <!-- button -->
  34. <div class="button-layout" @click="creatZfbPay">
  35. <div class="button">
  36. <span>支付</span>
  37. </div>
  38. </div>
  39. <!--BEGIN toast-->
  40. <div id="toast" style="display: none;">
  41. <div class="weui-mask_transparent"></div>
  42. <div class="weui-toast">
  43. <i class="weui-icon-success-no-circle weui-icon_toast"></i>
  44. <p class="weui-toast__content">@{{success_msg}}</p>
  45. </div>
  46. </div>
  47. <!--BEGIN toast-->
  48. <div id="textMoreToast" v-show="error_show">
  49. <div class="weui-mask_transparent"></div>
  50. <div class="weui-toast weui-toast_text-more">
  51. <i class="weui-icon-warn weui-icon_toast"></i>
  52. <p class="weui-toast__content">@{{error_msg}}</p>
  53. </div>
  54. </div>
  55. </div>
  56. <script>
  57. $(function () {
  58. var vm = new Vue({
  59. el: '#app',
  60. data: {
  61. pay_money: '',
  62. success_msg: '',
  63. error_msg: '',
  64. error_show: false,
  65. success_show: false,
  66. is_pay: false,
  67. is_ajax: false,
  68. },
  69. methods: {
  70. 'errorMgs': function (error_msg) {
  71. this.error_msg = error_msg;
  72. this.error_show = true;
  73. setTimeout(function () {
  74. vm.error_show = false;
  75. }, 2000)
  76. },
  77. 'successMsg': function (success_msg) {
  78. this.success_msg = success_msg;
  79. this.success_show = true;
  80. setTimeout(function () {
  81. vm.success_show = false;
  82. }, 2000)
  83. },
  84. 'creatZfbPay': function () {
  85. console.log('---------------------')
  86. if (this.is_ajax) {
  87. return false;
  88. }
  89. this.is_ajax = true;
  90. sendAjax('{{route('pay.clear')}}', {
  91. 'pay_money': this.pay_money,
  92. }, function (data) {
  93. vm.is_ajax = false;
  94. if (data.code * 1 == 1) {
  95. vm.successMsg(data.msg);
  96. vm.pay_money='';
  97. } else {
  98. vm.errorMgs(data.msg);
  99. }
  100. })
  101. }
  102. },
  103. watch: {
  104. },
  105. created: function () {
  106. }
  107. });
  108. })
  109. </script>
  110. </body>
  111. </html>