join.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <!DOCTYPE html>
  2. <html>
  3. <head lang="en">
  4. <include file="./Application/Home/View/Common/head_include.html" />
  5. <title>幻速-招募城市合伙人,赛车竞速馆、体验店加盟介绍-厦门欣富地智能科技</title>
  6. </head>
  7. <body>
  8. <include file="./Application/Home/View/Common/head.html" />
  9. <div class="main_div">
  10. <img src="https://img.x-motion.cn/home/image/join_22.jpg">
  11. <img src="https://img.x-motion.cn/home/image/join_16.jpg">
  12. <img src="https://img.x-motion.cn/home/image/join_23.jpg">
  13. <img src="https://img.x-motion.cn/home/image/join_20.jpg">
  14. <img src="https://img.x-motion.cn/home/image/join_11.jpg">
  15. <img src="https://img.x-motion.cn/home/image/join_24.jpg">
  16. <img src="https://img.x-motion.cn/home/image/join_25.jpg">
  17. <img src="https://img.x-motion.cn/home/image/join_8.jpg">
  18. <!--<img src="https://img.x-motion.cn/home/image/join_9.jpg">-->
  19. <a href="{:U('about/store')}">
  20. <img src="https://img.x-motion.cn/home/image/join_14.jpg">
  21. </a>
  22. <div class="message_div join_div">
  23. <form action="" id="message_form" method="post">
  24. <div class="join_title">咨询留言</div>
  25. <div class="join_title2">请填写以下信息,我们将安排专业的客服与您联系</div>
  26. <div class="message_input">
  27. <span>*</span>
  28. <span>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</span>
  29. <input type="text" name="name" id="name" placeholder="请输入您的姓名" value="">
  30. <span class="error"></span>
  31. </div>
  32. <div class="message_input">
  33. <span>*</span>
  34. <span>手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机:</span>
  35. <input type="text" name="tel" id="tel" placeholder="请输入您的真实电话号码" value="">
  36. <span class="error"></span>
  37. </div>
  38. <div class="message_input">
  39. <span></span>
  40. <span>意向方式:</span>
  41. <input type="text" name="intention" id="intention" placeholder="请输入合作意向" value="">
  42. <span class="error"></span>
  43. </div>
  44. <div class="message_input">
  45. <span></span>
  46. <span>所在城市:</span>
  47. <input type="text" name="city" id="city" placeholder="请输入您所在的城市" value="">
  48. <span class="error"></span>
  49. </div>
  50. <div class="message_input textarea">
  51. <span>*</span>
  52. <span>留&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;言:</span>
  53. <textarea name="content" id="content" placeholder="您有什么想告诉我们的?"></textarea>
  54. <span class="error"></span>
  55. </div>
  56. <div class="submit">
  57. <a href="javascript:void(0);" id="submit">
  58. <img src="https://img.x-motion.cn/home/image/message_button.jpg">
  59. </a>
  60. </div>
  61. </form>
  62. </div>
  63. </div>
  64. <include file="./Application/Home/View/Common/footer_logo.html" />
  65. <include file="./Application/Home/View/Common/footer.html" />
  66. </body>
  67. <script type="text/javascript">
  68. $(document).ready(function() {
  69. $('#submit').on('click', function(){
  70. $("#submit").attr('disabled', true);
  71. var check_key = {
  72. name:'',
  73. tel:'',
  74. content:''
  75. };
  76. var data = {
  77. name: $('#name').val(),
  78. tel: $('#tel').val(),
  79. intention: $('#intention').val(),
  80. city: $('#city').val(),
  81. content: $('#content').val()
  82. };
  83. var status = true;
  84. if(!isPoneAvailable(data["tel"])){
  85. error = $('#tel').siblings('.error');
  86. $(error).html('号码错误');
  87. status = false;
  88. }
  89. for (var Key in check_key){
  90. if(data[Key] == ''){
  91. error = $('#' + Key).siblings('.error');
  92. $(error).html('请填写');
  93. status = false;
  94. }
  95. }
  96. if(status == false){
  97. $("#submit").removeAttr('disabled');
  98. return false;
  99. }
  100. $.ajax({
  101. type: "post",
  102. url: "{:U(CONTROLLER_NAME . '/' . ACTION_NAME)}",
  103. data: {data: data},
  104. success: function (data) {
  105. if (data.status == '1') {
  106. layer.msg('提交成功!');
  107. setTimeout( function(){
  108. window.location.href = location.href;
  109. }, 2 * 1000 );
  110. } else if (data.status == '0') {
  111. parent.layer.msg(data.info, {icon: 5});
  112. }
  113. $("#submit").removeAttr('disabled');
  114. }
  115. });
  116. });
  117. $('.message_input input').on('focus', function(){
  118. $(this).siblings('.error').html('');
  119. });
  120. $('.message_input textarea').on('focus', function(){
  121. $(this).siblings('.error').html('');
  122. });
  123. });
  124. function isPoneAvailable(phone) {
  125. var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
  126. if (!myreg.test(phone)) {
  127. return false;
  128. } else {
  129. return true;
  130. }
  131. }
  132. </script>
  133. </html>