Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
2586703@qq.com
10 years ago
Commit
8efc1085373b93568f65b29e61ef0c175c900f27
2 parents
899b59f3
73c18f3b
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohood
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
150 additions
and
131 deletions
res/js/mobile.js
res/js/yohood.js
website/controller/News.class.php
website/view/layout/default_layout_mobile.php
website/view/script/activity/videomobile.php
website/view/script/brand/detailmobile.php
website/view/script/default/indexmobile.php
website/view/script/news/detailmobile.php
website/view/script/video/indexmobile.php
website/view/widget/news/list.php
website/view/widget/news/listmobile.php
res/js/mobile.js
View file @
8efc108
...
...
@@ -8,8 +8,9 @@ define('mobile', function(require, exports) {
var
$
=
require
(
'zepto'
),
swipe
=
require
(
"plugins/swipe"
),
share
=
require
(
"plugins/share"
),
mlellipsis
=
require
(
"plugins/mlellipsis"
);
exports
.
index
=
function
()
{
common
=
require
(
"common"
),
mlellipsis
=
require
(
"plugins/mlellipsis"
);
exports
.
index
=
function
()
{
//大banner滑动
swipe
.
init
({
slideBox
:
'.slide-box'
,
...
...
@@ -45,7 +46,7 @@ define('mobile', function(require, exports) {
var
brands
=
data
.
data
;
if
(
data
.
code
==
200
&&
brands
!=
""
)
{
$
.
each
(
brands
,
function
(
k
,
v
)
{
html
+=
'<li><a href="
"javascript:void(0);" target="_blank" title="'
+
v
.
name
+
'"><div class="img-box" brand_id="'
+
v
.
id
+
'
">'
+
html
+=
'<li><a href="
/brand/detail/id/'
+
v
.
id
+
'" title="'
+
v
.
name
+
'"><div class="img-box
">'
+
'<img src="'
+
common
.
getImages
(
v
.
logo
,
'0145x0097'
,
'blogimg'
,
'primary'
)
+
'" alt="" alt="'
+
v
.
name
+
'"></div>'
+
'<p>'
+
v
.
name
+
'</p></a></li>'
;
});
...
...
@@ -126,7 +127,7 @@ define('mobile', function(require, exports) {
qqText
:
'【YOHOOD 2015】'
+
detailTitle
.
text
()
+
' '
+
detailSubtitle
.
text
()
+
'#YOHOOD 2015'
})
};
exports
.
show
=
function
()
{
$
(
".layout-item"
).
bind
(
"tap"
,
function
(
event
)
{
var
imageWidth
=
320
,
...
...
res/js/yohood.js
View file @
8efc108
...
...
@@ -236,7 +236,7 @@ define('yohood', function(require, exports) {
var
brands
=
data
.
data
;
if
(
data
.
code
==
200
&&
brands
!=
""
)
{
$
.
each
(
brands
,
function
(
k
,
v
)
{
html
+=
'<li><a href="
"
javascript:void(0);" target="_blank" title="'
+
v
.
name
+
'"><div class="img-box" brand_id="'
+
v
.
id
+
'">'
+
html
+=
'<li><a href="javascript:void(0);" target="_blank" title="'
+
v
.
name
+
'"><div class="img-box" brand_id="'
+
v
.
id
+
'">'
+
'<img src="'
+
common
.
getImages
(
v
.
logo
,
'0145x0097'
,
'blogimg'
,
'primary'
)
+
'" alt="" alt="'
+
v
.
name
+
'"></div>'
+
'<p>'
+
v
.
name
+
'</p></a></li>'
;
});
...
...
website/controller/News.class.php
View file @
8efc108
...
...
@@ -89,6 +89,7 @@ class Controller_News extends Controller_Abstract
public
function
detailAction
()
{
$id
=
intval
(
$this
->
_request
->
id
);
$news
=
array
();
if
(
empty
(
$id
))
{
return
$this
->
_redirect
(
'news/index'
);
...
...
@@ -98,6 +99,15 @@ class Controller_News extends Controller_Abstract
{
return
$this
->
_redirect
(
'news/index'
);
}
if
(
$this
->
_platform
==
'android'
||
$this
->
_platform
==
'iphone'
)
{
$sameID
=
Facade_Brand
::
getSameNewsByNewsID
(
$id
);
if
(
!
empty
(
$sameID
))
{
$news
[]
=
Facade_News
::
getOneById
(
$sameID
);
}
$news
=
array_slice
(
array_merge
(
$news
,
Facade_News
::
getList
(
array
(),
0
,
3
)),
0
,
3
);
}
$info
[
'title'
]
=
strip_tags
(
$info
[
'title'
]);
$info
[
'pics'
]
=
array_filter
(
explode
(
'|'
,
$info
[
'pics'
]));
$info
[
'thumb'
]
=
Lib_Images
::
getImageUrl
(
$info
[
'thumb'
],
'source'
,
'fragmentimg'
);
...
...
@@ -105,6 +115,7 @@ class Controller_News extends Controller_Abstract
Facade_News
::
updateHits
(
$id
);
$this
->
_view
[
'info'
]
=
$info
;
$this
->
_view
[
'banners'
]
=
Facade_Index
::
getIndex
(
4
);
$this
->
_view
[
'news'
]
=
$news
;
}
/**
...
...
website/view/layout/default_layout_mobile.php
View file @
8efc108
...
...
@@ -18,11 +18,23 @@
<div
class=
"tip-info"
>
<h2>
YOHO!有货
</h2>
<p>
随手随心,潮流购物利器大公开
</p>
<a
class=
"yohoboy-download-app"
>
OPEN
</a>
<a
class=
"yohoboy-download-app"
href=
"http://www.yohoshow.com/about/index/yohobuyqr"
>
OPEN
</a>
</div>
<span
class=
"tip-close"
></span>
</div>
<h1
class=
"logo iconfont"
><a
class=
"back-btn iconfont"
href=
"
<?php
echo
$this
->
view
->
callback
;
?>
"
>

</a>

</h1>
<h1
class=
"logo iconfont"
>
<?php
$_ctx
=
Framework_YHttpRequest
::
instance
();
$controller_name
=
$_ctx
->
controller_name
;
$action_name
=
$_ctx
->
action_name
;
$url
=
$controller_name
.
'/'
.
$action_name
;
$noAllow
=
array
(
'default/index'
);
?>
<?php
if
(
!
in_array
(
$url
,
$noAllow
))
:?>
<
a
class
="
back
-
btn
iconfont
" href="
<?
php
echo
$this
->
view
->
callback
;
?>
">

</a>
<?php
endif
;
?>

</h1>
</div>
<div
class=
"bd"
>
<?php
$this
->
_block
(
'main'
);
$this
->
_endblock
();
?>
...
...
website/view/script/activity/videomobile.php
View file @
8efc108
...
...
@@ -7,7 +7,7 @@
<div
class=
"activity-content content-main"
style=
"display: block;"
>
<div
class=
"video-wrap"
>
<div
class=
"main-layout clearfix"
>
<?php
$this
->
_widget
(
'news_list'
,
array
(
'list'
=>
$this
->
view
->
video
,
'video'
=>
1
));
?>
<?php
$this
->
_widget
(
'news_list
mobile
'
,
array
(
'list'
=>
$this
->
view
->
video
,
'video'
=>
1
));
?>
</div>
</div>
<div
id=
"pageContent"
style=
"text-align: center;"
class=
"pagination"
>
...
...
website/view/script/brand/detailmobile.php
View file @
8efc108
<?php
$this
->
_extends
(
'layout/default_layout_mobile'
);
?>
<?php
$this
->
_block
(
'main'
);
?>
<div
class=
"mobile-position"
>
<a
class=
"mobile-back"
href=
"
<?php
echo
$this
->
view
->
callback
;
?>
"
></a>
<h2>
品牌
</h2>
</div>
<div
class=
"mobile-container"
>
<div
class=
"brand-info-logo clearfix"
>
<a
href=
"javascript:void(0)"
class=
"brand-logo"
><img
src=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'logo'
],
'0226x0148'
,
'fragmentimg'
);
?>
"
width=
"113"
alt=
""
/></a>
<h2>
<?php
echo
$this
->
view
->
info
[
'name'
];
?>
</h2>
<div
class=
"brand-detail-share"
></div>
</div>
<div
class=
"brand-detail-image"
>
<?php
$pics
=
json_decode
(
$this
->
view
->
info
[
'pics'
],
true
);
$video
=
''
;
foreach
(
$pics
as
$val
)
:
?>
<?php
if
(
$val
[
'type'
]
==
'pic'
)
:?>
<
img
src
=
"<?php echo Lib_Images::getImageUrl(
$val['url']
, '0588x9999','fragmentimg','resize');?>"
alt
=
"<?php echo
$this->view
->info['description'];?>"
/>
<?
php
else
:?>
<?
php
endif
;
?>
<?php
endforeach
;
?>
</div>
<div
class=
"brand-content-info"
>
<p>
<?php
echo
$this
->
view
->
info
[
'description'
];
?>
</p>
</div>
<?php
if
(
count
(
$this
->
view
->
goods
))
:
?>
<div
class=
"brand-goods-list"
>
<ul
class=
"clearfix"
>
<?php
foreach
(
$this
->
view
->
goods
as
$val
)
:?>
<
li
>
<
a
target
=
"_blank"
href
=
"<?php echo
$val['url']
?>"
title
=
"<?php echo
$val['name']
?>"
>
<
img
src
=
"<?php echo
$val['thumb']
?>"
width
=
"150"
alt
=
""
>
<
p
><?
php
echo
$val
[
'name'
]
?>
</p>
<p><del>
¥
<?php
echo
$val
[
'market_price'
]
?>
</del><span>
¥
<?php
echo
$val
[
'price'
];
?>
</span></p>
</a>
</li>
<?php
endforeach
;
?>
</ul>
<div
class=
"detail-pagination"
>
<?php
$this
->
_component
(
'Common_Pagination'
,
array
(
'pagination'
=>
$this
->
view
->
pagination
,
'next_label'
=>
'下一页'
,
'prev_label'
=>
'上一页'
,
'is_mobile'
=>
true
,
'prev_class'
=>
'prev'
,
'next_class'
=>
'next'
,
'page_class'
=>
'pagination-inner'
,
'id'
=>
'img_page'
));
?>
</div>
</div>
<?php
endif
;
?>
</div>
<div
class=
"detail-title brand-title"
>
<h2
class=
"title"
>
About
<?php
echo
$this
->
view
->
info
[
'name'
];
?>
</h2>
</div>
<div
class=
"detail-article"
>
<img
src=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'logo'
],
'0147x0097'
,
'fragmentimg'
);
?>
"
alt=
""
>
<p>
<?php
echo
$this
->
view
->
info
[
'description'
];
?>
</p>
<a
class=
"enter-store"
href=
"
<?php
echo
$this
->
view
->
info
[
'link'
];
?>
"
target=
"_blank"
>
进入品牌店铺
</a>
</div>
<div
class=
"related-post"
>
<h2>
相关推荐
</h2>
<ul>
<?php
foreach
(
$this
->
view
->
news
as
$val
)
:?>
<
li
>
<
a
class
="
clearfix
" href="
<?
php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$val
[
'id'
]))
?>
">
<div
class=
"image-box"
>
<img
src=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$val
[
'thumb'
],
'0230x0230'
,
'fragmentimg'
);
?>
"
alt=
""
>
</div>
<div
class=
"content"
>
<?php
echo
$val
[
'title'
]
?>
</div>
</a>
</li>
<?php
endforeach
;
?>
</ul>
</div>
<?php
$this
->
_endblock
();
?>
\ No newline at end of file
...
...
website/view/script/default/indexmobile.php
View file @
8efc108
...
...
@@ -28,21 +28,21 @@
</a>
</li>
<li>
<a
href=
"/news/index?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/news/index?callback=
/default/index
"
>
<div
class=
"channel-pic counsel iconfont"
>

</div>
<h2
class=
"channel-name"
>
COUNSEL
</h2>
<p
class=
"channel-name-cn"
>
最新资讯
</p>
</a>
</li>
<li>
<a
href=
"/brand/index?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/brand/index?callback=
/default/index
"
>
<div
class=
"channel-pic brand iconfont"
>

</div>
<h2
class=
"channel-name"
>
BRAND
</h2>
<p
class=
"channel-name-cn"
>
参展品牌
</p>
</a>
</li>
<li>
<a
href=
"/video/index?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/video/index?callback=
/default/index
"
>
<div
class=
"channel-pic video iconfont"
>

</div>
<h2
class=
"channel-name"
>
VIDEO
</h2>
<p
class=
"channel-name-cn"
>
热点视频
</p>
...
...
@@ -56,14 +56,14 @@
</a>
</li>
<li>
<a
href=
"/activity/plan?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/activity/plan?callback=
/default/index
"
>
<div
class=
"channel-pic live iconfont"
>

</div>
<h2
class=
"channel-name"
>
LIVE
</h2>
<p
class=
"channel-name-cn"
>
现场活动
</p>
</a>
</li>
<li>
<a
href=
"/show/index?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/show/index?callback=
/default/index
"
>
<div
class=
"channel-pic show"
></div>
<h2
class=
"channel-name"
>
SHOW
</h2>
<p
class=
"channel-name-cn"
>
潮流分享
</p>
...
...
@@ -77,7 +77,7 @@
</a>
</li>
<li>
<a
href=
"/default/contactus?callback=
<?php
echo
$this
->
view
->
callback
;
?>
"
>
<a
href=
"/default/contactus?callback=
/default/index
"
>
<div
class=
"channel-pic contact iconfont"
>

</div>
<h2
class=
"channel-name"
>
CONTACT
</h2>
<p
class=
"channel-name-cn"
>
联系我们
</p>
...
...
website/view/script/news/detailmobile.php
View file @
8efc108
<?php
$this
->
_extends
(
'layout/default_layout_mobile'
);
?>
<?php
$this
->
_block
(
'main'
);
?>
<div
class=
"mobile-position"
>
<a
class=
"mobile-back"
href=
"
<?php
echo
$this
->
view
->
callback
;
?>
"
></a>
<div
class=
"mobile-news-navigator"
>
<span>
<?php
echo
(
$this
->
view
->
current_tag
==
''
)
?
'全部资讯'
:
$this
->
view
->
current_tag
;
?>
</span>
<ins></ins>
<select
name=
"tag"
id=
"tag"
>
<?php
$this
->
view
->
tags
=
array_merge
(
array
(
''
),
$this
->
view
->
tags
);
foreach
(
$this
->
view
->
tags
as
$tag
)
:
if
(
empty
(
$tag
))
{
$newTag
=
'全部资讯'
;
}
else
{
$newTag
=
$tag
;
}
?>
<option
value=
"
<?php
echo
url
(
'news/index'
,
array
(
'tag'
=>
$tag
))
?>
"
<?php
echo
$tag
==
$this
->
view
->
current_tag
?
'selected'
:
''
;
?>
>
<?php
echo
sprintf
(
"%s"
,
$newTag
);
?>
</option>
<?php
endforeach
;
?>
</select>
</div>
</div>
<div
class=
"mobile-container"
>
<div
class=
"detail-body"
>
<h1>
<?php
echo
$this
->
view
->
info
[
'title'
]
?>
</h1>
<p
class=
"time"
>
<?php
echo
date
(
'Y.m.d H:i'
,
$this
->
view
->
info
[
'create_time'
])
?>
</p>
<div
class=
"detail-content"
>
<?php
preg_match_all
(
"@<embed([^>]*)\s*src=
\"
http:\/\/res\.yoho\.cn\/res\/yohood\/swf\/YohoodPlayer\.swf\?url=(.+\.mp4)
\"
@"
,
$this
->
view
->
info
[
'content'
],
$videoMatches
);
if
(
!
empty
(
$videoMatches
[
2
]))
{
$video
=
current
(
$videoMatches
[
2
]);
$videoHtml
=
'<video controls="controls" preload="auto" poster="'
.
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'thumb'
],
'0300x0300'
,
'fragmentimg'
,
'autoCrop'
)
.
'" width="300" height="300"><source src="'
.
$video
.
'" type="video/mp4" /></video>'
;
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(object.*?)>(.*?)<(\/object.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(embed.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
}
echo
$this
->
view
->
info
[
'content'
]
?>
<div
class=
"detail-title"
>
<h2
class=
"title"
>
<?php
echo
$this
->
view
->
info
[
'title'
]
?>
</h2>
<h3
class=
"subtitle"
>
<?php
echo
date
(
'm月d日 H:i'
,
$this
->
view
->
info
[
'create_time'
])
?>
</h3>
</div>
<div
class=
"detail-article"
>
<?php
preg_match_all
(
"@<embed([^>]*)\s*src=
\"
http:\/\/res\.yoho\.cn\/res\/yohood\/swf\/YohoodPlayer\.swf\?url=(.+\.mp4)
\"
@"
,
$this
->
view
->
info
[
'content'
],
$videoMatches
);
if
(
!
empty
(
$videoMatches
[
2
]))
{
$video
=
current
(
$videoMatches
[
2
]);
$videoHtml
=
'<video controls="controls" preload="auto" poster="'
.
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'thumb'
],
'0300x0300'
,
'fragmentimg'
,
'autoCrop'
)
.
'" width="300" height="300"><source src="'
.
$video
.
'" type="video/mp4" /></video>'
;
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(object.*?)>(.*?)<(\/object.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(embed.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
}
echo
$this
->
view
->
info
[
'content'
];
?>
</div>
<div
class=
"related-post"
>
<h2>
相关推荐
</h2>
<ul>
<?php
foreach
(
$this
->
view
->
news
as
$news
)
:?>
<
li
>
<
a
class
="
clearfix
" href="
/
news
/
detail
/
id
/<?
php
echo
$news
[
'id'
];
?>
">
<div
class=
"image-box"
>
<img
src=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$news
[
'thumb'
],
'source'
,
'fragmentimg'
);
?>
"
alt=
""
>
</div>
</div>
<div
class=
"detail-pagination"
>
<?php
if
(
$this
->
view
->
prev
)
:?>
<
a
href
=
"<?php echo url('news/detail' ,array('id' =>
$this->view
->prev['id']))?>"
class
="
prev
">上一篇</a>
<?php endif;?>
<?php if (
$this->view
->next):?>
<a href="
<?
php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$this
->
view
->
next
[
'id'
]))
?>
" class="next">下一篇
</a>
<?php
endif
;
?>
</div>
</div>
<div
class=
"content"
>
<?php
echo
$news
[
'title'
];
?>
</div>
</a>
</li>
<?php
endforeach
;
?>
</ul>
</div>
<div
id=
"share"
class=
"share"
cover-url=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'thumb'
],
'source'
,
'fragmentimg'
);
?>
"
data-link=
"
<?php
echo
SITE_MAIN
.
'/news/detail/id/'
.
$this
->
view
->
info
[
'id'
];
?>
"
>
<ul
class=
"clearfix"
>
<li
class=
"yohoo-share-button-sina"
><a
href=
"javascript:;"
></a></li>
<li
class=
"yohoo-share-button-qq"
><a
href=
"javascript:;"
></a></li>
<li
class=
"yohoo-share-button-facebook"
><a
href=
"javascript:;"
></a></li>
</ul>
</div>
<?php
$this
->
_endblock
();
?>
<?php
$this
->
_block
(
'js'
);
?>
<?php
$this
->
_js
(
'index.js'
,
array
(
SITE_JS
.
'/lib/seajs.js'
,
));
?>
<script
type=
"text/javascript"
>
seajs
.
use
(
"jquery"
,
function
(
$
)
{
$
(
'#tag'
).
bind
(
"change"
,
function
()
{
window
.
location
.
href
=
$
(
this
).
val
();
});
});
seajs
.
use
([
'zepto'
,
'mobile'
],
function
(
$
,
mobile
)
{
mobile
.
detail
();
});
</script>
<?php
$this
->
_endblock
();
?>
\ No newline at end of file
...
...
website/view/script/video/indexmobile.php
View file @
8efc108
...
...
@@ -4,7 +4,7 @@
<div
class=
"video-main content-main"
>
<div
class=
"video-wrap"
>
<div
class=
"main-layout clearfix"
>
<?php
$this
->
_widget
(
'news_list'
,
array
(
'list'
=>
$this
->
view
->
list
,
'video'
=>
1
));
?>
<?php
$this
->
_widget
(
'news_list
mobile
'
,
array
(
'list'
=>
$this
->
view
->
list
,
'video'
=>
1
));
?>
</div>
</div>
<div
id=
"pageContent"
style=
"text-align: center;"
class=
"pagination"
>
...
...
website/view/widget/news/list.php
View file @
8efc108
...
...
@@ -26,11 +26,11 @@ else
<div
class=
"image-box"
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
title=
"
<?php
echo
$news
[
'title'
];
?>
"
>
<img
src=
"
<?php
echo
$thumb
;
?>
"
alt=
""
style=
"
<?php
echo
sprintf
(
"height:%spx;width:%spx;"
,
$height
,
$width
);
?>
"
>
<i
class=
"play-icon"
></i>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<
i
class
="
play
-
icon
"></i>
<?php endif;?>
</a>
<a class="
item
-
tag
" href="
<?
php
echo
url
(
'news/index'
,
array
(
'tag'
=>
$news
[
'tag'
]))
?>
">
<?php
echo
$news
[
'tag'
];
?>
</a>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<?
php
endif
;
?>
</div>
<div
class=
"content"
>
<h2
<?php
echo
$news
[
'main_title_type'
]
==
1
?
'class="volupia"'
:
''
;
?>
>
...
...
website/view/widget/news/listmobile.php
0 → 100644
View file @
8efc108
<?php
foreach
(
$list
as
$news
)
:
$title
=
Util_StringHelper
::
substr_cn
(
$news
[
'title'
],
90
);
$description
=
Lib_Utils_StringHelper
::
substr_cn
(
Lib_Utils_StringHelper
::
stripTags
(
$news
[
'content'
]),
68
);
$height
=
$width
=
0
;
$thumb_size
=
json_decode
(
$news
[
'thumb_size'
],
true
);
if
(
$news
[
'thumb'
])
{
$thumb
=
Lib_Images
::
getImageUrl
(
$news
[
'thumb'
],
'source'
,
'fragmentimg'
);
}
else
{
$thumb
=
SITE_IMG
.
'/pic01.png'
;
}
if
(
$thumb_size
[
'height'
]
<
308
&&
$thumb_size
[
'width'
]
<
308
)
{
$height
=
$thumb_size
[
'height'
];
$width
=
$thumb_size
[
'width'
];
}
else
{
$height
=
ceil
(
$thumb_size
[
'height'
]
*
(
308
/
$thumb_size
[
'width'
]));
$width
=
308
;
}
?>
<div
class=
"layout-item tiled"
>
<div
class=
"image-box"
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
title=
"
<?php
echo
$news
[
'title'
];
?>
"
>
<img
src=
"
<?php
echo
$thumb
;
?>
"
alt=
""
>
<?php
if
(
trim
(
$news
[
'tag'
])
==
'视频'
)
:?>
<
i
class
="
play
-
icon
"></i>
<?php endif;?>
</a>
<a class="
item
-
tag
" href="
<?
php
echo
url
(
'news/index'
,
array
(
'tag'
=>
$news
[
'tag'
]))
?>
">
<?php
echo
$news
[
'tag'
];
?>
</a>
</div>
<div
class=
"content"
>
<h2
<?php
echo
$news
[
'main_title_type'
]
==
1
?
'class="volupia"'
:
''
;
?>
>
<a
href=
"
<?php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
"
>
<?php
echo
$news
[
'title'
];
?>
</a>
</h2>
<p
class=
"text-content"
>
<?php
echo
$description
;
?>
</p>
<p
class=
"time"
>
<?php
echo
date
(
'Y.m.d'
,
$news
[
'create_time'
])
?>
</p>
</div>
</div>
<?php
endforeach
;
?>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment