baom2017.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no" name="viewport">
  7. <title>2017(第六届)泉州台历宝宝大赛活动报名</title>
  8. <meta name="keywords" content="2017(第六届)泉州台历宝宝大赛活动报名"/>
  9. <meta name="description" content="2017(第六届)泉州台历宝宝大赛活动报名"/>
  10. <base href="__MODULE__" />
  11. <!-- css -->
  12. <link rel="stylesheet" href="__PUBLIC__/style/style.css">
  13. <!-- js -->
  14. </head>
  15. <?php
  16. require_once(dirname(dirname(dirname( dirname(dirname(dirname(__FILE__)))))).'/baby/jssdk.php' );
  17. $jssdk = new JSSDK("wx4c63f7d6efe24004", "85524600c68d14b70acd49ed32af2d11");
  18. $signPackage = $jssdk->GetSignPackage();
  19. ?>
  20. <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  21. <script language="javascript">
  22. wx.config({
  23. debug: false,
  24. appId: '<?php echo $signPackage["appId"]; ?>',
  25. timestamp: <?php echo $signPackage["timestamp"]; ?>,
  26. nonceStr: '<?php echo $signPackage["nonceStr"]; ?>',
  27. signature: '<?php echo $signPackage["signature"]; ?>',
  28. jsApiList: [
  29. 'onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','hideMenuItems'
  30. ]
  31. });
  32. wx.ready(function () {
  33. wx.onMenuShareTimeline({
  34. title: '2017(第六届)泉州台历宝宝大赛活动报名', // 分享标题
  35. link: 'http://baby2015.mnw.cn/index.php?m=&c=Index&a=baom2017', // 分享链接
  36. imgUrl: 'http://baby2015.mnw.cn/Public/img/top2017.jpg', // 分享图标
  37. success: function () {
  38. // 用户确认分享后执行的回调函数
  39. },
  40. cancel: function () {
  41. // 用户取消分享后执行的回调函数
  42. }
  43. });
  44. wx.onMenuShareAppMessage({
  45. title: '2017(第六届)泉州台历宝宝大赛活动报名', // 分享标题
  46. desc: '2017(第六届)泉州台历宝宝大赛活动报名', // 分享描述
  47. link: 'http://baby2015.mnw.cn/index.php?m=&c=Index&a=baom2017', // 分享链接
  48. imgUrl: 'http://baby2015.mnw.cn/Public/img/top2017.jpg', // 分享图标
  49. type: '', // 分享类型,music、video或link,不填默认为link
  50. dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
  51. success: function () {
  52. // 用户确认分享后执行的回调函数
  53. },
  54. cancel: function () {
  55. // 用户取消分享后执行的回调函数
  56. }
  57. });
  58. //wx.hideOptionMenu();
  59. wx.hideMenuItems({
  60. menuList: ['menuItem:exposeArticle','menuItem:setFont','menuItem:copyUrl','menuItem:openWithQQBrowser','menuItem:openWithSafari','menuItem:share:email'] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
  61. });
  62. });
  63. </script>
  64. <body>
  65. <div class="wrap">
  66. <link rel="stylesheet" href="__PUBLIC__/style/jquery.fileupload.css">
  67. <link rel="stylesheet" href="__PUBLIC__/style/jquery.fileupload-ui.css">
  68. <link rel="stylesheet" href="__PUBLIC__/style/bootstrap.min.css">
  69. <script src="__PUBLIC__/style/jquery-1.11.0.min.js"></script>
  70. <script src="__PUBLIC__/style/jquery.ui.widget.js"></script>
  71. <script src="__PUBLIC__/style/jquery.iframe-transport.js"></script>
  72. <script src="__PUBLIC__/style/jquery.fileupload.js"></script>
  73. <script src="__PUBLIC__/style/jquery.xdr-transport.js"></script>
  74. <style>
  75. p{margin-bottom:0px;}
  76. .main{padding: 20px 15px 0;}
  77. .main .item, .main .item-captcha .input-info {
  78. margin-bottom: 10px;
  79. }
  80. a, button, input {
  81. outline: 0;
  82. text-decoration: none;
  83. -webkit-tap-highlight-color: transparent;
  84. }
  85. .main .item {
  86. position: relative;
  87. width: 100%;
  88. }
  89. .main .item .txt-input {
  90. width: 100%;
  91. height: 44px;
  92. line-height: normal;
  93. padding: 0;
  94. border: 1px solid #d7d7d7;
  95. border-radius: 3px;
  96. background: #fff;
  97. font-family: '\5fae\8f6f\96c5\9ed1';
  98. font-size: 16px;
  99. color: #252525;
  100. -webkit-appearance: none;
  101. }
  102. .main .item-login-option:after, .main .item:after {
  103. content: '\20';
  104. clear: both;
  105. }
  106. .main .item:after {
  107. display: block;
  108. }
  109. .main .btn-login {
  110. display: inline-block;
  111. width: 100%;
  112. height: 40px;
  113. border-radius: 3px;
  114. background: #f25454;
  115. text-decoration: none;
  116. line-height: 39px;
  117. text-align: center;
  118. font-size: 17px;
  119. color: #fff;
  120. border:none;
  121. }
  122. .main .item .txt-sms-captcha {
  123. float: left;
  124. padding-left: 15px;
  125. }
  126. .main .btn-disabled {
  127. background: #e2e2e2;
  128. cursor: default;
  129. color: #bdbdbd;
  130. }
  131. .item span{padding-right:8px;padding-left:8px;}
  132. </style>
  133. <p>
  134. <img src="__PUBLIC__/img/top2017.jpg" width="100%" />
  135. </p>
  136. <div class="main">
  137. <div><p></p><p></p></div>
  138. <form action='{$suburl}' method="post" enctype="multipart/form-data">
  139. <div class="fom1">
  140. <div class="item">
  141. <input class="txt-input txt-sms-captcha" id="babyname" name="babyname" type="text" autocomplete="off" placeholder="请输入宝贝姓名">
  142. </div>
  143. <div class="item">
  144. <label><input type="radio" name="sex" class="inp-radio" value="1" checked /><span>男宝贝</span></label>
  145. <label><input type="radio" name="sex" class="inp-radio" value="2" /><span>女宝贝</span></label>
  146. </div>
  147. <div class="item">
  148. <input class="txt-input txt-sms-captcha" id="birthday" name="birthday" type="text" autocomplete="off" placeholder="请输入宝贝出生年月">
  149. </div>
  150. <div class="item">
  151. <input class="txt-input txt-sms-captcha" id="parname" name="parname" type="text" autocomplete="off" placeholder="请输入联系人姓名">
  152. </div>
  153. <div class="item">
  154. <input class="txt-input txt-sms-captcha" id="mobile" name="mobile" type="tel" autocomplete="off" placeholder="请输入联系人电话">
  155. </div>
  156. <div class="item">
  157. <input class="txt-input txt-sms-captcha" id="weixin" name="weixin" autocomplete="off" placeholder="联系人微信号">
  158. </div>
  159. <div class="item">
  160. <label><span>所在区域:</span></label>
  161. </div>
  162. <div class="item">
  163. <select name="area" class="form-control">
  164. <option value="鲤城">鲤城</option>
  165. <option value="丰泽">丰泽</option>
  166. <option value="晋江">晋江</option>
  167. <option value="石狮">石狮</option>
  168. <option value="洛江">洛江</option>
  169. <option value="台投">台投</option>
  170. <option value="南安">南安</option>
  171. <option value="惠安">惠安</option>
  172. <option value="泉港">泉港</option>
  173. <option value="安溪">安溪</option>
  174. <option value="永春">永春</option>
  175. <option value="德化">德化</option>
  176. <option value="其他">其他</option>
  177. </select>
  178. </div>
  179. <div class="item">
  180. <label><span>参赛类别</span></label>
  181. </div>
  182. <div class="item">
  183. <label><input type="radio" name="cid" value="1" checked /><span>0-3岁幼儿组</span></label>
  184. <label><input type="radio" name="cid" value="2" /><span>4-12岁儿童组</span></label>
  185. </div>
  186. <div class="item" >
  187. <p>幼儿组:0—3岁(2013年9月1日及之后出生)</p>
  188. <p>儿童组:4—12岁(2004年9月1日-2013年8月31日出生) </p>
  189. </div>
  190. <div class="item">
  191. <p><span>上传图片:</span>
  192. <span class="btn btn-success fileinput-button" style="width:113px;">
  193. <i class="glyphicon glyphicon-plus"></i>
  194. <span>上传图片...</span>
  195. <input type="file" name="files" id="fileupload" class="fileupload ">
  196. </span>
  197. </p>
  198. </div>
  199. <div class="item">
  200. <p id="tip"></p>
  201. </div>
  202. <div class="item">
  203. <p id="upload_img"></p>
  204. </div>
  205. <div class="item">
  206. <p>照片仅需上传一张,要求清晰美观。如图片未上传成功,请将图片压缩到4M以下。</p>
  207. <p>图片上传成功后,将会显示在页面上.如未报名成功,请与我们联系:</p>
  208. <p><strong>咨询热线:</strong>0595-28679111 </p>
  209. </div>
  210. </div>
  211. <div style="padding:20px;"><input class="sub btn-login" id="submit" type="submit" value="立即报名"/></div>
  212. </form>
  213. <p style="text-align:center;"><img src="__PUBLIC__/img/weixinqun.jpg" style="max-width:90%;" /></p>
  214. <p style="text-align:center;line-height:36px;">扫一扫添加客服微信,加入活动微信群<br/>以便通知后续事宜。</p>
  215. <div class="bod">
  216. <h3 style="color:#ff0000;"><br/></h3>
  217. <div style="margin:0 auto;width:120px;"></div>
  218. <p style="margin:20px 0;"><b></b></p>
  219. </div>
  220. </div>
  221. <script>
  222. var site_url = 'http://{$siteurl}';
  223. var is_img = false;
  224. var is_sub = true;
  225. $(function(){
  226. $('#fileupload').fileupload({
  227. url:'{$uppicurl}',
  228. dataType:'json',
  229. success: function (data) {
  230. var file = data.files;
  231. var s_html = '';
  232. s_html += '<div class="img_line">';
  233. s_html += ' <img src="'+site_url+file.thumb_url+'" width="100" /></p>';
  234. s_html += ' <input type="hidden" name="thumb_url" value="'+file.thumb_url+'" />';
  235. s_html += ' <input type="hidden" name="image_url" value="./Uploads/'+file.savepath+file.savename+'" />';
  236. s_html += '</div>';
  237. $('#upload_img').html(s_html);
  238. is_img = true;
  239. },
  240. fail: function (e, data) {
  241. $('#tip').html('该照片上传失败,请重新上传一次。');
  242. }
  243. });
  244. $('#fileupload').fileupload('option', {
  245. progressall: function (e, data) {
  246. var progress = parseInt(data.loaded / data.total * 100, 10);
  247. //console.log(progress + '%');
  248. $('#tip').html(progress+ '%');
  249. }
  250. });
  251. $("form").submit(function(){
  252. $('#submit').val('提交中...');
  253. if(!is_sub)
  254. {
  255. $('#submit').val('立即报名');
  256. return false;
  257. }
  258. var self = $(this);
  259. if(!is_img){
  260. alert('请上传照片');
  261. $('#submit').val('立即报名');
  262. return false;
  263. }
  264. if($.trim($('#babyname').val()) == '')
  265. {
  266. alert('宝贝姓名不能为空!');
  267. $('#submit').val('立即报名');
  268. return false;
  269. }
  270. if($.trim($('#birthday').val()) == '')
  271. {
  272. alert('宝贝出生年月不能为空!');
  273. $('#submit').val('立即报名');
  274. return false;
  275. }
  276. if($.trim($('#parname').val()) == '')
  277. {
  278. alert('请输入联系人姓名');
  279. $('#submit').val('立即报名');
  280. return false;
  281. }
  282. if($.trim($('#mobile').val()) == '')
  283. {
  284. alert('联系方式不能为空!');
  285. $('#submit').val('立即报名');
  286. return false;
  287. }
  288. var mobile = $('#mobile').val();
  289. if(!mobile.match('^1[3|5|8|7][0-9]{9}$')){
  290. alert("请输入正确的手机号码!");
  291. $('#submit').val('立即报名');
  292. return false;
  293. }
  294. if($.trim($('#weixin').val()) == '')
  295. {
  296. alert('联系人微信号不能为空!');
  297. $('#submit').val('立即报名');
  298. return false;
  299. }
  300. $.post(self.attr("action"), self.serialize(), success, "json");
  301. return false;
  302. function success(data){
  303. if(data.code == 0){
  304. alert("报名成功,谢谢参与!");
  305. is_sub = true;
  306. $('#submit').val('报名成功');
  307. //insrt_id
  308. //window.location.href = '{$toupurl}';
  309. } else {
  310. alert(data.mes);
  311. $('#submit').val('立即报名');
  312. is_sub = true;
  313. }
  314. }
  315. });
  316. })
  317. </script>
  318. <div class="clear"></div>
  319. <!-- footer -->
  320. </div>
  321. </body>
  322. </html>