Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-www-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-www-h5
Commits
55313969
提交
55313969
authored
6月 04, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
3e7663ec
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
24 行增加
和
15 行删除
+24
-15
NewsItem.vue
components/about/NewsItem.vue
+4
-2
Class.vue
components/home/Class.vue
+4
-1
Post.vue
components/home/Post.vue
+15
-11
Story.vue
components/home/Story.vue
+1
-1
没有找到文件。
components/about/NewsItem.vue
浏览文件 @
55313969
<
template
>
<div
class=
"news-item"
>
<n
uxt-link
:to=
"`/about/news/$
{item.id}`
">
<n
ew-link
:item=
"
{ news: { data: item, path: '/about/news' } }
">
<img
:src=
"item.mobile_terminal_img_uri"
class=
"news-item-pic"
v-if=
"item.mobile_terminal_img_uri"
/>
<div
class=
"news-item-content"
>
<div
class=
"news-item-content__date"
>
{{
formatDate
(
item
.
start_time
)
}}
</div>
<div
class=
"news-item-content__title"
>
{{
item
.
title
}}
</div>
<div
class=
"news-item-content__text"
v-if=
"item.abstract"
>
{{
item
.
abstract
}}
</div>
</div>
</n
uxt
-link>
</n
ew
-link>
</div>
</
template
>
<
script
>
import
NewLink
from
'@/components/NewLink'
export
default
{
components
:
{
NewLink
},
props
:
{
item
:
{
type
:
Object
}
},
methods
:
{
formatDate
(
value
)
{
...
...
components/home/Class.vue
浏览文件 @
55313969
...
...
@@ -36,7 +36,10 @@ export default {
},
async
fetch
()
{
const
params
=
{
project_id
:
process
.
env
.
projectId
,
type_tag
:
'article_publish_class'
,
page
:
1
,
limit
:
2
project_id
:
process
.
env
.
projectId
,
type_tag
:
'article_publish_class'
,
page
:
1
,
limit
:
2
}
await
this
.
$axios
.
get
(
'/api/cms/api/v1/articles'
,
{
params
}).
then
(
res
=>
{
this
.
data
=
res
.
data
.
data
||
[]
...
...
components/home/Post.vue
浏览文件 @
55313969
...
...
@@ -17,7 +17,8 @@
</div>
</div>
<div
class=
"list"
>
<nuxt-link
:to=
"`/about/news/${item.id}`"
v-for=
"(item, index) in list"
:key=
"index"
>
<
template
v-for=
"(item, index) in list"
>
<new-link
:item=
"
{ news: { data: item, path: '/about/news' } }" :key="index">
<div
class=
"list-item"
>
<div
class=
"list-item__date"
>
<p
class=
"t1"
>
{{
formatMD
(
item
.
start_time
)
}}
</p>
...
...
@@ -25,15 +26,18 @@
</div>
<div
class=
"list-item__title"
>
{{
item
.
title
}}
</div>
</div>
</nuxt-link>
</new-link>
</
template
>
</div>
</card>
</template>
<
script
>
import
Card
from
'@/components/Card'
import
NewLink
from
'@/components/NewLink'
export
default
{
components
:
{
Card
},
components
:
{
Card
,
NewLink
},
data
()
{
return
{
swiperOptions
:
{
...
...
@@ -41,8 +45,7 @@ export default {
delay
:
5000
,
loop
:
true
,
direction
:
'vertical'
,
slidesPerView
:
'auto'
,
centeredSlides
:
true
slidesPerView
:
2
},
futureList
:
[
{
title
:
'中国PRP二期班核心课程(一)'
,
created_time
:
'06月17日'
},
...
...
@@ -89,10 +92,11 @@ export default {
}
.future-right
{
flex
:
1
;
height
:
1
.2rem
;
overflow
:
hidden
;
// padding-left: 0.28rem;
}
.my-swiper
{
height
:
1rem
;
}
.future-item
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -102,10 +106,10 @@ export default {
border-top
:
1px
solid
#999
;
}
::v-deep
{
.swiper-slide-
duplicate-active
{
.future-item
{
border-
top
:
1px
solid
#999999
;
::v-deep
{
.swiper-slide-
active
{
.future-item
{
border-
bottom
:
1px
solid
#999999
;
}
}
}
...
...
components/home/Story.vue
浏览文件 @
55313969
...
...
@@ -34,7 +34,7 @@ export default {
},
async
fetch
()
{
const
params
=
{
project_id
:
process
.
env
.
projectId
,
type_tag
:
'article_alumni'
}
this
.
list
=
await
this
.
$axios
.
get
(
'/api/cms/api/v1/articles'
,
{
params
}).
then
(
res
=>
res
.
data
.
data
)
this
.
list
=
await
this
.
$axios
.
get
(
'/api/cms/api/v1/articles'
,
{
params
}).
then
(
res
=>
res
.
data
.
data
)
}
}
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论