Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-psp-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-psp-show-h5
Commits
01990e06
提交
01990e06
authored
1月 06, 2023
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
770490fe
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
56 行增加
和
38 行删除
+56
-38
base.ts
src/api/base.ts
+4
-4
Index.vue
src/modules/course/views/Index.vue
+7
-9
CourseCard.vue
src/modules/home/components/CourseCard.vue
+2
-0
News.vue
src/modules/home/components/News.vue
+3
-6
Questions.vue
src/modules/home/components/Questions.vue
+3
-0
RecommendCourse.vue
src/modules/home/components/RecommendCourse.vue
+6
-0
Index.vue
src/modules/home/views/Index.vue
+1
-3
Index.vue
src/modules/teacher/views/Index.vue
+26
-16
types.ts
src/types.ts
+4
-0
没有找到文件。
src/api/base.ts
浏览文件 @
01990e06
...
...
@@ -33,10 +33,10 @@ export function getVideoView(params: { id: string }) {
return
httpRequest
.
get
(
'/api/psp/v1/admission/video-view'
,
{
params
})
}
// 获取推荐课程列表
export
function
getRecommendCourse
()
{
return
httpRequest
.
get
(
'/api/psp/v1/recommend-course/list'
)
export
function
getRecommendCourse
(
params
:
{
page_size
?:
string
;
page
?:
string
}
)
{
return
httpRequest
.
get
(
'/api/psp/v1/recommend-course/list'
,
{
params
}
)
}
// 获取导师列表
export
function
getTeacherList
()
{
return
httpRequest
.
get
(
'/api/psp/v1/lecturer/list'
)
export
function
getTeacherList
(
params
:
{
page_size
?:
string
;
page
?:
string
;
type
?:
string
}
)
{
return
httpRequest
.
get
(
'/api/psp/v1/lecturer/list'
,
{
params
}
)
}
src/modules/course/views/Index.vue
浏览文件 @
01990e06
...
...
@@ -11,8 +11,9 @@ interface IRecommendCourseAllList {
}
const
courseList
=
reactive
<
IRecommendCourseAllList
>
({
loading
:
false
,
page
:
1
,
total
:
0
,
list
:
[]
})
const
handleGetTeacherList
=
()
=>
{
getRecommendCourse
()
const
handleGetCourseList
=
()
=>
{
const
params
:
any
=
{
page_size
:
10
,
page
:
courseList
.
page
}
getRecommendCourse
(
params
)
.
then
(
res
=>
{
const
{
total
,
list
}
=
res
.
data
courseList
.
total
=
total
...
...
@@ -26,22 +27,19 @@ const handleGetTeacherList = () => {
})
}
onMounted
(()
=>
{
courseList
.
page
=
1
courseList
.
list
=
[]
// 获取持证人列表
handleGetTeacherList
()
})
// 滚动加载
const
el
=
ref
<
HTMLElement
>
()
useInfiniteScroll
(
document
,
()
=>
{
// load more
!
courseList
.
loading
&&
handleGet
Teacher
List
()
!
courseList
.
loading
&&
handleGet
Course
List
()
},
{
distance
:
10
}
)
onMounted
(()
=>
{
handleGetCourseList
()
})
</
script
>
<
template
>
...
...
src/modules/home/components/CourseCard.vue
浏览文件 @
01990e06
...
...
@@ -114,6 +114,7 @@ function showTips() {
background
:
#ffffff
;
padding
:
0
.14rem
0
.2rem
;
border-radius
:
0
.3rem
;
cursor
:
pointer
;
}
p
{
flex
:
1
;
...
...
@@ -139,6 +140,7 @@ function showTips() {
background
:
#fff
;
border-radius
:
0
.2rem
;
box-sizing
:
border-box
;
cursor
:
pointer
;
h2
{
font-size
:
0
.28rem
;
line-height
:
1
.5
;
...
...
src/modules/home/components/News.vue
浏览文件 @
01990e06
...
...
@@ -33,7 +33,7 @@ const handleViewNews = (item: INews) => {
</van-swipe-item>
</van-swipe>
</div>
<img
src=
"https://webapp-pub.ezijing.com/project/prp-h5/exam_banner.png"
class=
"exam_banner"
/>
</
template
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -47,8 +47,8 @@ const handleViewNews = (item: INews) => {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding-left
:
0
.2rem
;
cursor
:
pointer
;
}
:deep
(
.van-swipe__indicator
)
{
display
:
none
;
...
...
@@ -81,8 +81,5 @@ const handleViewNews = (item: INews) => {
margin-left
:
1
.1rem
;
}
}
.exam_banner
{
width
:
6
.9rem
;
margin-top
:
0
.3rem
;
}
</
style
>
src/modules/home/components/Questions.vue
浏览文件 @
01990e06
...
...
@@ -75,4 +75,7 @@ const handleViewMore = () => {
:deep
(
van-button--large
)
{
height
:
0
.69rem
;
}
:deep
(
.van-button
)
{
cursor
:
pointer
;
}
</
style
>
src/modules/home/components/RecommendCourse.vue
浏览文件 @
01990e06
...
...
@@ -13,6 +13,8 @@ getRecommendCourse().then(res => {
</
script
>
<
template
>
<img
src=
"https://webapp-pub.ezijing.com/project/prp-h5/course_banner.png"
class=
"exam_banner"
/>
<AppCard
title=
"推荐课程"
id=
"team"
>
<template
#
header-aside
>
<div
class=
"more"
>
...
...
@@ -37,6 +39,10 @@ getRecommendCourse().then(res => {
</template>
<
style
lang=
"scss"
scoped
>
.exam_banner
{
width
:
6
.9rem
;
margin-top
:
0
.3rem
;
}
.course_list
{
.list_item
{
display
:
flex
;
...
...
src/modules/home/views/Index.vue
浏览文件 @
01990e06
...
...
@@ -68,7 +68,5 @@ onMounted(() => {
<TeamRanking
:teams=
"data.ranking"
></TeamRanking>
<!-- 考试攻略 -->
<!--
<ExamStrategy
:docs=
"data.exam_strategy_docs"
></ExamStrategy>
-->
<RouterLink
to=
"/qa"
>
<img
src=
"https://webapp-pub.ezijing.com/project/prp-h5/qa_banner.png"
style=
"width: 100%; margin-bottom: 0.5rem"
/>
</RouterLink>
<img
src=
"https://webapp-pub.ezijing.com/project/prp-h5/exam_banner.png"
style=
"width: 100%; margin-bottom: 0.5rem"
/>
</
template
>
src/modules/teacher/views/Index.vue
浏览文件 @
01990e06
...
...
@@ -9,10 +9,18 @@ interface ITeacherAllList {
total
:
number
list
:
ITeacherList
[]
}
const
teacherList
=
reactive
<
ITeacherAllList
>
({
loading
:
false
,
page
:
1
,
total
:
0
,
list
:
[]
})
const
teacherList
=
$ref
<
ITeacherAllList
>
({
loading
:
false
,
page
:
1
,
total
:
0
,
list
:
[]
})
const
tabIndex
=
$ref
(
0
)
const
handleGetTeacherList
=
()
=>
{
getTeacherList
()
const
params
:
any
=
{
page_size
:
10
,
page
:
teacherList
.
page
}
getTeacherList
(
params
)
.
then
(
res
=>
{
const
{
total
,
list
}
=
res
.
data
teacherList
.
total
=
total
...
...
@@ -26,12 +34,6 @@ const handleGetTeacherList = () => {
})
}
onMounted
(()
=>
{
teacherList
.
page
=
1
teacherList
.
list
=
[]
// 获取持证人列表
handleGetTeacherList
()
})
// 滚动加载
const
el
=
ref
<
HTMLElement
>
()
useInfiniteScroll
(
...
...
@@ -42,6 +44,9 @@ useInfiniteScroll(
},
{
distance
:
10
}
)
onMounted
(()
=>
{
handleGetTeacherList
()
})
</
script
>
<
template
>
...
...
@@ -55,15 +60,22 @@ useInfiniteScroll(
紫荆实战导师团
</div>
</div>
<div
class=
"teacher_list"
ref=
"el"
>
<div
class=
"teacher_list"
ref=
"el"
v-if=
"teacherList.list.filter(item => item.type === (tabIndex + 1).toString()).length > 0"
>
<div
class=
"list_item"
v-for=
"(item, index) in teacherList.list"
:key=
"index"
>
<img
:src=
"item.avatar"
alt=
""
/>
<div
class=
"item_bottom"
>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<div
class=
"desc"
v-html=
"item.desc_type_name"
></div>
<div
v-if=
"(tabIndex + 1).toString() === item.type"
>
<img
:src=
"item.avatar"
alt=
""
/>
<div
class=
"item_bottom"
>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<div
class=
"desc"
v-html=
"item.desc_type_name"
></div>
</div>
</div>
</div>
</div>
<van-empty
v-else
description=
"暂无"
/>
</
template
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -74,9 +86,6 @@ useInfiniteScroll(
border-top-left-radius
:
0
.4rem
;
border-top-right-radius
:
0
.4rem
;
position
:
relative
;
// top: -20px;
// left: 50%;
// transform: translateX(-50%);
z-index
:
100
;
margin
:
-20px
auto
;
display
:
flex
;
...
...
@@ -93,6 +102,7 @@ useInfiniteScroll(
.tab_name
{
font-size
:
0
.28rem
;
font-weight
:
400
;
cursor
:
pointer
;
}
.inactive_tab
{
color
:
#999999
;
...
...
src/types.ts
浏览文件 @
01990e06
...
...
@@ -93,6 +93,10 @@ export interface ITeacherList {
id
:
string
name
:
string
pv
:
string
title
:
string
url
:
string
weight
:
string
type
:
string
type_name
:
string
office
:
string
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论