Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
7df02395
Commit
7df02395
authored
Apr 15, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
479b235f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
256 additions
and
92 deletions
+256
-92
index.js
src/common/api/index.js
+3
-1
learn.js
src/common/api/learn.js
+16
-0
manifest.json
src/manifest.json
+1
-1
pages.json
src/pages.json
+3
-0
answer.vue
src/pages/learn/answer.vue
+121
-19
curriculum.vue
src/pages/learn/curriculum.vue
+43
-32
index.vue
src/pages/learn/index.vue
+20
-3
result.vue
src/pages/learn/result.vue
+49
-36
No files found.
src/common/api/index.js
View file @
7df02395
...
...
@@ -7,6 +7,7 @@ import {
import
{
settledApiFun
}
from
'@/common/api/settled.js'
;
import
{
learnApiFun
}
from
"@/common/api/learn.js"
;
let
apiFun
=
function
(
vm
)
{
let
commonApi
=
commonApiFun
(
vm
);
let
settledApi
=
settledApiFun
(
vm
)
...
...
@@ -14,7 +15,8 @@ let apiFun = function(vm) {
let
apiUrl
=
{
...
commonApi
,
...
settledApi
,
...
cloudApi
...
cloudApi
,
...
learnApiFun
}
return
apiUrl
}
...
...
src/common/api/learn.js
0 → 100644
View file @
7df02395
const
globalUrl
=
process
.
uniEnv
||
{}
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
let
learnApiFun
=
function
(
vm
){
/* 查询用户基本信息 */
let
getTrainingNoticeList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/get-cert-list'
,
params
);
const
learnApi
=
{
getTrainingNoticeList
,
}
return
learnApi
}
module
.
exports
=
{
learnApiFun
}
\ No newline at end of file
src/manifest.json
View file @
7df02395
...
...
@@ -55,7 +55,7 @@
/*
快应用特有相关
*/
"mp-weixin"
:
{
/*
微信小程序特有相关
*/
"appid"
:
"wx
d1d6eede324b0465
"
,
"appid"
:
"wx
402a711597dddbaf
"
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
true
,
...
...
src/pages.json
View file @
7df02395
...
...
@@ -141,6 +141,9 @@
}
],
"navigateToMiniProgramAppIdList"
:[
"wxd1d6eede324b0465"
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
...
...
src/pages/learn/answer.vue
View file @
7df02395
<
template
>
<view
class=
"content"
>
<view
class=
""
>
<text
class=
"dx"
>
多选
</text><text
class=
"num"
>
第1题
</text><text
class=
"all"
>
/共30题
</text>
<view
class=
""
>
<view
class=
""
style=
"padding-left: 94rpx;margin:36rpx 0"
>
<text
class=
"dx"
>
多选
</text><text
class=
"num"
>
第1题
</text><text
class=
"all"
>
/共30题
</text>
</view>
<view
class=
""
style=
"text-align: center;"
>
一下对压缩机故障描述有误的是?
</view>
<view
class=
""
>
<
button>
A
</button
>
<button>
B
</button
>
<button>
C
</button>
<button>
D
</button
>
<
button>
E
</button
>
<view
class=
""
style=
"margin-top: 130rpx;"
>
<
view
class=
"list-box"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"choice(index)"
:class=
"[item.selected?'selde':'noselde']"
>
{{
item
.
selected
?
item
.
title
:
item
.
title
}}
</view
>
<
/view
>
</view>
<button
class=
"btn"
>
下一题
</button>
</view>
...
...
@@ -21,35 +23,135 @@
export
default
{
data
()
{
return
{
}
list
:
[{
selected
:
false
,
title
:
'A'
},
{
selected
:
false
,
title
:
'B'
},
{
selected
:
false
,
title
:
'C'
},
{
selected
:
false
,
title
:
'D'
},
{
selected
:
false
,
title
:
'E'
}
],
selectId
:[],
};
},
methods
:
{
abc
()
{
console
.
log
(
"11111"
)
var
arr
=
document
.
querySelector
(
".btm"
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
arr
[
i
].
onclick
=
function
()
{
console
.
log
(
this
.
value
)
}
}
},
//选择按钮
choice
(
index
)
{
if
(
this
.
list
[
index
].
selected
==
true
)
{
this
.
list
[
index
].
selected
=
false
;
//取消选中时删除数组中的值
for
(
var
i
=
0
;
i
<
this
.
selectId
.
length
;
i
++
)
{
if
(
this
.
selectId
[
i
]
===
this
.
list
[
index
].
title
)
{
this
.
selectId
.
splice
(
i
,
1
);
}
}
console
.
log
(
"选中的值"
,
this
.
selectId
)
}
else
{
this
.
list
[
index
].
selected
=
true
;
this
.
selectId
.
push
(
this
.
list
[
index
].
title
)
console
.
log
(
"选中的值"
,
this
.
selectId
)
}
}
},
mounted
()
{
console
.
log
(
"111111"
)
}
}
</
script
>
<
style
>
.content
{
<
style
lang=
"scss"
>
.content
{
width
:
600rpx
;
height
:
800rpx
;
/* background: #8F8F94; */
margin
:
0
auto
;
margin
:
0
auto
;
}
.dx
{
.dx
{
padding
:
0rpx
;
background
:
#2979FF
;
color
:
#FFFFFF
;
border-radius
:
0px
;
}
.num
{
.num
{
color
:
#2B85E4
;
}
.all
{
.all
{
color
:
#8F8F94
;
}
.btn
{
margin-top
:
0
rpx
;
.btn
{
margin-top
:
98rpx
;
width
:
476rpx
;
height
:
60rpx
;
line-height
:
30px
;
background
:
#007AFF
;
color
:
#FFFFFF
;
}
.btm
{
width
:
476rpx
;
height
:
60rpx
;
line-height
:
30px
;
margin
:
34rpx
auto
;
}
.list-box
{
// display: flex;
// flex-wrap: wrap;
padding
:
16upx
;
border-radius
:
10upx
;
view
{
width
:
476rpx
;
height
:
60upx
;
line-height
:
60upx
;
text-align
:
center
;
margin
:
26rpx
auto
0
;
}
}
/*已选择*/
.selde
{
background
:
#007AFF
;
color
:
#FFFFFF
;
border-radius
:
20upx
;
font-size
:
26rpx
;
padding
:
0
10upx
;
}
/*未选择*/
.noselde
{
background
:
#E4E7ED
;
color
:
#959595
;
border-radius
:
20upx
;
font-size
:
20upx
;
padding
:
0
10upx
;
}
</
style
>
src/pages/learn/curriculum.vue
View file @
7df02395
...
...
@@ -18,60 +18,54 @@
<view
class=
""
style=
"font-size: 40rpx;font-weight: 1000;"
>
第一章 充电桩常见问题答疑
</view>
<view
class=
""
>
<view
class=
"
"
style=
"display: flex; margin: 20rpx 0;"
>
<view
class=
"
"
style=
"width: 100rpx;height:38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"
>
<view
class=
"
video
"
>
<view
class=
"
video_1"
>
<view
class=
"
text"
>
视频
</view>
<text
style=
"margin-left: 44rpx;
"
>
1-1唯修汇公司简介
</text>
<text
class=
"text2
"
>
1-1唯修汇公司简介
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin:20rpx 0;"
>
<view
class=
"
"
style=
"width: 100rpx;height:38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"
>
<view
class=
"
video_1"
>
<view
class=
"
text"
>
视频
</view>
<text
style=
"margin-left:44rpx;
"
>
1-2可接单评定标准
</text>
<text
class=
"text2
"
>
1-2可接单评定标准
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin:20rpx 0;"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;
"
>
<view
class=
"
video_1"
>
<view
class=
"
text
"
>
视频
</view>
<text
style=
"margin-left:44rpx;
"
>
1-3结算规则
</text>
<text
class=
"text2
"
>
1-3结算规则
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin: 20rpx 0;
"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;
"
>
<view
class=
"
video_1
"
>
<view
class=
"
text
"
>
视频
</view>
<text
style=
"margin-left: 44rpx;
"
>
1-4充电桩安装开城计划
</text>
<text
class=
"text2
"
>
1-4充电桩安装开城计划
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin: 20rpx 0;
"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;
"
>
<view
class=
"
video_1
"
>
<view
class=
"
text
"
>
视频
</view>
<text
style=
"margin-left: 44rpx;
"
>
1-5缴纳质保金和费用答疑
</text>
<text
class=
"text2
"
>
1-5缴纳质保金和费用答疑
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin: 20rpx 0;"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"
>
<view
class=
"
video_1"
>
<view
class=
"
text"
>
视频
</view>
<text
style=
"margin-left:44rpx;
"
>
1-6安装材料品牌答疑1
</text>
<text
class=
"text2
"
>
1-6安装材料品牌答疑1
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin: 20rpx 0;"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;
"
>
<view
class=
"
video_1"
>
<view
class=
"
text
"
>
视频
</view>
<text
style=
"margin-left:44rpx;
"
>
1-7安装材料答疑2
</text>
<text
class=
"text2
"
>
1-7安装材料答疑2
</text>
</view>
<view
class=
"
"
style=
"display: flex;margin: 20rpx 0;
"
>
<view
class=
"
"
style=
"width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;
"
>
<view
class=
"
video_1
"
>
<view
class=
"
text
"
>
视频
</view>
<text
style=
"margin-left:44rpx;"
>
1-8其他问题答疑
</text>
</view>
<view
class=
""
style=
"display: flex;margin: 20rpx 0;"
>
<view
class=
""
style=
"width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;"
>
</view>
<text
class=
"text2"
>
1-8其他问题答疑
</text>
</view>
</view>
</view>
...
...
@@ -92,7 +86,7 @@
}
</
script
>
<
style
>
<
style
lang=
"scss"
>
.title
{
height
:
164rpx
;
font-size
:
40rpx
;
...
...
@@ -107,4 +101,21 @@
width
:
128rpx
;
height
:
128rpx
;
}
.video_1
{
display
:
flex
;
margin
:
20rpx
0
;
.text
{
width
:
100rpx
;
height
:
38rpx
;
border
:
1px
solid
#8F8F94
;
text-align
:
center
;
line-height
:
38rpx
;
margin-right
:
82rpx
;
}
.text2
{
font-size
:
33rpx
;
color
:
#82848A
;
}
}
</
style
>
src/pages/learn/index.vue
View file @
7df02395
...
...
@@ -11,9 +11,9 @@
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height: 800rpx;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"standard"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
<text>
充电桩交付规范
</text>
<text>
>
</text>
<text
>
>
</text>
</view>
</scroll-view>
</swiper-item>
...
...
@@ -181,7 +181,7 @@
快速学习,使用APP接单、抢单
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"0"
style=
"width:54%;"
></u-line-progress>
<u-line-progress
active-color=
"#2979ff"
:percent=
"
3
0"
style=
"width:54%;"
></u-line-progress>
<text>
未观看
</text>
</view>
</view>
...
...
@@ -323,6 +323,7 @@
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
//跳转到assessment页面
aaa
(){
wx
.
navigateTo
({
...
...
@@ -330,6 +331,7 @@
url
:
'./assessment'
})
},
//跳转到
bbb
(){
wx
.
navigateTo
({
...
...
@@ -339,7 +341,22 @@
//scroll-view到底部加载更多
onreachBottom
()
{
},
//跳转到拍照小程序首页
goToPrint
(){
console
.
log
(
"111111"
)
uni
.
navigateToMiniProgram
({
appId
:
'wxd1d6eede324b0465'
,
success
(
res
)
{
//打开成功
console
.
log
(
'success'
,
res
)
},
fail
(
err
){
console
.
log
(
'err'
,
err
)
}
})
}
}
}
</
script
>
...
...
src/pages/learn/result.vue
View file @
7df02395
...
...
@@ -4,21 +4,24 @@
考试结果
</view>
<view
class=
"result"
>
考试不
通过
未
通过
</view>
<view
class=
"details"
>
<view
class=
"
text1
"
>
<text>
合格条件:
</text><text>
答对20题
</text>
<view
class=
""
>
<text
class=
"first"
>
合格条件:
</text><text>
答对20题
</text>
</view>
<view
class=
"
text1
"
>
<text>
考试结果:
</text><text>
答对10题
</text>
<view
class=
""
>
<text
class=
"first"
>
考试结果:
</text><text>
答对10题
</text>
</view>
<view
class=
"text1"
>
<text>
考试用时:
</text><text>
16分29秒
</text>
<view
class=
""
>
<text
class=
"first"
>
考试用时
</text><text>
16分29秒
</text>
</view>
<view
class=
"btn"
>
<button
class=
"btn1"
>
再答一次
</button>
<button
class=
"btn2"
>
退出重考
</button>
</view>
<button
class=
"btn"
>
再答一次
</button>
<button
class=
"btn2"
>
退出重考
</button>
</view>
</view>
</
template
>
...
...
@@ -29,47 +32,57 @@
}
},
methods
:
{
methods
:{
}
}
</
script
>
<
style
>
<
style
lang=
"scss"
>
.content
{
width
:
592
rpx
;
height
:
800
rpx
;
/* background: #19BE6B; */
margin
:
84
rpx
auto
;
overflow
:
hidden
;
width
:
100%
;
height
:
950rpx
;
background
:
#DCDFE6
;
padding
:
53rpx
;
}
.title
{
margin
:
7px
13
px
;
font-size
:
30r
px
;
}
.result
{
color
:
red
;
font-size
:
56
rpx
;
font-size
:
73
rpx
;
text-align
:
center
;
margin
:
52
rpx
0
;
margin
:
46
rpx
0
;
}
.details
{
height
:
400
rpx
;
border-top
:
1px
dashed
#808080
;
}
.text1
{
margin
:
16
rpx
24
rpx
;
border-top
:
2rpx
dashed
#808080
;
height
:
600rpx
;
padding-top
:
94rpx
;
view
{
margin
:
26rpx
0
0
;
.first
{
margin
:
0
20rpx
0
;
}
}
}
.btn
{
width
:
476
rpx
;
height
:
80
rpx
;
background
:
#007AFF
;
font-size
:
32
rpx
;
margin
:
206
rpx
auto
38
rpx
;
}
.btn2
{
width
:
476
rpx
;
height
:
80
rpx
;
font-size
:
30
rpx
;
margin
:
0
auto
;
.btn1
{
width
:
477rpx
;
height
:
61rpx
;
border-radius
:
27rpx
;
line-height
:
61rpx
;
font-size
:
29rpx
;
background
:
#007AFF
;
color
:
#FFFFFF
;
margin
:
140rpx
auto
34rpx
;
}
.btn2
{
width
:
477rpx
;
height
:
61rpx
;
border-radius
:
27rpx
;
line-height
:
61rpx
;
font-size
:
29rpx
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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