clientmobile.php
2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
$str = '';
foreach($this->view->fragments as $fragment)
{
$str .= sprintf('<a href="%s"><img src="%s" alt="" class="look_big_image" source="%s" style="width:105px;height:105px;"/></a>',
$fragment['fUrl'].'/yohoshowState/'.$this->view->yohoshowState,
preg_replace('/_\.(\w+)/i','_-0210x0210-1.jpg', $fragment['image']), $fragment['image']);
}
?>
<?php if(!$this->view->isAjax):?>
<?php $this->_extends('layout/default_layout_mobile');?>
<?php $this->_block('main');?>
<div class="mobile-container">
<div >
<img src="<?php echo $this->view->banner;?>" />
</div>
<div class="show-list clearfix">
<?php echo $str;?>
</div>
<div class="detail-pagination" offset="<?php echo $this->view->offset;?>" limit="<?php echo $this->view->limit;?>">
</div>
<div class="shareBox">
<div class="appBox">
<div class="appLogo">
<img src="http://res.yohoshow.com/res/www/images/show/Icon-120.png" width="60" alt=""></div>
<div class="sppIntro">
<h2>SHOW</h2>
<p>Happy Labelling</p>
<p>钉住你的衣食住行</p>
</div>
</div>
<a href="<?php echo $this->view->url;?>" class="appDownload download_a">立即体验
<span class="icon-download"></span>
</a>
</div>
</div>
<?php $this->_js('index.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript">
seajs.use("jquery", function($)
{
$(window).scroll(function()
{
var scrollTop = $(document).scrollTop();
if(scrollTop >= $(document).height() - $(window).height() - 100)
{
var offset = parseInt($(".detail-pagination").attr("offset"));
var limit = parseInt($(".detail-pagination").attr("limit"));
offset = offset+limit;
$.ajax
({
type:"post",
url:"<?php echo SITE_MAIN;?>/show/client/isAjax/1/offset/"+offset+"/limit/"+limit+"/rand/" + Math.random(),
async :false,
success:function(data)
{
if($.trim(data) != "" )
{
$(".detail-pagination").attr("offset", offset);
$(".show-list").append(data);
}
}
});
}
});
});
</script>
<?php $this->_endblock();?>
<?php else: ?>
<?php echo $str;?>
<?php endif;?>