fcode.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi">
  6. <meta name="format-detection" content="telephone=no">
  7. <title>首页</title>
  8. <style type="text/css">
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. html, body {
  14. width: 100%;
  15. height: 100%;
  16. font-family: PingFangSC-Light;
  17. }
  18. .container {
  19. width: 100%;
  20. height: 100%;
  21. min-height: 100%;
  22. display:-webkit-box;
  23. -webkit-box-align: center;
  24. -webkit-box-pack: center;
  25. background: rgba(0,0,0,0.6);
  26. }
  27. .push_content {
  28. position: relative;
  29. width: 573px;
  30. height: 637px;
  31. background: #fff;
  32. border-radius: 11px;
  33. box-sizing: border-box;
  34. text-align: center;
  35. padding: 50px 0 64px 0;
  36. -webkit-transform: scale(0);
  37. -webkit-transition: transform .4s ease;
  38. margin-bottom: 100px;
  39. }
  40. .push_label {
  41. font-size: 24px;
  42. color: #9B9B9B;
  43. }
  44. .push_title {
  45. font-size: 44px;
  46. color: #000000;
  47. font-weight: normal;
  48. margin-bottom: 19px;
  49. }
  50. .goods_img {
  51. position: relative;
  52. box-sizing: border-box;
  53. padding-top: 10px;
  54. padding-bottom: 30px;
  55. }
  56. .goods_img img {
  57. max-height: 278px;
  58. max-width: 320px;
  59. }
  60. .goods_img .label {
  61. width: 103px;
  62. height: 103px;
  63. position: absolute;
  64. right: 42px;
  65. bottom: 32px;
  66. background: #FD6C6C;
  67. border-radius: 50px;
  68. color: #fff;
  69. text-align: center;
  70. overflow: hidden;
  71. }
  72. .goods_img .label .sale_price {
  73. font-size: 24px;
  74. position: relative;
  75. top: 25px;
  76. }
  77. .goods_img .label .original_price {
  78. font-size: 14px;
  79. position: relative;
  80. top: 25px;
  81. }
  82. .goods_img .label .original_price span {
  83. position: relative;
  84. }
  85. .goods_img .label .original_price span:after {
  86. content: '';
  87. position: absolute;
  88. width: 100%;
  89. height: 1px;
  90. background: #fff;
  91. top: calc(50% - 1px);
  92. left: 0;
  93. }
  94. .btn span {
  95. display: block;
  96. width: 483px;
  97. height: 84px;
  98. line-height: 84px;
  99. background: #DCC27E;
  100. text-align: center;
  101. color: #fff;
  102. border-radius: 5px;
  103. margin: 0 auto;
  104. font-size: 33px;
  105. cursor: pointer;
  106. }
  107. .close_btn {
  108. position: absolute;
  109. top: 980px;
  110. right: 50%;
  111. margin-right: -36px;
  112. width: 73px;
  113. height: 73px;
  114. border-radius: 50px;
  115. }
  116. .close_btn img {
  117. width: 100%;
  118. height: 100%;
  119. }
  120. a {
  121. -webkit-tap-highlight-color: rgba(255,255,255,0);
  122. text-decoration: none;
  123. }
  124. </style>
  125. <script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
  126. <script type="text/javascript">
  127. if ('addEventListener' in document) {
  128. document.addEventListener('DOMContentLoaded', function() {
  129. FastClick.attach(document.body);
  130. }, false);
  131. }
  132. </script>
  133. </head>
  134. <body>
  135. <div class="container">
  136. <?php echo $output['tpl']->show(); ?>
  137. <span class="close_btn"><img src="<?php echo RESOURCE_SITE_URL; ?>/mobile/push/fcode/close.png" class="img"></span>
  138. </div>
  139. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/new_bridge.js?<?php echo bonus_version(); ?>"></script>
  140. <script type="text/javascript">
  141. window.onload = function ()
  142. {
  143. var bridge = new Bridge();
  144. var ImgLoad = function (images,callback)
  145. {
  146. this.images = images;
  147. this.img_len = this.images.length;
  148. this.load_img = 1;
  149. this.imgLoad = function (img, callback) {
  150. var timer = setInterval(function () {
  151. if (img.complete) {
  152. callback(img)
  153. clearInterval(timer)
  154. }
  155. }, 50)
  156. };
  157. this.load = function () {
  158. var that = this;
  159. for (var i = 0; i < this.img_len; i++) {
  160. (function (i) {
  161. var j = i;
  162. that.imgLoad(that.images[j], function () {
  163. that.load_img++;
  164. if (that.img_len == that.load_img) {
  165. var jsonobject = {
  166. action: "resource_ready"
  167. };
  168. bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
  169. callback();
  170. }
  171. })
  172. })(i)
  173. }
  174. }
  175. };
  176. var img_load = new ImgLoad(document.getElementsByClassName('img'),animate);
  177. img_load.load();
  178. function animate()
  179. {
  180. setTimeout(function(){
  181. document.getElementsByClassName('push_content')[0].setAttribute('style','-webkit-transform:scale(1)');
  182. },300);
  183. }
  184. document.getElementsByClassName('close_btn')[0].addEventListener('click', function ()
  185. {
  186. var jsonobject = {
  187. action: "back"
  188. };
  189. bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
  190. });
  191. document.getElementsByClassName('close_btn')[0].addEventListener('touchstart', function ()
  192. {
  193. this.setAttribute('style','background:rgba(255,255,255,0.6);');
  194. });
  195. document.getElementsByClassName('close_btn')[0].addEventListener('touchend', function ()
  196. {
  197. this.setAttribute('style','background:rgba(255,255,255,0);');
  198. });
  199. document.getElementsByClassName('look_btn')[0].addEventListener('touchstart', function ()
  200. {
  201. this.setAttribute('style','background:rgba(220,194,126,0.6);');
  202. });
  203. document.getElementsByClassName('look_btn')[0].addEventListener('touchend', function ()
  204. {
  205. this.setAttribute('style','background:rgba(220,194,126,1);');
  206. });
  207. document.getElementsByClassName('schema_link')[0].addEventListener('click', function ()
  208. {
  209. var jsonobject = {
  210. action: "back"
  211. };
  212. bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
  213. });
  214. }
  215. </script>
  216. </body>
  217. </html>