Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resources_pc
Project
Project
Details
Activity
Releases
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
张伯涛
tea_resources_pc
Commits
59bd2192
Commit
59bd2192
authored
Apr 16, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页课程资源接口对接,样式调整
parent
67b7d6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
15 deletions
+61
-15
index.vue
src/views/homePage/index.vue
+61
-15
No files found.
src/views/homePage/index.vue
View file @
59bd2192
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
id=
"topAnchor"
>
<div
id=
"topAnchor"
>
<nav-list
:list=
"navList"
/>
<nav-list
:list=
"navList"
/>
<HomeSearch
/>
<HomeSearch
/>
<div
class=
"home-content"
>
<div
v-if=
"!loading"
class=
"home-content"
>
<div>
<div>
<div
class=
"suggestionCard"
@
click=
"handleToSuggestion"
>
<div
class=
"suggestionCard"
@
click=
"handleToSuggestion"
>
<img
class=
"suggestionImg"
:src=
"suggestion"
>
<img
class=
"suggestionImg"
:src=
"suggestion"
>
...
@@ -97,14 +97,21 @@
...
@@ -97,14 +97,21 @@
</div>
</div>
<div
class=
"courseCard_bottom"
>
<div
class=
"courseCard_bottom"
>
<div
class=
"courseName"
>
{{
item
.
lessonName
}}
</div>
<div
class=
"courseName"
>
{{
item
.
lessonName
}}
</div>
<div
class=
"technologyList"
>
<div
class=
"technologyList"
:title=
"item.mergeList"
>
<div
<div
v-if=
"item.mergeList && item.mergeList.length > 1"
style=
"display: flex;align-items: center;justify-content: center"
>
v-for=
"(childItem,childIndex) in item.technology"
<div
class=
"technologyClass"
>
{{
item
.
mergeList
[
0
]
}}
</div>
:key=
"childIndex"
<div
class=
"technologyClassMore"
>
...
</div>
class=
"technologyClass"
>
{{
childItem
}}
</div>
</div>
<div
v-else
>
<div
class=
"technologyClass"
>
{{
item
.
mergeList
}}
</div>
</div>
<!--
<div-->
<!-- v-for="(childItem,childIndex) in item.mergeList"-->
<!-- :key="childIndex"-->
<!-- class="technologyClass"-->
<!-- >-->
<!--
{{
childItem
}}
-->
<!--
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -207,6 +214,7 @@ export default {
...
@@ -207,6 +214,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
gradeOptions
:
[],
// 课程等级字典
gradeOptions
:
[],
// 课程等级字典
tecOptions
:
[],
// 技术分类字典
tecOptions
:
[],
// 技术分类字典
jobOptions
:
[],
// 岗位分类字典
jobOptions
:
[],
// 岗位分类字典
...
@@ -334,7 +342,6 @@ export default {
...
@@ -334,7 +342,6 @@ export default {
getDictData
()
{
getDictData
()
{
this
.
getDifficultyGrade
()
// 课程等级字典
this
.
getDifficultyGrade
()
// 课程等级字典
this
.
getTecClassifyGrade
()
// 技术分类字典
this
.
getTecClassifyGrade
()
// 技术分类字典
this
.
getJobClassify
()
// 岗位分类字典
},
},
/** 课程等级字典*/
/** 课程等级字典*/
getDifficultyGrade
()
{
getDifficultyGrade
()
{
...
@@ -349,13 +356,38 @@ export default {
...
@@ -349,13 +356,38 @@ export default {
/** 技术分类字典*/
/** 技术分类字典*/
getTecClassifyGrade
()
{
getTecClassifyGrade
()
{
getDict
(
'tec_classify'
).
then
(
res
=>
{
getDict
(
'tec_classify'
).
then
(
res
=>
{
this
.
tecOptions
=
res
.
data
this
.
tecOptions
=
res
.
data
// 技术分类字典
this
.
courseList
.
forEach
(
item
=>
{
// 循环课程list
if
(
item
.
tecClassify
&&
item
.
tecClassify
.
split
(
','
).
length
>
0
)
{
// 技术分类字段可能没有也可能多个
const
tecList
=
item
.
tecClassify
.
split
(
','
)
// 技术分类List
const
tecNameList
=
tecList
.
map
(
items
=>
this
.
tecOptions
.
find
(
i
=>
i
.
dictValue
===
items
).
dictLabel
)
this
.
$set
(
item
,
'tecNameList'
,
tecNameList
)
}
else
{
this
.
$set
(
item
,
'tecNameList'
,
[])
}
})
this
.
getJobClassify
()
// 岗位分类字典
})
})
},
},
/** 岗位分类字典*/
/** 岗位分类字典*/
getJobClassify
()
{
getJobClassify
()
{
this
.
loading
=
true
getDict
(
'job_classify'
).
then
(
res
=>
{
getDict
(
'job_classify'
).
then
(
res
=>
{
this
.
jobOptions
=
res
.
data
this
.
jobOptions
=
res
.
data
// 岗位分类字典
this
.
courseList
.
forEach
(
item
=>
{
// 循环课程list
if
(
item
.
jobClassify
&&
item
.
jobClassify
.
split
(
','
).
length
>
0
)
{
// 岗位分类字段可能没有也可能多个
const
jobList
=
item
.
jobClassify
.
split
(
','
)
// 岗位分类List
const
jobNameList
=
jobList
.
map
(
items
=>
this
.
jobOptions
.
find
(
i
=>
i
.
dictValue
===
items
).
dictLabel
)
this
.
$set
(
item
,
'jobNameList'
,
jobNameList
)
// console.log('tecNameList', item.tecNameList)
// console.log('jobNameList', item.jobNameList)
this
.
$set
(
item
,
'mergeList'
,
item
.
tecNameList
.
concat
(
item
.
jobNameList
))
// console.log('mergeList', item.mergeList)
}
else
{
this
.
$set
(
item
,
'mergeList'
,
[])
}
})
this
.
loading
=
false
})
})
},
},
/** 获取推荐新闻*/
/** 获取推荐新闻*/
...
@@ -378,7 +410,6 @@ export default {
...
@@ -378,7 +410,6 @@ export default {
},
},
/** 回到顶部*/
/** 回到顶部*/
gotoTop
()
{
gotoTop
()
{
console
.
log
(
'aaaaaaaaa'
)
document
.
getElementById
(
'topAnchor'
).
scrollIntoView
()
// 跳转到顶部
document
.
getElementById
(
'topAnchor'
).
scrollIntoView
()
// 跳转到顶部
},
},
/** 跳转意见反馈页面*/
/** 跳转意见反馈页面*/
...
@@ -766,19 +797,34 @@ export default {
...
@@ -766,19 +797,34 @@ export default {
font-weight
:
700
;
font-weight
:
700
;
}
}
.technologyList
{
.technologyList
{
cursor
:
pointer
;
padding-left
:
18px
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
.technologyClass
{
.technologyClass
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
margin
:
0
3px
;
margin
:
0
3px
;
color
:
rgba
(
54
,
130
,
252
,
1
);
color
:
rgba
(
54
,
130
,
252
,
1
);
font-size
:
14px
;
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
font-weight
:
400
;
width
:
76px
;
//width: 76px;
padding
:
0
10px
;
height
:
28px
;
background
:
rgba
(
55
,
135
,
252
,
0
.15
);
border-radius
:
50px
;
}
.technologyClassMore
{
display
:
flex
;
align-items
:
center
;
margin
:
0
3px
;
color
:
rgba
(
54
,
130
,
252
,
1
);
font-size
:
14px
;
font-family
:
Microsoft
YaHei
,
Microsoft
YaHei-400
;
font-weight
:
400
;
//width: 76px;
padding
:
0
10px
7px
;
height
:
28px
;
height
:
28px
;
background
:
rgba
(
55
,
135
,
252
,
0
.15
);
background
:
rgba
(
55
,
135
,
252
,
0
.15
);
border-radius
:
50px
;
border-radius
:
50px
;
...
...
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