ia_air_purifier_01.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="pragma" content="no-cache">
  6. <meta http-equiv="cache-control" content="no-cache">
  7. <meta http-equiv="expires" content="0">
  8. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="format-detection" content="telphone=no, email=no" />
  12. <title>Aiberle爱贝源</title>
  13. <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
  14. <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
  15. <link rel="stylesheet" type="text/css" href="css/main.css" />
  16. <style>
  17. .back{background: url(images/ia_air_purifier_back.jpg);background-size: 100%; background-repeat:no-repeat;}
  18. </style>
  19. </head>
  20. <body>
  21. <!-- <div class="back" style="width: 100%; height: 100%;">
  22. <div style="height: 107px;"></div>
  23. <div class="receive"><img src="images/ia_air_receive.png" alt="" style="width: 66%;display: block;margin-left: 19%;margin-top: 20px;margin-bottom: 35px;"></div>
  24. <div class="product_to"><img src="images/ia_air_purifier_product.jpg" alt="" style="width: 66%;display: block;margin-left: 18%; margin-bottom: 85px;"></div>
  25. </div> -->
  26. <script src="js/mui.min.js"></script>
  27. <script src="js/jquery-2.1.1.min.js"></script>
  28. <script src="js/jquery.autocompleter.js"></script>
  29. <script src="js/main.js"></script>
  30. </body>
  31. <script>
  32. mui.ready(function() {
  33. $.ajax(base_path + '/wechat/getUserInfo?dates=' + new Date().getTime(), {
  34. dataType: 'json',
  35. type: 'post',
  36. timeout: 15000,
  37. xhrFields: {
  38. withCredentials: true
  39. },
  40. crossDomain: true,
  41. success: function(dt) {
  42. if(dt.isRedirect) {
  43. location.href = dt.redirectURL;
  44. } else {
  45. receiveCoupon();
  46. console.log("用户信息刷新成功或今日已经刷新");
  47. }
  48. },
  49. error: function(xhr, type, errorThrown) {
  50. console.log(xhr)
  51. }
  52. });
  53. });
  54. function receiveCoupon(){
  55. $.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
  56. data: {
  57. "couponId": 50001
  58. },
  59. dataType: 'json',
  60. xhrFields: {
  61. withCredentials: true
  62. },
  63. crossDomain: true,
  64. type: 'post',
  65. timeout: 15000,
  66. success: function(dt) {
  67. if(dt.isRedirect) {
  68. location.href = dt.redirectURL;
  69. } else {
  70. // if(dt.status) {
  71. // mui.toast(dt.message);
  72. // } else {
  73. // mui.toast(dt.message);
  74. // }
  75. mui.openWindow({
  76. url: 'pro-details.html?productId=53'
  77. });
  78. // mui.alert(dt.message, function() {
  79. // });
  80. }
  81. },
  82. error: function(xhr, type, errorThrown) {
  83. console.log(xhr);
  84. mui.alert("领取失败!网络出小差了", function() {
  85. });
  86. }
  87. });
  88. }
  89. $(document).on('tap', '.product_to', function() {
  90. mui.openWindow({
  91. url: 'pro-details.html?productId=53'
  92. });
  93. });
  94. </script>
  95. </html>