123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <extend name="Public:pinduoduobase" />
- <block name="content">
- <link rel="stylesheet" href="__PUBLIC__/pinduoduo/assets/css/super_spike.css">
- <section id="index-content">
- <div id="activity_list" class="main-view super-spike">
- <section class="al-main">
- <div class="al-activity-title">
- <img src="__PUBLIC__/pinduoduo/assets/css/superspike.png">
- <div class="al-activity-title-name">限时特卖</div>
- </div>
- <ul class="al-goods-list" id="tuan_list">
-
- <volist name="list" id="d">
- <li class="al-goods" onclick="location.href='{:U('/goods/'.$d['goods_id'])}'">
- <div class="al-item-img">
- <img class="al-item-logo" src="<?php $store = M('seller')->where( array('s_id' => $d['store_id']) )->find();echo resize($store['s_logo'], 100, 100); ?>">
- <img class="al-item-pic" src="__UPLOAD__/{$d.image}">
- <!--ms-if-->
- </div>
- <div class="al-item-name">
- <span>{$d.name}</span>
- </div>
- <div class="al-item-info">
- <div class="al-item-mk">
- <div class="al-item-discount">
- <div class="al-item-circle"></div>
- <?php echo round( ($d['pinprice']/$d['price']) * 10,1); ?>折
- </div>
- <div class="al-item-price">
- <span class="price-icon">¥</span>
- <span class="price">{$d.pinprice}</span>
- <del class="market-price">¥{$d.price}</del>
- <p class="al-item-sales">已团{$d.seller_count}件</p>
- </div>
- </div>
- <div class="al-item-sale">
- 马上抢
- <img src="__PUBLIC__/pinduoduo/assets/img/rightjian.png">
- </div>
- <!--ms-if-->
- </div>
- </li>
- </volist>
-
- </ul>
- </section>
-
- </div>
- </section>
- <div class="center" id="center_pullup" style="display:none;">
- <span><img class="img_rotate" src="__PUBLIC__/pinduoduo/assets/img/pull_loading_8eba142.png"/>
- </span><span class="orders_text"></span>
- </div>
- <style>
- .center {
- width: 170px;
- margin: 0 auto;
- text-align: center;
- }
- .img_rotate {
- width: 30px;
- height: 30px;
- margin-top: 7px;
- margin-right: 5px;
- -webkit-animation: loading 1s linear 0s infinite;
- }
- @-webkit-keyframes loading {
- 0% {
- -webkit-transform: rotate(0);
- }
- 100% {
- -webkit-transform: rotate(360deg);
- }
- }
- .orders_text {
- line-height: 45px;
- font-weight: 700;
- font-size: 15px;
- }
- </style>
- <script>
- var offset = 0;
- var _pa = 2;
- var is_can_next = 1;
- var cur_url = "{:U('SuperSpike/index')}";
- var req_step = 1;
- function loaddata()
- {
- var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
- if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
- {
- if(is_can_next == 1)//加载数据
- {
- is_can_next = 0;
- nextpage();
- }
- }
- }
- function nextpage()
- {
- $('#center_pullup').show();
- $.ajax(
- {
- url: cur_url,
- type:'post',
- data:{page:_pa},
- dataType: 'json',
- success: function(result){
- if(result.code == 1)
- {
- $('#tuan_list').append(result.html);
- $('#center_pullup').hide();
- _pa++;
- is_can_next = 1;
- } else if(result.code == 0) {
- $('#center_pullup').remove();
- }
-
- }
- }
- );
- }
- $(function(){
- $(window).scroll( function() {
- loaddata();
- });
- })
- </script>
- </block>
|