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
Email Patches
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
67b0d1c261406ae2d6a68ca46268ca850663aa3d
1 parent
1686839a
添加客户端配置
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
res/js/mobile.js
util/framework/Y.class.php
website/view/script/news/detailmobile.php
website/view/script/news/indexmobile.php
res/js/mobile.js
View file @
67b0d1c
...
...
@@ -265,6 +265,7 @@ define('mobile', function(require, exports) {
window
.
location
.
href
=
$
(
this
).
val
();
});
var
current_tag
=
$
(
".main-layout"
).
attr
(
"current_tag"
);
var
client
=
$
(
".main-layout"
).
attr
(
"client"
);
var
url
=
current_tag
==
""
?
"/news/index"
:
"/news/index/tag/"
+
current_tag
;
var
prevPage
=
'<a href="{url}"><span class="iconfont"></span> PREV</a>'
;
var
lastPage
=
'<a href="{url}" class="next">NEXT <span class="iconfont"></span></a>'
;
...
...
@@ -275,11 +276,11 @@ define('mobile', function(require, exports) {
return
""
}
if
(
page
-
1
>=
1
)
{
prevPage
=
prevPage
.
replace
(
"{url}"
,
url
+
"/page/"
+
((
page
-
1
)
*
4
-
3
));
prevPage
=
prevPage
.
replace
(
"{url}"
,
url
+
"/page/"
+
((
page
-
1
)
*
4
-
3
)
+
"/client/"
+
client
);
pageHtml
=
pageHtml
.
replace
(
"{prevPage}"
,
prevPage
);
}
if
(
page
<
totalPage
)
{
lastPage
=
lastPage
.
replace
(
"{url}"
,
url
+
"/page/"
+
(
page
*
4
+
1
));
lastPage
=
lastPage
.
replace
(
"{url}"
,
url
+
"/page/"
+
(
page
*
4
+
1
)
+
"/client/"
+
client
);
pageHtml
=
pageHtml
.
replace
(
"{lastPage}"
,
lastPage
);
}
if
(
page
<
1
)
{
...
...
util/framework/Y.class.php
View file @
67b0d1c
...
...
@@ -498,5 +498,6 @@ function C($name=null, $value=null)
*/
function
url
(
$udi
,
$params
=
null
,
$route
=
null
,
array
$opts
=
null
)
{
if
(
isset
(
$_REQUEST
[
'client'
]))
{
$params
=
array_merge
(
$params
,
array
(
'client'
=>
$_REQUEST
[
'client'
]));}
return
Framework_YHttpRequest
::
instance
()
->
url
(
$udi
,
$params
,
$route
,
$opts
);
}
\ No newline at end of file
...
...
website/view/script/news/detailmobile.php
View file @
67b0d1c
...
...
@@ -55,7 +55,7 @@
<ul>
<?php
foreach
(
$this
->
view
->
news
as
$news
)
:?>
<
li
>
<
a
class
="
clearfix
" href="
/
news
/
detail
/
id
/<?
php
echo
$news
[
'id'
];
?>
">
<
a
class
="
clearfix
" href="
<?
php
echo
url
(
'news/detail'
,
array
(
'id'
=>
$news
[
'id'
]))
?>
">
<div
class=
"image-box"
>
<img
src=
"
<?php
echo
Lib_Images
::
getImageUrl
(
$news
[
'thumb'
],
'source'
,
'fragmentimg'
);
?>
"
alt=
""
>
</div>
...
...
website/view/script/news/indexmobile.php
View file @
67b0d1c
...
...
@@ -20,7 +20,7 @@
<div
class=
"news-main content-main current"
>
<div
class=
"news-content"
>
<div
class=
"main-layout clearfix"
total=
"
<?php
echo
$this
->
view
->
pageTotal
;
?>
"
page=
"
<?php
echo
$this
->
view
->
page
;
?>
"
total_times=
"3"
current_tag=
"
<?php
echo
$this
->
view
->
current_tag
;
?>
"
limit=
"
<?php
echo
$this
->
view
->
limit
;
?>
"
>
client=
"
<?php
echo
$this
->
view
->
client
;
?>
"
total_times=
"3"
current_tag=
"
<?php
echo
$this
->
view
->
current_tag
;
?>
"
limit=
"
<?php
echo
$this
->
view
->
limit
;
?>
"
>
<?php
$this
->
_widget
(
'news_listmobile'
,
array
(
'list'
=>
$this
->
view
->
list
));
?>
</div>
</div>
...
...
Please
register
or
login
to post a comment