Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
60bd4c00
Commit
60bd4c00
authored
Feb 27, 2019
by
Sun Xin
Browse files
搜索页面方法添加
parent
2eb223f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/templets/1/default/search.htm
View file @
60bd4c00
...
...
@@ -8,7 +8,7 @@
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/search.jpg"
>
</div>
<div
class=
"ms-content"
>
<div
class=
"ms-content"
id=
"body"
>
<div
class=
"ms-content-main-list"
id=
"ms-content-search"
>
<div
class=
"ms-content-main-div"
>
<div
class=
"ms-content-main-div-prompt"
>
您搜索的关键字
...
...
@@ -20,17 +20,17 @@
<li>
<a
href=
"{ms:global.url/}/[field.link/]"
>
[field.title/]
<span
class=
"ms-content-main-li-time"
>
[field.date?string("yyyy-
mm
-dd")/]
</span>
<span
class=
"ms-content-main-li-time"
>
[field.date?string("yyyy-
MM
-dd")/]
</span>
</a>
</li>
{/ms:arclist}
</ul>
</div>
<div
class=
"ms-content-main-page"
>
<a
class=
"ms-content-main-page-first"
href=
"{ms:page.index/}
"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:page.pre/}
"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:page.next/}
"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"
{ms:page.
last
/}"
>
末
页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"indexAndLast(1)
"
>
首页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"search(false)
"
>
上一页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"search(true)
"
>
下一页
</a>
<a
href=
"jacascript::void(0)"
@
click=
"indexAndLast(
{ms:page.
total
/}
)
"
>
尾
页
</a>
</div>
</div>
</div>
...
...
@@ -38,6 +38,30 @@
</body>
</html>
<script>
new
Vue
({
el
:
"
#body
"
,
data
:
{
title
:
''
,
list
:
[],
},
methods
:
{
search
:
function
(
flag
){
var
pageNo
=
{
ms
:
search
.
pageNo
/
};
var
total
=
{
ms
:
page
.
total
/
};
if
(
flag
){
pageNo
=
pageNo
==
total
?
total
:
pageNo
+
1
;
}
else
{
pageNo
=
pageNo
-
1
==
0
?
1
:
pageNo
-
1
;
}
window
.
location
.
href
=
"
{ms:global.host/}/cms/1/search.do?basic_title={ms:search.basic_title/}&pageNo=
"
+
pageNo
;
window
.
event
.
returnValue
=
false
;
},
indexAndLast
:
function
(
pageNo
){
window
.
location
.
href
=
"
{ms:global.host/}/cms/1/search.do?basic_title={ms:search.basic_title/}&pageNo=
"
+
pageNo
;
window
.
event
.
returnValue
=
false
;
},
},
})
if
(
$
(
'
.ms-content-main-ul li
'
).
length
<=
0
)
{
$
(
'
.ms-content-main-page
'
).
remove
();
$
(
'
.ms-content-main-ul
'
).
before
(
"
<div class='ms-content-main-div-nothing'>没找到相关记录</div>
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment