Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
60bd4c00
Commit
60bd4c00
authored
Feb 26, 2019
by
Sun Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索页面方法添加
parent
2eb223f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
search.htm
src/main/webapp/templets/1/default/search.htm
+30
-6
No files found.
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
Markdown
is supported
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