Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
79c2acb6
提交
79c2acb6
authored
7月 14, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
首页增加完整课程
上级
e6be671e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
90 行增加
和
20 行删除
+90
-20
course_01.png
src/assets/images/course_01.png
+0
-0
Card.vue
src/components/Card.vue
+3
-0
index.vue
src/pages/home/index.vue
+86
-20
login.vue
src/pages/login/login.vue
+1
-0
没有找到文件。
src/assets/images/course_01.png
0 → 100644
浏览文件 @
79c2acb6
245.1 KB
src/components/Card.vue
浏览文件 @
79c2acb6
...
...
@@ -35,4 +35,7 @@ export default {
color
:
#333
;
border-bottom
:
0
.06rem
solid
#2b7ce9
;
}
.card-bd
{
padding
:
0
.2rem
0
;
}
</
style
>
src/pages/home/index.vue
浏览文件 @
79c2acb6
...
...
@@ -13,7 +13,7 @@
</div>
<div
class=
"nav"
>
<ul
class=
"nav-list"
>
<li
class=
"nav-item"
@
click=
"onClickNav('courseLearn'
, true
)"
>
<li
class=
"nav-item"
@
click=
"onClickNav('courseLearn')"
>
<img
src=
"../../assets/images/home_menu_01.png"
alt=
"课程学习"
/>
</li>
<li
class=
"nav-item"
@
click=
"onClickNav('examIndex')"
>
...
...
@@ -24,9 +24,30 @@
</li>
</ul>
</div>
<card
title=
"课程试听"
style=
"padding-bottom:1.2rem;"
>
<card
title=
"课程试听"
>
<free-course-item
v-for=
"(item, index) in courseList"
:data=
"item"
:key=
"index"
></free-course-item>
</card>
<card
title=
"完整课程"
style=
"padding-bottom:1.2rem;"
>
<div
class=
"course"
@
click=
"onClickNav('courseLearn')"
>
<div
class=
"course-content"
>
<h2
class=
"course-content__title"
>
道路运输安全管理培训课程
</h2>
<ul
class=
"course-content-tag"
>
<li>
16个课程模块
</li>
<li>
700个知识考点
</li>
</ul>
<div
class=
"course-content-ft"
>
<div
class=
"course-content__price"
>
¥
<span>
199
</span>
.00
</div>
<div
class=
"course-content__button"
>
立即报名
</div>
</div>
</div>
<div
class=
"course-pic"
>
<img
src=
"../../assets/images/course_01.png"
/>
</div>
</div>
</card>
</div>
</
template
>
<
script
>
...
...
@@ -79,30 +100,13 @@ export default {
}
},
// 点击导航
async
onClickNav
(
name
,
requireLogin
)
{
onClickNav
(
name
)
{
const
map
=
{
courseLearn
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/course/learn`
,
examIndex
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/exam/index?isBack=1`
,
mockIndex
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/mock/index`
,
pay
:
`/pages/web/index?src=
${
window
.
location
.
origin
}
/pay`
}
// const isLogin = requireLogin
// ? await this.$store.dispatch('checkLogin')
// : false
// // 未登录
// if (requireLogin && !isLogin) {
// if (this.isWeapp) {
// // 小程序
// wx.miniProgram.navigateTo({
// url: `/pages/login/index?redirect_uri=${encodeURIComponent(
// map[name]
// )}`
// })
// } else {
// this.$router.push({ name: 'login' })
// }
// return
// }
if
(
this
.
isWeapp
)
{
// 小程序
wx
.
miniProgram
.
navigateTo
({
url
:
map
[
name
]
})
...
...
@@ -149,4 +153,66 @@ export default {
::v-deep
.course-item
:last-child
{
border-bottom
:
0
;
}
.course
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
.2rem
0
;
}
.course-pic
{
width
:
2
.4rem
;
height
:
1
.35rem
;
margin-left
:
10px
;
border-radius
:
6px
;
overflow
:
hidden
;
img
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
}
}
.course-content__title
{
font-size
:
0
.3rem
;
font-weight
:
400
;
line-height
:
1
;
color
:
#222
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
}
.course-content-tag
{
li
{
display
:
inline-block
;
padding
:
0
5px
;
font-size
:
12px
;
color
:
#2b7ce9
;
line-height
:
14px
;
background-color
:
rgba
(
43
,
124
,
233
,
0
.4
);
border-radius
:
3px
;
}
}
.course-content-ft
{
margin-top
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.course-content__price
{
font-size
:
13px
;
color
:
#ff6767
;
line-height
:
1
;
span
{
font-size
:
24px
;
}
}
.course-content__button
{
width
:
80px
;
height
:
24px
;
font-size
:
12px
;
color
:
#fff
;
line-height
:
24px
;
text-align
:
center
;
background
:
rgba
(
255
,
103
,
103
,
1
);
border-radius
:
12px
;
}
</
style
>
src/pages/login/login.vue
浏览文件 @
79c2acb6
...
...
@@ -165,6 +165,7 @@ export default {
}
else
{
this
.
$router
.
replace
(
'/'
)
}
done
(
true
)
}
done
(
false
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论