tryDetail.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <{include file="header.html"}>
  2. <{include file="nav.html"}>
  3. <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
  4. <div class="menu_icon" id="munu_icon"><span></span></div>
  5. <div class="article_title3"><{$tryInfo.events_name}></div>
  6. <div class="try_show_box">
  7. <div class="try_img"><img src="<{$tryInfo.img_url}>"></div>
  8. <div class="article_title">雅漾修红舒润面膜</div>
  9. <div class="article_content2">
  10. <p><{$tryInfo.events_tips}></p>
  11. </div>
  12. </div>
  13. <!--活动正常显示内容 begin-->
  14. <div class="article_title center">输入您的联系方式申请试用</div>
  15. <div class="join_submit_box">
  16. <div class="submit_cell"><input name="realname" type="text" class="input_style" placeholder="姓名:"></div>
  17. <div class="submit_cell"><input name="phone" type="text" class="input_style" placeholder="手机号码:"></div>
  18. <div class="submit_cell"><input name="address" type="text" class="input_style" placeholder="收货地址:"></div>
  19. <div class="submit_cell submit_cell_area"><textarea name="content" class="input_textarea" placeholder="申请宣言:"></textarea></div>
  20. <div class="submit_cell" style="border:none; background:none"><button type="submit" class="apply_btn submit_btn_style">马上领取</button></div>
  21. </div>
  22. <!--活动正常显示内容 end-->
  23. <!--活动结束显示内容 begin-->
  24. <!--<div class="try_end_box">
  25. <div class="article_title center">本活动已经结束!<br>您可以参加以下活动</div>
  26. <div class="try_other_list">
  27. <dl>
  28. <a href="#">
  29. <dt><img src="<{$web_cfg.cdn}>/public/static/img/try_img2.jpg"></dt>
  30. <dd>
  31. <p>赢取Anna Sui水润娇柔护唇膏截至时间:2014-7-12</p>
  32. <p class="go_btn">去看看&gt;&gt;</p>
  33. </dd>
  34. </a>
  35. </dl>
  36. <dl>
  37. <a href="#">
  38. <dt><img src="<{$web_cfg.cdn}>/public/static/img/try_img2.jpg"></dt>
  39. <dd>
  40. <p>赢取Anna Sui水润娇柔护唇膏截至时间:2014-7-12</p>
  41. <p class="go_btn">去看看&gt;&gt;</p>
  42. </dd>
  43. </a>
  44. </dl>
  45. <dl>
  46. <a href="#">
  47. <dt><img src="<{$web_cfg.cdn}>/public/static/img/try_img2.jpg"></dt>
  48. <dd>
  49. <p>赢取Anna Sui水润娇柔护唇膏截至时间:2014-7-12</p>
  50. <p class="go_btn">去看看&gt;&gt;</p>
  51. </dd>
  52. </a>
  53. </dl>
  54. <div class="clear"></div>
  55. </div>
  56. </div>-->
  57. <!--活动结束显示内容 end-->
  58. <div class="activity_des">
  59. <p style="font-weight:800">活动规则:</p>
  60. <p><{$tryInfo.events_rules}></p>
  61. </div>
  62. </div>
  63. <!--申请提交成功提示 begin-->
  64. <div class="try_tips_box" id="try_tips_box" style="display:none;">
  65. <p>试用申请成功!</p>
  66. <a href="<{$web_cfg.domain}>/?c=index" class="submit_btn_style">返回活动列表</a>
  67. </div>
  68. <!--申请提交成功提示 end-->
  69. <script>
  70. KISSY.use('node, io', function (S, Node, IO) {
  71. var $ = S.all;
  72. $('.apply_btn').on('click', function () {
  73. var realname = S.trim($('input[name=realname]').val());
  74. if (realname == '') {
  75. alert('姓名不能为空');
  76. return false;
  77. }
  78. var phone = S.trim($('input[name=phone]').val());
  79. var regex = /^(1[0-9][0-9]|15[0-9]|18[02-9]|14[57])[0-9]{8}$/;
  80. if(!regex.test(phone)) {
  81. alert('请填写有效手机号码');
  82. return false;
  83. }
  84. var address = S.trim($('input[name=address]').val());
  85. if (address == '') {
  86. alert('请填写收货地址');
  87. return false;
  88. }
  89. var content = S.trim($('textarea[name=content]').val());
  90. if (content == '') {
  91. alert('请填写申请宣言');
  92. return false;
  93. }
  94. IO.get('<{$web_cfg.domain}>/?c=tryDetail&a=apply'
  95. , {
  96. tryid: '<{$tryInfo.id}>',
  97. realname: realname,
  98. phone: phone,
  99. address: address,
  100. content: content
  101. }
  102. , function (data) {
  103. if (data.ok) {
  104. $('#try_tips_box').show();
  105. } else {
  106. alert(data.msg);
  107. return false;
  108. }
  109. }
  110. , 'json'
  111. );
  112. });
  113. });
  114. </script>
  115. <{include file="bottom.html"}>