Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
bd518f1b
Commit
bd518f1b
authored
Feb 22, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
培训视频页 接口对接 100%
parent
79e6ea0c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
327 additions
and
18 deletions
+327
-18
pages.json
take-order/pages.json
+10
-8
web.vue
take-order/pages/take/web.vue
+7
-1
index.vue
take-order/pages/video/index.vue
+185
-9
section.vue
take-order/pages/video/section.vue
+125
-0
No files found.
take-order/pages.json
View file @
bd518f1b
...
@@ -8,6 +8,14 @@
...
@@ -8,6 +8,14 @@
{
{
"path"
:
"pages/video/index"
,
"style"
:
{
"navigationBarTitleText"
:
"培训&考试"
}
},
{
"path"
:
"pages/settle/index"
,
"path"
:
"pages/settle/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"充电桩安装招募"
"navigationBarTitleText"
:
"充电桩安装招募"
...
@@ -82,13 +90,7 @@
...
@@ -82,13 +90,7 @@
},
},
{
"path"
:
"pages/video/index"
,
"style"
:
{
"navigationBarTitleText"
:
"培训&考试"
}
},
...
@@ -227,7 +229,7 @@
...
@@ -227,7 +229,7 @@
{
{
"path"
:
"pages/take/web"
,
"path"
:
"pages/take/web"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
网页
"
"navigationBarTitleText"
:
""
}
}
},
},
...
...
take-order/pages/take/web.vue
View file @
bd518f1b
...
@@ -8,13 +8,19 @@
...
@@ -8,13 +8,19 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
webUrl
:
''
webUrl
:
''
,
from
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'内置网页'
)
getApp
().
trackPage
(
'内置网页'
)
if
(
e
&&
e
.
from
){
this
.
from
=
e
.
from
}
if
(
e
&&
e
.
url
){
if
(
e
&&
e
.
url
){
this
.
webUrl
=
e
.
url
this
.
webUrl
=
e
.
url
return
return
...
...
take-order/pages/video/index.vue
View file @
bd518f1b
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"itemView"
v-for=
"(item,ikey) in dataList"
:key=
"ikey"
<view
@
click=
"itemClick(item,ikey)"
>
class=
"itemView"
<view
class=
"titleView"
>
v-for=
"(item,ikey) in dataList"
:key=
"ikey"
>
<text
class=
"title"
>
{{
item
.
title
}}
</text>
<image
class=
"arrow"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
<text
class=
"notice"
>
时长:5分钟,已完成学习
</text>
<view
class=
"titleView"
@
click=
"itemClick(item,ikey)"
>
<text
class=
"title"
>
{{
item
.
name
}}
</text>
<image
class=
"arrow"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
<text
class=
"notice"
v-if=
"item.isLearn"
>
已学习
</text>
<text
class=
"notice"
v-if=
"!item.isLearn"
>
未学习
</text>
</view>
</view>
...
@@ -25,6 +32,9 @@
...
@@ -25,6 +32,9 @@
return
{
return
{
icon_arrow_right
:
''
,
icon_arrow_right
:
''
,
dataList
:[],
dataList
:[],
course_id
:
172
,
section_id
:
0
,
jumpUrl
:
'https://m.banshouhui.com/xue/course/section/'
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -37,6 +47,9 @@
...
@@ -37,6 +47,9 @@
//获取数据
//获取数据
getData
:
function
()
{
getData
:
function
()
{
this
.
getSections
()
/*
this.dataList = [
this.dataList = [
{
{
'title':'第一章 希望的终结',
'title':'第一章 希望的终结',
...
@@ -48,21 +61,174 @@
...
@@ -48,21 +61,174 @@
'title':'第三章 诸神的黄昏',
'title':'第三章 诸神的黄昏',
},
},
];
];
*/
},
//获取章节
getSections
:
function
()
{
//getApp().globalData.domain_Name
let
that
=
this
uni
.
request
({
url
:
'http://rest-xue.yunya.com/v1/chapter-sections'
+
'?course_id='
+
this
.
course_id
,
method
:
'GET'
,
data
:
{
//type:this.activeTop,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 章节 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
if
(
res
.
statusCode
==
200
){
this
.
dataList
=
res
.
data
//this.getFirstSectionId()
console
.
log
(
'statusCode=200'
)
console
.
log
(
'获取 章节 成功 this.dataList'
)
console
.
log
(
this
.
dataList
)
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取章节失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
/*
//获取 第一章 章节Id
getFirstSectionId: function () {
var item = this.dataList[0]
var sectionList = item.section
var firstSection = sectionList[0]
this.section_id = firstSection.id
//this.goToWeb()
//this.getSectionDetail()
console.log('获取 第一章 章节Id:')
console.log(this.section_id)
},
//跳转到 视频网页
goToWeb: function () {
uni.navigateTo({
url:'/pages/take/web'
+'?url=' + 'https://m.banshouhui.com/xue/course/section/4227',
})
},
},
*/
itemClick
:
function
(
item
,
ikey
)
{
itemClick
:
function
(
item
,
ikey
)
{
var
sectionList
=
item
.
section
var
firstSection
=
sectionList
[
0
]
this
.
section_id
=
firstSection
.
id
item
.
isLearn
=
true
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/take/web'
url
:
'/pages/take/web'
+
'?url='
+
'https://www.baidu.com'
,
+
'?url='
+
this
.
jumpUrl
+
this
.
section_id
,
})
})
},
},
//参加考试
//参加考试
examClick
:
function
()
{
examClick
:
function
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/exam/index'
url
:
'/pages/exam/index'
})
})
}
},
//获取 章节详情
getSectionDetail
:
function
()
{
//getApp().globalData.domain_Name
let
that
=
this
uni
.
request
({
url
:
'http://rest-xue.yunya.com/v1/section-details'
+
'?section_id='
+
this
.
section_id
,
method
:
'GET'
,
data
:
{
//type:this.activeTop,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 章节详情 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
){
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
})
return
}
if
(
res
.
statusCode
==
200
){
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
fail
:
(
e
)
=>
{
console
.
log
(
'获取 章节详情 失败'
)
console
.
log
(
e
)
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取章节详情失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
...
@@ -90,6 +256,16 @@
...
@@ -90,6 +256,16 @@
border-bottom
:
2
rpx
solid
#999999
;
border-bottom
:
2
rpx
solid
#999999
;
}
}
.sectionView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
80
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
border-bottom
:
2
rpx
solid
#999999
;
}
.titleView
{
.titleView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
100%
;
width
:
100%
;
...
...
take-order/pages/video/section.vue
0 → 100644
View file @
bd518f1b
<
template
>
<view
class=
"backView"
>
<view
class=
"itemView"
v-for=
"(item,ikey) in dataList"
:key=
"ikey"
@
click=
"itemClick(item,ikey)"
>
<view
class=
"titleView"
>
<text
class=
"title"
>
{{
item
.
name
}}
</text>
<image
class=
"arrow"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
<text
class=
"notice"
>
时长:5分钟,已完成学习
</text>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomBtn"
@
click=
"examClick()"
>
<text
class=
"bottomTitle"
>
完成学习后,可参加考试
</text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
protocolContent
:
''
}
},
onLoad
(
e
)
{
if
(
e
&&
e
.
activeService
&&
e
.
activeService
.
length
>
0
){
//console.log(e.activeService)
this
.
activeService
=
e
.
activeService
}
},
methods
:
{
//拨打客服 点击
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
phone
});
},
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FFFFFF
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.itemView
{
background-color
:
#FAFAFA
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
border-bottom
:
2
rpx
solid
#999999
;
}
.titleView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
80
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
2
rpx
solid
#999999
;
}
.title
{
font-size
:
28
rpx
;
margin-left
:
40
rpx
;
}
.arrow
{
width
:
16
rpx
;
height
:
28
rpx
;
margin-right
:
40
rpx
;
}
.notice
{
padding-left
:
40
rpx
;
padding-top
:
20
rpx
;
padding-bottom
:
20
rpx
;
font-size
:
28
rpx
;
color
:
#999999
;
}
.bottomView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
140
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
bottom
:
0
;
}
.bottomBtn
{
background-color
:
#007AFF
;
width
:
60%
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.bottomTitle
{
font-size
:
32
rpx
;
color
:
#FFFFFF
;
}
</
style
>
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