index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
  7. <!-- <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" /> -->
  8. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  9. <title>未来bike-全省寻找城市合伙人</title>
  10. <style>
  11. html,
  12. body {
  13. width: 100%;
  14. margin: 0;
  15. padding: 0;
  16. }
  17. #container {
  18. width: 100%;
  19. height: 100%;
  20. /* background: #05E5C7; */
  21. background-image: url('http://resource.weilaibike.com/H5/H5_background.png');
  22. background-size: 100% 100%;
  23. margin: 0;
  24. padding: 0;
  25. padding-bottom: 50px !important;
  26. }
  27. .one {
  28. width: 100%;
  29. }
  30. .date {
  31. display: flex;
  32. flex-direction: column;
  33. align-items: center;
  34. width: 100%;
  35. }
  36. .bottom_back {
  37. width: 100%;
  38. height: 30px;
  39. background: #05E5C7;
  40. }
  41. .bottom {
  42. width: 100%;
  43. display: flex;
  44. justify-content: center;
  45. align-items: center;
  46. background: #05E5C7;
  47. }
  48. .bottom .div {
  49. width: 90%;
  50. display: flex;
  51. flex-direction: column;
  52. align-items: center;
  53. /* height:547px; */
  54. background: rgba(255, 255, 255, 1);
  55. border-radius: 10px;
  56. padding-bottom: 26px;
  57. padding-top: 19px;
  58. }
  59. .bike {
  60. width: 262.5px;
  61. height: 38px;
  62. border: 1px solid rgba(229, 229, 229, 1);
  63. font-size: 16px;
  64. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  65. -webkit-appearance: none;
  66. }
  67. .bottom .div div {
  68. display: flex;
  69. flex-direction: column;
  70. padding-top: 20px;
  71. width: 80%;
  72. }
  73. .bottom .div div span {
  74. font-size: 16px;
  75. font-family: PingFang SC;
  76. font-weight: 500;
  77. color: rgba(62, 59, 63, 1);
  78. }
  79. .bottom .div .check {
  80. width: 80%;
  81. }
  82. .bottom .div .check p {
  83. display: flex;
  84. align-items: center;
  85. font-size: 14px;
  86. font-family: PingFang SC;
  87. font-weight: 400;
  88. color: rgba(62, 59, 63, 1);
  89. margin: 8px 0px;
  90. }
  91. .bottom .div .radio {
  92. display: flex;
  93. align-items: center;
  94. flex-direction: row;
  95. width: 80%;
  96. }
  97. .bottom .div .radio span {
  98. font-size: 12px;
  99. font-family: PingFang SC;
  100. font-weight: 400;
  101. color: rgba(62, 59, 63, 1);
  102. }
  103. .bottom .div .btn1 {
  104. width: 80%;
  105. height: 39px;
  106. background: linear-gradient(0deg, rgba(24, 213, 185, 1) 0%, rgba(89, 240, 202, 1) 100%);
  107. border-radius: 20px;
  108. display: flex;
  109. align-items: center;
  110. justify-content: center;
  111. padding-top: 0px !important;
  112. font-size: 16px;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. border: none !important;
  116. margin-top: 23px;
  117. }
  118. .bottom_phone {
  119. margin: 0;
  120. padding: 0;
  121. position: fixed;
  122. width: 100%;
  123. height: 50px;
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. justify-content: center;
  128. bottom: 0px;
  129. left: 0px;
  130. font-size: 14px;
  131. font-family: PingFang SC;
  132. font-weight: 400;
  133. color: white;
  134. background: linear-gradient(266deg, rgba(255, 150, 93, 1) 0%, rgba(255, 81, 77, 1) 100%);
  135. }
  136. a {
  137. text-decoration: none;
  138. color: white;
  139. }
  140. /*正常的未被访问过的链接*/
  141. a:link {
  142. text-decoration: none;
  143. color: white;
  144. }
  145. /*已经访问过的链接*/
  146. a:visited {
  147. text-decoration: none;
  148. color: white;
  149. }
  150. /*鼠标划过(停留)的链接*/
  151. a:hover {
  152. text-decoration: none;
  153. color: white;
  154. }
  155. /* 正在点击的链接*/
  156. a:active {
  157. text-decoration: none;
  158. color: white;
  159. }
  160. </style>
  161. </head>
  162. <body>
  163. <div id="container">
  164. <div id="app">
  165. <div class="date">
  166. <img src="http://resource.weilaibike.com/H5/H5_one.png" alt="" class="one">
  167. <img src="http://resource.weilaibike.com/H5/five.jpg" alt="" class="one">
  168. <img src="http://resource.weilaibike.com/H5/six.jpg" alt="" class="one">
  169. <!-- <img src="http://resource.weilaibike.com/H5/H5_four1.png" alt="" class="one"> -->
  170. <div class="bottom">
  171. <div class="div">
  172. <div>
  173. <span style="padding-bottom: 7px;">姓名(方便称呼)<span style="color:red;">*</span></span>
  174. <input class="bike name" />
  175. </div>
  176. <div>
  177. <span style="padding-bottom: 7px;">电话(方便联系您)<span style="color:red;">*</span></span>
  178. <input class="bike phone" />
  179. </div>
  180. <div class="check">
  181. <span>您还想要了解什么问题(多选)<span style="color: red;">*</span></span>
  182. <p class="p1 p"><input type="checkbox" name="怎么投资加盟?" /><label>怎么投资加盟?</label></p>
  183. <p class="p2 p"><input type="checkbox" name="这个项目的利润是怎么样的?" /><label>这个项目的利润是怎么样的?</label>
  184. </p>
  185. <p class="p3 p"><input type="checkbox" name="想了解关于车辆使用的问题?" /><label>想了解关于车辆使用的问题?</label>
  186. </p>
  187. <p class="p4 p"><input type="checkbox"name="关于车辆押金和骑行费用的问题?" /><label>关于车辆押金和骑行费用的问题?</label>
  188. </p>
  189. </div>
  190. <div>
  191. <span style="padding-bottom: 7px;">您还有什么疑问吗?</span>
  192. <input class="bike remark">
  193. </div>
  194. <!-- <div class="radio">
  195. <input type="checkbox" name="item">
  196. <span>输入历史手机号</span>
  197. <span style="color: #02B89B;">《个人信息授权与保护声明》</span>
  198. </div> -->
  199. <div class="btn1">
  200. <span style="color:rgba(255,255,255,1);">免费获取加盟利润资料</span>
  201. </div>
  202. </div>
  203. </div>
  204. <div class="bottom_back"></div>
  205. <div class="bottom_phone">
  206. <img src="http://resource.weilaibike.com/H5/phone1.png" alt="" style="width: 24px;height: 24px;">
  207. <a href="tel:15981810505">拨打电话</a>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. <script>
  214. $(".p").click(function () {
  215. if ($(this).children("input").is(':checked')) {
  216. $(this).children("input").prop("checked", false);
  217. } else {
  218. $(this).children("input").prop("checked", true);
  219. }
  220. });
  221. $(".radio").click(function () {
  222. if ($(this).children("input").is(':checked')) {
  223. $(this).children("input").prop("checked", false);
  224. } else {
  225. $(this).children("input").prop("checked", true);
  226. }
  227. });
  228. $(".bike").blur(function () {
  229. var height = $('.bike').offset().top
  230. $("html,body").animate({ scrollTop: height }, 500);
  231. })
  232. $(".btn1").click(function () {
  233. var name = $(".name").val();
  234. var phone = $(".phone").val();
  235. var remark = $(".remark").val();
  236. var p1 = $('.p1').children("input").is(":checked");
  237. var p2 = $('.p2').children("input").is(":checked");
  238. var p3 = $('.p3').children("input").is(":checked");
  239. var p4 = $('.p4').children("input").is(":checked");
  240. var reg1 = /^[\u4E00-\u9FA5]{2,4}$/;
  241. var arr = []
  242. if (p1) {
  243. arr = arr.concat($('.p1').children("input").prevObject[0].innerText)
  244. }
  245. if (p2) {
  246. arr = arr.concat($('.p2').children("input").prevObject[0].innerText)
  247. }
  248. if (p3) {
  249. arr = arr.concat($('.p3').children("input").prevObject[0].innerText)
  250. }
  251. if (p4) {
  252. arr = arr.concat($('.p4').children("input").prevObject[0].innerText)
  253. }
  254. console.log(arr)
  255. if (!reg1.test(name)) {
  256. alert('请输入正确的姓名')
  257. return;
  258. } else if (phone.length != 11) {
  259. alert('请输入正确的电话')
  260. return;
  261. } else if (arr == '') {
  262. alert('请选择要了解的问题')
  263. return;
  264. } else {
  265. $.ajax({
  266. url: 'https://api.weilaibike.dev.hanyiyun.com/api/h5/business',
  267. method: 'POST',
  268. data: {
  269. 'name': name,
  270. 'mobile': phone,
  271. 'question': arr,
  272. 'remark': remark
  273. },
  274. success: function (res) {
  275. console.log(res);
  276. if (res.status) {
  277. alert('申请成功')
  278. }
  279. if (res.status_code == 422 || res.status_code == 500) {
  280. alert('失败,请重试~')
  281. }
  282. },
  283. fail: function () {
  284. }
  285. })
  286. }
  287. })
  288. $(".clear").click(function () {
  289. $('.bike').val('');
  290. $('#demo1').val('');
  291. $('#demo2').val('');
  292. })
  293. </script>
  294. </body>
  295. </html>