123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi">
- <meta name="format-detection" content="telephone=no">
- <title>首页</title>
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- }
- html, body {
- width: 100%;
- height: 100%;
- font-family: PingFangSC-Light;
- }
- .container {
- width: 100%;
- height: 100%;
- min-height: 100%;
- display:-webkit-box;
- -webkit-box-align: center;
- -webkit-box-pack: center;
- background: rgba(0,0,0,0.6);
- }
- .push_content {
- position: relative;
- width: 573px;
- height: 637px;
- background: #fff;
- border-radius: 11px;
- box-sizing: border-box;
- text-align: center;
- padding: 50px 0 64px 0;
- -webkit-transform: scale(0);
- -webkit-transition: transform .4s ease;
- margin-bottom: 100px;
- }
- .push_label {
- font-size: 24px;
- color: #9B9B9B;
- }
- .push_title {
- font-size: 44px;
- color: #000000;
- font-weight: normal;
- margin-bottom: 19px;
- }
- .goods_img {
- position: relative;
- box-sizing: border-box;
- padding-top: 10px;
- padding-bottom: 30px;
- }
- .goods_img img {
- max-height: 278px;
- max-width: 320px;
- }
- .goods_img .label {
- width: 103px;
- height: 103px;
- position: absolute;
- right: 42px;
- bottom: 32px;
- background: #FD6C6C;
- border-radius: 50px;
- color: #fff;
- text-align: center;
- overflow: hidden;
- }
- .goods_img .label .sale_price {
- font-size: 24px;
- position: relative;
- top: 25px;
- }
- .goods_img .label .original_price {
- font-size: 14px;
- position: relative;
- top: 25px;
- }
- .goods_img .label .original_price span {
- position: relative;
- }
- .goods_img .label .original_price span:after {
- content: '';
- position: absolute;
- width: 100%;
- height: 1px;
- background: #fff;
- top: calc(50% - 1px);
- left: 0;
- }
- .btn span {
- display: block;
- width: 483px;
- height: 84px;
- line-height: 84px;
- background: #DCC27E;
- text-align: center;
- color: #fff;
- border-radius: 5px;
- margin: 0 auto;
- font-size: 33px;
- cursor: pointer;
- }
- .close_btn {
- position: absolute;
- top: 980px;
- right: 50%;
- margin-right: -36px;
- width: 73px;
- height: 73px;
- border-radius: 50px;
- }
- .close_btn img {
- width: 100%;
- height: 100%;
- }
- a {
- -webkit-tap-highlight-color: rgba(255,255,255,0);
- text-decoration: none;
- }
- </style>
- <script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
- <script type="text/javascript">
- if ('addEventListener' in document) {
- document.addEventListener('DOMContentLoaded', function() {
- FastClick.attach(document.body);
- }, false);
- }
- </script>
- </head>
- <body>
- <div class="container">
- <?php echo $output['tpl']->show(); ?>
- <span class="close_btn"><img src="<?php echo RESOURCE_SITE_URL; ?>/mobile/push/fcode/close.png" class="img"></span>
- </div>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/new_bridge.js?<?php echo bonus_version(); ?>"></script>
- <script type="text/javascript">
- window.onload = function ()
- {
- var bridge = new Bridge();
- var ImgLoad = function (images,callback)
- {
- this.images = images;
- this.img_len = this.images.length;
- this.load_img = 1;
- this.imgLoad = function (img, callback) {
- var timer = setInterval(function () {
- if (img.complete) {
- callback(img)
- clearInterval(timer)
- }
- }, 50)
- };
- this.load = function () {
- var that = this;
- for (var i = 0; i < this.img_len; i++) {
- (function (i) {
- var j = i;
- that.imgLoad(that.images[j], function () {
- that.load_img++;
- if (that.img_len == that.load_img) {
- var jsonobject = {
- action: "resource_ready"
- };
- bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- callback();
- }
- })
- })(i)
- }
- }
- };
- var img_load = new ImgLoad(document.getElementsByClassName('img'),animate);
- img_load.load();
- function animate()
- {
- setTimeout(function(){
- document.getElementsByClassName('push_content')[0].setAttribute('style','-webkit-transform:scale(1)');
- },300);
- }
- document.getElementsByClassName('close_btn')[0].addEventListener('click', function ()
- {
- var jsonobject = {
- action: "back"
- };
- bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- document.getElementsByClassName('close_btn')[0].addEventListener('touchstart', function ()
- {
- this.setAttribute('style','background:rgba(255,255,255,0.6);');
- });
- document.getElementsByClassName('close_btn')[0].addEventListener('touchend', function ()
- {
- this.setAttribute('style','background:rgba(255,255,255,0);');
- });
- document.getElementsByClassName('look_btn')[0].addEventListener('touchstart', function ()
- {
- this.setAttribute('style','background:rgba(220,194,126,0.6);');
- });
- document.getElementsByClassName('look_btn')[0].addEventListener('touchend', function ()
- {
- this.setAttribute('style','background:rgba(220,194,126,1);');
- });
- document.getElementsByClassName('schema_link')[0].addEventListener('click', function ()
- {
- var jsonobject = {
- action: "back"
- };
- bridge.call_native_handler('on_native_click', JSON.stringify(jsonobject));
- });
- }
- </script>
- </body>
- </html>
|