Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
GaoQuYingJiH5-ASD
Commits
2341938a
Commit
2341938a
authored
Jul 03, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通告列表展示、详情展示
parent
94a1b086
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
34 deletions
+39
-34
notice-list-detail.html
src/notice-list-detail.html
+1
-1
notice-list.html
src/notice-list.html
+1
-1
notice-list.js
src/notice-list.js
+37
-32
No files found.
src/notice-list-detail.html
View file @
2341938a
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<div
class=
"content"
v-cloak
v-html=
"noticeContent"
style=
"padding:0.15rem
"
></div>
<div
class=
"content"
v-cloak
style=
"font-size: 0.48rem; padding:0.15rem"
v-html=
"noticeContent
"
></div>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/notice-list.html
View file @
2341938a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<div
class=
"content"
v-cloak
>
<div
class=
"content"
v-cloak
>
<van-list
v-model:loading=
"loading"
:offset=
"10"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
>
<van-list
v-model:loading=
"loading"
:offset=
"10"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
:immediate-check=
"false"
>
<van-cell
v-for=
"(item, index) in list"
:key=
"item"
>
<van-cell
v-for=
"(item, index) in list"
:key=
"item"
>
<div
class=
"list-item-wrapper"
@
click=
"detail(index)"
>
<div
class=
"list-item-wrapper"
@
click=
"detail(index)"
>
<p
class=
""
>
<p
class=
""
>
...
...
src/notice-list.js
View file @
2341938a
...
@@ -11,7 +11,7 @@ window.addEventListener("load", function() {
...
@@ -11,7 +11,7 @@ window.addEventListener("load", function() {
loading
:
false
,
loading
:
false
,
finished
:
false
,
finished
:
false
,
page
:
0
,
page
:
0
,
size
:
999
,
size
:
10
,
total
:
0
total
:
0
}
}
},
},
...
@@ -19,27 +19,31 @@ window.addEventListener("load", function() {
...
@@ -19,27 +19,31 @@ window.addEventListener("load", function() {
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
detail
(
index
){
detail
(
index
)
{
// location.href = './notice-list-detail.html?noticeId='+this.list[index].noticeId
// location.href = './notice-list-detail.html?noticeId='+this.list[index].noticeId
gemhoUtil
.
navigatePage
(
'
./notice-list-detail.html?noticeId=
'
+
this
.
list
[
index
].
noticeId
)
gemhoUtil
.
navigatePage
(
'
./notice-list-detail.html?noticeId=
'
+
this
.
list
[
index
]
.
noticeId
)
},
},
getList
(){
getList
()
{
if
(
this
.
loading
){
// if(this.loading){
return
// return
}
// }
this
.
loading
=
true
// this.loading = true
setTimeout
(()
=>
{
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
notice-list
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
privateKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
privateKey
"
],
reqParams
:
{
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
size
:
this
.
size
,
// sort: 'createTime
,desc',
// sort: 'noticeId
,desc',
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
...
@@ -47,12 +51,13 @@ window.addEventListener("load", function() {
...
@@ -47,12 +51,13 @@ window.addEventListener("load", function() {
this
.
list
.
push
(...
result
.
content
);
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
this
.
total
=
result
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
;
// 下滑不在刷新数据
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
}
}
this
.
loading
=
false
this
.
loading
=
false
})
})
},
0
)
}
}
},
},
});
});
...
...
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