Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
3ef1480d
Commit
3ef1480d
authored
Nov 08, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程列表对接
parent
be46ba3a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
12 deletions
+59
-12
api/api.ts
+8
-0
components/courselist/courselist.vue
+9
-3
pages/courseDetail/courseDetail.vue
+37
-6
pages/personalCenter/personalCenter.vue
+5
-3
No files found.
api/api.ts
View file @
3ef1480d
...
...
@@ -52,6 +52,14 @@ export default {
// 认证详情
queryCertificateInfo
(
params
){
return
request
(
`
${
cffpURL
}
/certificate/queryCertificateInfo`
,
"POST"
,
params
)
},
// 课程详情
courseDetail
(
params
){
return
request
(
`
${
cffpURL
}
/course/detail`
,
"POST"
,
params
)
},
// 相关课程黎贝澳查询
relatedCoursesList
(
params
){
return
request
(
`
${
cffpURL
}
/course/relatedCoursesList`
,
"POST"
,
params
)
}
}
components/courselist/courselist.vue
View file @
3ef1480d
...
...
@@ -2,7 +2,7 @@
<view>
<h4
v-if=
"cffpCourseInfos.length
<
=
0
"
class=
"noLists"
>
暂无课程列表
</h4>
<ul
v-if=
"cffpCourseInfos.length>0"
>
<li
v-for=
"item in cffpCourseInfos"
:key=
"item.fileId"
>
<li
v-for=
"item in cffpCourseInfos"
:key=
"item.fileId"
@
click=
"goDetail(item)"
>
<view
class=
"thumbnailBox"
>
<img
src=
""
alt=
""
>
</view>
...
...
@@ -37,13 +37,19 @@
components
:{
},
onLoad
(){
this
.
courseList
()
},
methods
:{
goDetail
(
item
){
uni
.
navigateTo
({
url
:
`/pages/courseDetail/courseDetail?fileId=
${
item
.
fileId
}
`
});
},
courseList
(){
api
.
courseList
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
this
.
cffpCourseInfos
=
res
[
'data'
][
'
cffpCourseInfos
'
];
this
.
cffpCourseInfos
=
res
[
'data'
][
'
data
'
];
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
...
...
pages/courseDetail/courseDetail.vue
View file @
3ef1480d
...
...
@@ -5,15 +5,15 @@
<!-- 课程详情图 -->
<view
class=
"courseTitleContent"
>
<view
class=
"courseTitle"
>
<h4>
CFFP初级认证(报名+培训)
</h4>
<h4>
{{
courseInfo
.
fileTitle
}}
</h4>
<view
class=
"shareF"
>
<view></view>
<!--
<view>
送好友
</view>
-->
</view>
</view>
<view
class=
"dataBox"
>
<strong>
¥
6888.00
</strong>
<text>
5656
人购买
</text>
<strong>
¥
{{
courseInfo
.
coursePrice
}}
</strong>
<text>
{{
courseInfo
.
salesNumber
}}
人购买
</text>
</view>
</view>
<!-- 课程介绍,相关课程,讲师 -->
...
...
@@ -26,6 +26,10 @@
</view>
<!-- tabContent区域 -->
<view
class=
"tabContent"
>
<!-- 课程介绍 -->
<view
class=
"courseIntroContent"
v-if=
"tabType===1"
>
<view
v-html=
"courseInfo?.fileIntroduce"
></view>
</view>
<!-- 讲师介绍 -->
<view
class=
"lecturerContent"
v-if=
"tabType===3"
>
<view
class=
"lecturerIntro"
>
...
...
@@ -58,9 +62,11 @@
export
default
{
data
()
{
return
{
lecturerId
:
9
,
fileId
:
null
,
lecturerId
:
null
,
tabType
:
3
,
lecturerInfo
:{}
lecturerInfo
:{},
courseInfo
:{}
};
},
methods
:{
...
...
@@ -70,7 +76,7 @@
if
(
type
===
3
)
{
this
.
lecturerQuery
();
}
else
if
(
type
==
2
)
{
// this.filePathQuery(null, null,this.fileUploadItem.mdDropOptionCode
)
this
.
relatedCoursesList
(
)
}
else
{
// this.filePathQuery(this.status, this.fileId)
}
...
...
@@ -78,6 +84,7 @@
// 讲师信息查询
lecturerQuery
(){
api
.
lecturerQuery
({
id
:
this
.
lecturerId
}).
then
(
res
=>
{
console
.
log
(
'讲师信息'
,
res
);
if
(
res
[
'success'
]){
this
.
lecturerInfo
=
res
[
'data'
][
'lecturerInfos'
][
0
];
}
else
{
...
...
@@ -88,10 +95,34 @@
})
}
})
},
// 课程详情页面
courseDetail
(){
api
.
courseDetail
({
fileId
:
this
.
fileId
}).
then
(
res
=>
{
console
.
log
(
'课程详情'
,
res
);
if
(
res
[
'success'
]){
this
.
courseInfo
=
res
[
'data'
][
'data'
];
this
.
lecturerId
=
res
[
'data'
][
'data'
][
'fileLecturerId'
];
this
.
lecturerQuery
();
}
})
},
// 相关课程查询
relatedCoursesList
(){
api
.
relatedCoursesList
({
fileId
:
3937
}).
then
(
res
=>
{
console
.
log
(
'相关课程详情'
,
res
);
if
(
res
[
'success'
]){
this
.
relatedCoursesLists
=
res
[
'data'
][
'data'
];
}
})
}
},
mounted
(){
this
.
switchTab
(
this
.
tabType
)
},
onLoad
(
option
){
this
.
fileId
=
option
.
fileId
;
this
.
courseDetail
();
}
}
</
script
>
...
...
pages/personalCenter/personalCenter.vue
View file @
3ef1480d
...
...
@@ -59,7 +59,7 @@
mainMenuLists
:[
{
id
:
'00'
,
categoryName
:
'销售管理'
,
children
:[
{
title
:
'销售课程'
,
icon
:
'salesCourse'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'销售课程'
,
icon
:
'salesCourse'
,
link
:
'
/components/courselist/courselist
'
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'销售保单'
,
icon
:
'salesOrder'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'我的售后'
,
icon
:
'afterSales'
,
link
:
''
,
isOpen
:
false
,
isShow
:
true
}
],
...
...
@@ -73,7 +73,7 @@
{
id
:
'02'
,
categoryName
:
'活动管理'
,
children
:[
{
title
:
'我的学习'
,
icon
:
'myLearning'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'学习认证'
,
icon
:
'learningCertify'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'学习认证'
,
icon
:
'learningCertify'
,
link
:
'
/pages/myCertify/myCertify
'
,
isOpen
:
true
,
isShow
:
true
},
{
title
:
'我的分享'
,
icon
:
'share'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
}
],
},
...
...
@@ -104,7 +104,9 @@
// 菜单跳转页面
goDetail
(
item
){
if
(
item
.
isShow
&&
item
.
isOpen
){
uni
.
navigateTo
({
url
:
item
.
link
});
}
else
{
common
.
errorDialog
(
2
,
'该模块正在开发中,敬请期待!'
,
'提示'
);
}
...
...
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