Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp-enterprise-people-recruitment-h5
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
彭佳妮(贵阳日报)
mp-enterprise-people-recruitment-h5
Commits
c7783d68
Commit
c7783d68
authored
Nov 04, 2024
by
李明环(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息列表图片不显示问题
parent
0934e4e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
index.vue
src/pages/messageList/index.vue
+7
-10
No files found.
src/pages/messageList/index.vue
View file @
c7783d68
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<NavBar
:showIcon=
"false"
:showTitle=
"true"
title=
"消息"
></NavBar>
<NavBar
:showIcon=
"false"
:showTitle=
"true"
title=
"消息"
></NavBar>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"getList"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"getList"
>
<view
class=
"system"
>
<view
class=
"system"
>
<view
class=
"item flex-between"
v-for=
"(v, i) in list"
:key=
"
i
"
@
click=
"goToDetail(v)"
>
<view
class=
"item flex-between"
v-for=
"(v, i) in list"
:key=
"
v.id
"
@
click=
"goToDetail(v)"
>
<div
class=
"img-wrap"
>
<div
class=
"img-wrap"
>
<img
:src=
"v.iconUrl"
alt=
""
/>
<img
v-if=
"v.iconUrl"
:src=
"v.iconUrl"
alt=
""
/>
</div>
</div>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"name-date flex-between"
>
<view
class=
"name-date flex-between"
>
<text
class=
"name"
>
{{
v
.
title
||
""
}}
</text>
<text
class=
"name"
>
{{
v
.
title
||
""
}}
</text>
<text
class=
"date"
>
2024-06-21 12:30
</text>
<text
class=
"date"
>
{{
dayjs
(
v
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}}
</text>
</view>
</view>
<view
class=
"message flex-between"
>
<view
class=
"message flex-between"
>
<text>
{{
v
.
content
}}
</text>
<text>
{{
v
.
content
}}
</text>
...
@@ -31,11 +31,9 @@ import { getMessagePageList } from "@/api/message";
...
@@ -31,11 +31,9 @@ import { getMessagePageList } from "@/api/message";
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
getEnumText
,
getEumData
}
from
"@/utils/utils"
;
import
{
getEnumText
,
getEumData
}
from
"@/utils/utils"
;
import
_
from
"lodash"
;
import
_
from
"lodash"
;
import
dayjs
from
"dayjs"
;
const
list
=
ref
([]);
const
list
=
ref
([]);
getEumData
(
"EnumMessageType"
).
then
(
res
=>
{
const
iconUrlObj
=
reactive
({
console
.
log
(
res
);
});
const
iconUrlObj
=
{
3
:
new
URL
(
"@/static/image/icon/message3.png"
,
import
.
meta
.
url
).
href
,
3
:
new
URL
(
"@/static/image/icon/message3.png"
,
import
.
meta
.
url
).
href
,
4
:
new
URL
(
"@/static/image/icon/message4.png"
,
import
.
meta
.
url
).
href
,
4
:
new
URL
(
"@/static/image/icon/message4.png"
,
import
.
meta
.
url
).
href
,
5
:
new
URL
(
"@/static/image/icon/message5.png"
,
import
.
meta
.
url
).
href
,
5
:
new
URL
(
"@/static/image/icon/message5.png"
,
import
.
meta
.
url
).
href
,
...
@@ -43,7 +41,7 @@ const iconUrlObj = {
...
@@ -43,7 +41,7 @@ const iconUrlObj = {
7
:
new
URL
(
"@/static/image/icon/message7.png"
,
import
.
meta
.
url
).
href
,
7
:
new
URL
(
"@/static/image/icon/message7.png"
,
import
.
meta
.
url
).
href
,
8
:
new
URL
(
"@/static/image/icon/message8.png"
,
import
.
meta
.
url
).
href
,
8
:
new
URL
(
"@/static/image/icon/message8.png"
,
import
.
meta
.
url
).
href
,
default
:
new
URL
(
"@/static/image/icon/message-default.png"
,
import
.
meta
.
url
).
href
default
:
new
URL
(
"@/static/image/icon/message-default.png"
,
import
.
meta
.
url
).
href
};
}
)
;
const
params
=
ref
({
const
params
=
ref
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -84,9 +82,8 @@ const getList = () => {
...
@@ -84,9 +82,8 @@ const getList = () => {
params
.
value
.
isEnd
=
true
;
params
.
value
.
isEnd
=
true
;
}
}
res
.
data
.
forEach
(
async
v
=>
{
res
.
data
.
forEach
(
async
v
=>
{
v
.
typeText
=
await
getEnumText
(
"EnumMessageType"
,
v
.
type
);
v
.
iconUrl
=
iconUrlObj
[
v
.
type
]
||
iconUrlObj
.
default
;
v
.
iconUrl
=
iconUrlObj
[
v
.
type
]
||
iconUrlObj
.
default
;
console
.
log
(
v
.
iconUrl
);
v
.
typeText
=
await
getEnumText
(
"EnumMessageType"
,
v
.
type
);
});
});
params
.
value
.
pageNo
+=
1
;
params
.
value
.
pageNo
+=
1
;
list
.
value
=
list
.
value
.
concat
(
res
.
data
);
list
.
value
=
list
.
value
.
concat
(
res
.
data
);
...
...
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