use service mdjson action
This commit is contained in:
parent
67474ecf91
commit
3cde4e2092
|
@ -5,7 +5,7 @@ $this->headTitle()->setSeparator(' - ');
|
|||
$this->headLink()->appendStylesheet('/css/water.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->breadcrumb($this->config->title->heihe);
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
|
@ -27,28 +27,26 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
<div id="heihe_ad">
|
||||
<h2>已整理数据展示</h2>
|
||||
<ul id="heihe_list">
|
||||
<li><img src="/images/water/arid.jpg" /></li>
|
||||
<li><img src="/images/water/arid.jpg" /></li>
|
||||
<li><img src="/images/water/arid.jpg" /></li>
|
||||
</ul>
|
||||
<a href="javascript:;" onclick="changetlist()">换一组</a>
|
||||
<?php foreach($this->meatdata as $md) : ?>
|
||||
<li>
|
||||
<a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
|
||||
<img src="/service/thumb/id/<?php echo $md['id']; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
<img class="next" src="/images/next.png" onclick="changetlist()" />
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function changetlist(){
|
||||
$.getJSON("/heihe/changelist", function(data){
|
||||
$.getJSON("/service/mdjson/source/heihe", function(data){
|
||||
$('#heihe_list').html('');
|
||||
if(data.length>0)
|
||||
{
|
||||
$.each(data, function(key, val) {
|
||||
var a = '<a href="/heihe/view/uuid/'+val['uuid']+'"><span>'+val['title']+'</span>';
|
||||
var img = '<img src="'+val['src']+'" alt="Data Thumbnail" />';
|
||||
var a = '<a href="/data/'+val['uuid']+'"><span>'+val['title']+'</span>';
|
||||
var img = '<img src="/service/thumb/id/'+val['id']+'" alt="Data Thumbnail" title="'+val['description']+'" />';
|
||||
$('<li/>', {
|
||||
//"class":'list_img',
|
||||
"html": a+img+'</a>'
|
||||
|
|
Loading…
Reference in New Issue