Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
e0a4650e
提交
e0a4650e
authored
5月 18, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复公告列表翻页错误的问题
上级
0c59cf05
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
25 行删除
+35
-25
message.vue
client/src/pages/other/message.vue
+35
-25
没有找到文件。
client/src/pages/other/message.vue
浏览文件 @
e0a4650e
...
...
@@ -9,9 +9,7 @@
<template
v-if=
"!item.isShow"
>
<el-badge
is-dot
class=
"item"
>
{{
item
.
title
}}
</el-badge>
</
template
>
<
template
v-if=
"item.isShow"
>
{{
item
.
title
}}
</
template
>
<
template
v-if=
"item.isShow"
>
{{
item
.
title
}}
</
template
>
</template>
<div
v-html=
"item.text"
></div>
</el-collapse-item>
...
...
@@ -19,8 +17,8 @@
</el-collapse>
<div
style=
"height: 0.3rem;"
></div>
<el-pagination
:current-page
.
sync=
"page.
currentP
age"
:page-size=
"page.
limit
"
:current-page
.
sync=
"page.
p
age"
:page-size=
"page.
page_size
"
layout=
"total, prev, pager, next, jumper"
:total=
"page.total"
@
current-change=
"handleCurrentChange"
...
...
@@ -34,39 +32,49 @@
import
cAction
from
'@action'
export
default
{
components
:
{
},
data
()
{
components
:
{},
data
()
{
return
{
activeNames
:
[
'1'
],
activeNames
:
[],
msgList
:
[],
page
:
{
offset
:
0
,
page
:
1
,
total
:
0
,
currentPage
:
1
,
limit
:
10
page_size
:
20
}
}
},
mounted
()
{
mounted
()
{
this
.
getData
()
},
methods
:
{
handleChange
(
val
)
{
handleChange
(
val
)
{
if
(
typeof
val
===
'number'
&&
this
.
msgList
[
val
].
isShow
===
0
)
{
cAction
.
Other
.
setMsgWmp
(
this
.
msgList
[
val
].
id
).
then
(
json
=>
{
this
.
getData
()
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
})
cAction
.
Other
.
setMsgWmp
(
this
.
msgList
[
val
].
id
)
.
then
(
json
=>
{
this
.
getData
()
})
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
})
}
},
getData
(
obj
)
{
cAction
.
Other
.
getMyMsg
(
obj
).
then
(
json
=>
{
this
.
msgList
=
json
.
list
this
.
page
.
total
=
json
.
count
this
.
$store
.
commit
(
'myMsg'
,
json
.
countNum
)
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
})
getData
()
{
const
pageParam
=
{
page
:
this
.
page
.
page
,
page_size
:
this
.
page
.
page_size
}
cAction
.
Other
.
getMyMsg
(
pageParam
)
.
then
(
json
=>
{
this
.
msgList
=
json
.
list
this
.
page
.
total
=
json
.
count
this
.
$store
.
commit
(
'myMsg'
,
json
.
countNum
)
})
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
})
},
handleCurrentChange
()
{
this
.
page
.
offset
=
(
this
.
page
.
currentPage
-
1
)
*
this
.
page
.
limit
this
.
getData
()
}
}
...
...
@@ -74,10 +82,12 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.el-collapse-item__header
{
.el-collapse-item__header
{
line-height
:
15px
;
}
.total-core
,
.compulsory-core
,
.elective-core
{
.total-core
,
.compulsory-core
,
.elective-core
{
margin-top
:
0
.1rem
;
font-size
:
16px
;
line-height
:
36px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论