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
a033412d
Commit
a033412d
authored
Apr 28, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
8632bcd7
b2c4a442
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1216 additions
and
942 deletions
+1216
-942
index.vue
src/pages/index/index.vue
+1
-1
answer.vue
src/pages/learn/answer.vue
+247
-156
assessment.vue
src/pages/learn/assessment.vue
+101
-143
curriculum.vue
src/pages/learn/curriculum.vue
+55
-14
index.vue
src/pages/learn/index.vue
+684
-547
result.vue
src/pages/learn/result.vue
+128
-81
No files found.
src/pages/index/index.vue
View file @
a033412d
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',
5=>'已签约',6=>'未支付保证金
',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',
6=>'已签约
',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location
:
[
116.3896
,
39.91917
],
// 经纬度
location
:
[
116.3896
,
39.91917
],
// 经纬度
title
:
false
,
title
:
false
,
title
:
"Hello"
,
title
:
"Hello"
,
...
...
src/pages/learn/answer.vue
View file @
a033412d
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
""
>
<view
class=
""
>
<view
class=
""
style=
"padding-left: 94rpx;margin:36rpx 0"
>
<view
class=
""
style=
"padding-left: 94rpx; margin: 36rpx 0"
>
<text
class=
"dx"
>
多选
</text><text
class=
"num"
>
第1题
</text><text
class=
"all"
>
/共30题
</text>
<text
class=
"dx"
>
多选
</text
</view>
><text
class=
"all"
>
{{
ExaminationQuestions
.
progress
}}
</text>
<view
class=
""
style=
"text-align: center;"
>
</view>
一下对压缩机故障描述有误的是?
<view
class=
""
style=
"text-align: center"
>
</view>
{{
ExaminationQuestions
.
question
.
content
}}
<view
class=
""
style=
"margin-top: 130rpx;"
>
</view>
<view
class=
"list-box"
>
<view
class=
""
style=
"margin-top: 130rpx"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"choice(index)"
:class=
"[item.selected?'selde':'noselde']"
>
<view
class=
"list-box"
>
{{
item
.
selected
?
item
.
title
:
item
.
title
}}
<view
</view>
v-for=
"(item, index) in list"
</view>
:key=
"index"
</view>
@
click=
"choice(index)"
<button
class=
"btn"
>
下一题
</button>
:class=
"[item.isRight ? 'selde' : 'noselde']"
</view>
>
</view>
{{
item
.
content
}}
</view>
</view>
</view>
<button
class=
"btn"
@
click=
"nextClick()"
>
下一题
</button>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[{
list
:
[
selected
:
false
,
{
title
:
'A'
isRight
:
false
,
},
title
:
"A"
,
{
},
selected
:
false
,
{
title
:
'B'
isRight
:
false
,
},
title
:
"B"
,
{
},
selected
:
false
,
{
title
:
'C'
isRight
:
false
,
},
title
:
"C"
,
{
},
selected
:
false
,
{
title
:
'D'
isRight
:
false
,
},
title
:
"D"
,
{
},
selected
:
false
,
{
title
:
'E'
isRight
:
false
,
}
title
:
"E"
,
],
},
selectId
:[],
],
isSelect
:
false
,
};
selectId
:
[],
},
userExamId
:
null
,
onLoad
()
{
ExaminationQuestions
:
null
,
this
.
getUserExamInfo
()
isQuestion
:
true
,
},
};
methods
:
{
},
abc
()
{
onLoad
(
num
)
{
console
.
log
(
"11111"
)
console
.
log
(
"标识符4"
,
this
.
userExamId
);
var
arr
=
document
.
querySelector
(
".btm"
);
console
.
log
(
"标识符3"
+
num
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
arr
[
i
].
onclick
=
function
()
{
this
.
userExamId
=
num
;
console
.
log
(
this
.
value
)
}
this
.
getExaminationQuestions
();
}
},
},
onUnload
()
{
//选择按钮
wx
.
reLaunch
({
choice
(
index
)
{
url
:
"./index"
,
if
(
this
.
list
[
index
].
selected
==
true
)
{
});
this
.
list
[
index
].
selected
=
false
;
},
//取消选中时删除数组中的值
for
(
var
i
=
0
;
i
<
this
.
selectId
.
length
;
i
++
)
{
methods
:
{
if
(
this
.
selectId
[
i
]
===
this
.
list
[
index
].
title
)
{
abc
()
{
this
.
selectId
.
splice
(
i
,
1
);
console
.
log
(
"11111"
);
}
var
arr
=
document
.
querySelector
(
".btm"
);
}
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
console
.
log
(
"选中的值"
,
this
.
selectId
)
arr
[
i
].
onclick
=
function
()
{
}
else
{
console
.
log
(
this
.
value
);
this
.
list
[
index
].
selected
=
true
;
};
this
.
selectId
.
push
(
this
.
list
[
index
].
title
)
}
console
.
log
(
"选中的值"
,
this
.
selectId
)
},
}
//选择按钮
},
choice
(
index
)
{
if
(
this
.
list
[
index
].
isRight
==
true
)
{
this
.
list
[
index
].
isRight
=
false
;
this
.
isSelect
=
false
;
},
console
.
log
(
this
.
isSelect
);
mounted
()
{
//取消选中时删除数组中的值
console
.
log
(
"111111"
)
for
(
var
i
=
0
;
i
<
this
.
selectId
.
length
;
i
++
)
{
}
if
(
this
.
selectId
[
i
]
===
this
.
list
[
index
].
id
)
{
}
this
.
selectId
.
splice
(
i
,
1
);
}
}
console
.
log
(
"选中的值"
,
this
.
selectId
);
}
else
{
this
.
list
[
index
].
isRight
=
true
;
this
.
isSelect
=
true
;
console
.
log
(
this
.
isSelect
);
this
.
selectId
.
push
(
this
.
list
[
index
].
id
);
console
.
log
(
"选中的值"
,
this
.
selectId
);
}
},
//申请考试题目
getExaminationQuestions
:
function
()
{
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
ExaminationQuestions
=
res
.
data
.
data
;
this
.
list
=
res
.
data
.
data
.
answerList
;
console
.
log
(
this
.
ExaminationQuestions
);
}
},
});
console
.
log
(
"answer的userExamId是"
,
this
.
userExamId
);
},
//下一题
nextClick
:
function
()
{
//判断
if
(
this
.
isQuestion
==
"第20题/共20题"
)
{
this
.
isQuestion
=
""
;
console
.
log
(
"标识符6666"
,
this
.
userExamId
.
userExamId
);
wx
.
navigateTo
({
url
:
"./result?userExamId="
+
this
.
userExamId
.
userExamId
,
});
}
//判断有没有选
if
(
this
.
selectId
.
length
==
0
)
{
wx
.
showToast
({
title
:
"请选择"
,
icon
:
"none"
,
//当icon:'none'时,没有图标 只有文字
duration
:
2000
,
});
return
;
}
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
+
"&questionId="
+
this
.
ExaminationQuestions
.
question
.
id
+
"&userAnswerIds="
+
this
.
selectId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
"sssss"
,
res
);
if
(
res
.
data
.
code
==
200
)
{
this
.
ExaminationQuestions
=
res
.
data
.
data
;
this
.
list
=
res
.
data
.
data
.
answerList
;
this
.
isQuestion
=
res
.
data
.
data
.
progress
;
console
.
log
(
"uuuuuuuu"
,
this
.
ExaminationQuestions
);
}
this
.
selectId
=
[];
console
.
log
(
"zzy"
,
this
.
selectId
);
},
});
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.content
{
.content
{
width
:
600rpx
;
width
:
600rpx
;
height
:
800rpx
;
height
:
800rpx
;
/* background: #8F8F94; */
/* background: #8F8F94; */
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.dx
{
.dx
{
padding
:
0rpx
;
padding
:
0rpx
;
background
:
#2979FF
;
background
:
#2979ff
;
color
:
#FFFFFF
;
color
:
#ffffff
;
border-radius
:
0px
;
border-radius
:
0px
;
}
}
.num
{
.num
{
color
:
#2B85E4
;
color
:
#2b85e4
;
}
}
.all
{
.all
{
color
:
#8F8F94
;
color
:
#8f8f94
;
}
}
.btn
{
.btn
{
margin-top
:
98rpx
;
margin-top
:
98rpx
;
width
:
476rpx
;
width
:
476rpx
;
height
:
60rpx
;
height
:
60rpx
;
line-height
:
30px
;
line-height
:
30px
;
background
:
#007AFF
;
background
:
#007aff
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
.btm
{
.btm
{
width
:
476rpx
;
width
:
476rpx
;
height
:
60rpx
;
height
:
60rpx
;
line-height
:
30px
;
line-height
:
30px
;
margin
:
34rpx
auto
;
margin
:
34rpx
auto
;
}
}
.list-box
{
.list-box
{
// display: flex;
// display: flex;
// flex-wrap: wrap;
// flex-wrap: wrap;
padding
:
16upx
;
padding
:
16upx
;
border-radius
:
10upx
;
border-radius
:
10upx
;
view
{
view
{
width
:
476rpx
;
width
:
476rpx
;
height
:
60upx
;
height
:
60upx
;
line-height
:
60upx
;
line-height
:
60upx
;
text-align
:
center
;
text-align
:
center
;
margin
:
26rpx
auto
0
;
margin
:
26rpx
auto
0
;
}
}
}
}
/*已选择*/
.selde
{
/*已选择*/
background
:
#007aff
;
.selde
{
color
:
#ffffff
;
background
:
#007AFF
;
border-radius
:
20upx
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
border-radius
:
20upx
;
padding
:
0
10upx
;
font-size
:
26rpx
;
}
padding
:
0
10upx
;
}
/*未选择*/
.noselde
{
/*未选择*/
background
:
#e4e7ed
;
.noselde
{
color
:
#959595
;
background
:
#E4E7ED
;
border-radius
:
20upx
;
color
:
#959595
;
font-size
:
20upx
;
border-radius
:
20upx
;
padding
:
0
10upx
;
font-size
:
20upx
;
}
padding
:
0
10upx
;
}
</
style
>
</
style
>
src/pages/learn/assessment.vue
View file @
a033412d
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"title"
>
考试规则说明
</view>
<view
class=
"title"
>
考试规则说明
</view>
<view
class=
"test"
>
<view
class=
"test"
>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
考试科目:
</text><text
style=
"color: #007AFF;"
>
{{
exam
.
examName
}}
</text>
<text
class=
"left"
>
考试科目:
</text
</view>
><text
style=
"color: #007aff"
>
{{
exam
.
examName
}}
</text>
<view
class=
"text"
>
</view>
<text
class=
"left"
>
合格条件:
</text><text>
{{
exam
.
ruleDisc
}}
</text>
<view
class=
"text"
>
</view>
<text
class=
"left"
>
合格条件:
</text
<view
class=
"text"
>
><text>
{{
exam
.
ruleDisc
}}
</text>
<text
class=
"left"
>
考试时间:
</text><text>
30分钟
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
考试时间:
</text><text>
30分钟
</text>
<text
class=
"left"
>
题目规则:
</text><text>
题库100题,随机抽20题
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
题目规则:
</text
<text
class=
"left"
>
备注说明:
</text><text>
无
</text>
><text>
题库100题,随机抽20题
</text>
</view>
</view>
</view>
<view
class=
"text"
>
<button
@
click=
"aaa"
>
开始考试
</button>
<text
class=
"left"
>
备注说明:
</text><text>
无
</text>
</view>
</view>
</view>
<button
@
click=
"getUserExamId()"
>
开始考试
</button>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
examId
:
1
,
examId
:
2
,
exam
:
null
exam
:
null
,
}
userExamId
:
null
,
},
};
onLoad
()
{
},
this
.
getUserExamInfo
()
onLoad
()
{
},
// this.getUserExamInfo();
methods
:
{
},
aaa
(){
methods
:
{
//申请考试获取userExamId
wx
.
navigateTo
({
getUserExamId
:
function
()
{
var
that
=
this
;
url
:
'./answer'
console
.
log
(
"这是一条消息"
);
})
uni
.
request
({
},
url
:
//获取考试信息
"http://192.168.1.22"
+
getUserExamInfo
:
function
()
{
"/wxh-worker-rest/rest/exam/serviceRule/"
+
that
.
vuex_token
+
uni
.
showLoading
({
"?examId="
+
title
:
'请稍候'
this
.
examId
,
})
method
:
"POST"
,
header
:
{
let
that
=
this
"Content-Type"
:
"application/x-www-from-urlencoded"
,
uni
.
request
({
},
url
:
'https://system.banshouhui.com'
+
'/wxh-worker-rest/rest/exam'
+
success
:
(
res
)
=>
{
'/serviceRule/userExamInfo/'
+
console
.
log
(
"标识符1"
,
res
.
data
);
'RTOKENf86a7c0606ef5ebf36f211ace3466b7f9de56e37'
+
uni
.
hideLoading
();
'?examId='
+
this
.
examId
,
if
(
res
.
data
.
code
==
200
)
{
method
:
'POST'
,
if
(
res
.
data
.
data
.
userExamId
)
{
data
:
{
that
.
userExamId
=
res
.
data
.
data
.
userExamId
;
//examId:this.examId,
console
.
log
(
"这个是个标识符"
,
that
.
userExamId
);
},
}
header
:
{
}
'Content-Type'
:
'application/x-www-form-urlencoded'
},
},
});
success
:
(
res
)
=>
{
setTimeout
(()
=>
{
console
.
log
(
res
.
data
)
wx
.
navigateTo
({
uni
.
hideLoading
()
url
:
"./answer?userExamId="
+
that
.
userExamId
,
if
(
!
res
.
data
)
{
});
return
},
1000
);
}
},
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
},
// uni.navigateTo({
};
// url: '/pages/login/wxlogin'
// })
// return
console
.
log
(
'洪塘张学友'
)
}
if
(
res
.
data
.
code
==
200
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that
.
exam
=
res
.
data
.
data
console
.
log
(
that
.
exam
)
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
that
.
applyExam
()
return
}
if
(
res
.
data
.
data
.
examStatus
==
1
){
console
.
log
(
'111111111111111111111111111'
)
that
.
isComplete
=
true
that
.
examScore
=
res
.
data
.
data
.
examScore
that
.
postResult
()
return
}
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
that
.
userExamId
=
res
.
data
.
data
.
id
that
.
getNext
()
}
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'获取考试信息失败'
})
}
})
},
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.content
{
.content
{
margin
:
187
rpx
80
rpx
;
margin
:
187
rpx
80
rpx
;
}
}
.title
{
font-size
:
17px
;
.title
{
text-align
:
center
;
font-size
:
17px
;
}
text-align
:
center
;
.test
{
}
margin
:
0
0
;
}
.test
{
.left
{
margin
:
0
0
;
margin-right
:
8
rpx
;
}
margin-left
:
68
rpx
;
.left
{
}
margin-right
:
8
rpx
;
.text
{
margin-left
:
68
rpx
;
margin
:
50
rpx
0
;
}
}
button
{
.text
{
width
:
364
rpx
;
margin
:
50
rpx
0
;
height
:
56
rpx
;
}
background
:
#007AFF
;
font-size
:
24
rpx
;
button
{
color
:
#FFFFFF
;
width
:
364
rpx
;
}
height
:
56
rpx
;
background
:
#007aff
;
font-size
:
24
rpx
;
color
:
#ffffff
;
}
</
style
>
</
style
>
src/pages/learn/curriculum.vue
View file @
a033412d
...
@@ -3,30 +3,34 @@
...
@@ -3,30 +3,34 @@
<view
class=
"title"
>
<view
class=
"title"
>
课程简介
课程简介
</view>
</view>
<view
class=
"u-content"
>
<u-parse
:html=
"courseInfo.intro"
></u-parse>
</view>
<view
class=
"lecturer"
>
<view
class=
"lecturer"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
<view
class=
""
v-if=
"courseInfo.isTeachers"
>
讲师
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
</view>
讲师
<view
class=
""
style=
"display: flex;"
>
</view>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
""
style=
"display: flex;"
>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
扳手卢老师
</view>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
{{
courseInfo
.
teacher
.
name
}}
</view>
</view>
</view>
</view>
<view
class=
""
style=
"margin: 36rpx 0;"
>
<view
class=
""
style=
"margin: 36rpx 0;"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight:1000"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight:1000"
>
目录
目录
</view>
</view>
<view
v-for=
"
item
in list"
>
<view
v-for=
"
(item,index)
in list"
>
<view
class=
"chapter"
>
<view
class=
"chapter"
>
{{
item
.
name
}}
{{
item
.
name
}}
</view>
</view>
<view
class=
"video"
v-for=
"
key in item.section"
@
click=
details(key
.id)
>
<view
class=
"video"
v-for=
"
(section,key) in item.section"
@
click=
details(section
.id)
>
<view
class=
"video_1"
>
<view
class=
"video_1"
>
<view
class=
"text"
v-text=
"wareType(key.ware)"
>
<view
class=
"text"
v-text=
"wareType(section.ware)"
>
</view>
</view>
<text
>
1-
{{
key
.
order
}}
</text>
<text
class=
"texts"
>
{{
index
+
1
}}
-
{{
key
+
1
}}
</text>
<text
class=
"text2"
>
{{
key
.
name
}}
</text>
<text
class=
"text2"
>
{{
section
.
name
}}
</text>
<text
class=
"text3"
v-text=
"
key
.isLearned==false?'未开始':'完成'"
></text>
<text
class=
"text3"
v-text=
"
section
.isLearned==false?'未开始':'完成'"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -45,6 +49,11 @@
...
@@ -45,6 +49,11 @@
},
},
list
:[],
list
:[],
examId
:
1
,
examId
:
1
,
courseInfo
:
{
intro
:
''
,
isTeachers
:
false
,
teacher
:
{}
}
}
}
},
},
onLoad
(
a
){
onLoad
(
a
){
...
@@ -52,8 +61,31 @@
...
@@ -52,8 +61,31 @@
this
.
params
.
course_id
=
a
.
course_id
this
.
params
.
course_id
=
a
.
course_id
console
.
log
(
this
.
params
.
course_id
)
console
.
log
(
this
.
params
.
course_id
)
this
.
getCapterDetails
()
this
.
getCapterDetails
()
this
.
getCourseInfo
()
},
},
methods
:
{
methods
:
{
getCourseInfo
()
{
let
param
=
{
course_id
:
this
.
params
.
course_id
};
this
.
$u
.
api
.
CourseList
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courseInfo
.
intro
=
res
.
data
.
course
.
intro
;
this
.
courseInfo
.
isTeachers
=
res
.
data
.
course
.
teachers
.
length
>
0
;
this
.
courseInfo
.
teacher
=
this
.
courseInfo
.
isTeachers
?
res
.
data
.
course
.
teachers
[
0
]
:
{};
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
});
},
//获取章节详情
//获取章节详情
getCapterDetails
()
{
getCapterDetails
()
{
console
.
log
(
'获取章节详情'
)
console
.
log
(
'获取章节详情'
)
...
@@ -133,7 +165,7 @@
...
@@ -133,7 +165,7 @@
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.title
{
.title
{
height
:
1
64rpx
;
height
:
64rpx
;
font-size
:
40rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
margin
:
24rpx
34rpx
;
margin
:
24rpx
34rpx
;
...
@@ -158,6 +190,12 @@
...
@@ -158,6 +190,12 @@
margin
:
20rpx
0
;
margin
:
20rpx
0
;
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
.texts
{
border
:
1px
solid
#8F8F94
;
text-align
:
center
;
line-height
:
38rpx
;
margin-right
:
5rpx
;
}
.text
{
.text
{
width
:
100rpx
;
width
:
100rpx
;
height
:
38rpx
;
height
:
38rpx
;
...
@@ -179,4 +217,7 @@
...
@@ -179,4 +217,7 @@
right
:
0
;
right
:
0
;
}
}
}
}
.u-content
{
padding
:
0rpx
34rpx
;
}
</
style
>
</
style
>
src/pages/learn/index.vue
View file @
a033412d
<
template
>
<
template
>
<view
class=
"study"
>
<view
class=
"study"
>
<u-navbar
:is-back=
"false"
background=
"
{background: transparent}" :border-bottom="false" :is-fixed="false">
<u-navbar
<text
class=
"title-view"
>
学习
</text>
:is-back=
"false"
</u-navbar>
background=
"
{background: transparent}"
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
:border-bottom="false"
<!--
<u-tabs
:list=
"tabs"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
></u-tabs>
-->
:is-fixed="false"
<view>
>
<u-tabs-swiper
bg-color=
"#F4F5F7"
inactive-color=
"#999999"
font-size=
"28"
ref=
"uTabs"
:list=
"tabs"
<text
class=
"title-view"
>
学习
</text>
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</u-navbar>
</view>
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
<view>
style=
"height: 755rpx;"
>
<u-tabs-swiper
<swiper-item
class=
"swiper-item"
>
bg-color=
"#F4F5F7"
<scroll-view
scroll-y
style=
"height:796rpx;width:100%;"
@
scrolltolower=
"onreachBottom"
>
inactive-color=
"#999999"
<view
class=
"standard"
@
click=
"goToPrint"
>
font-size=
"28"
<text>
充电桩交付规范
</text>
ref=
"uTabs"
<text>
>
</text>
:list=
"tabs"
</view>
:current=
"current"
</scroll-view>
@
change=
"tabsChange"
</swiper-item>
:is-scroll=
"false"
<swiper-item
class=
"swiper-item"
>
swiperWidth=
"750"
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
></u-tabs-swiper>
<view
v-for=
"item in list"
:key=
"item.id"
class=
"notice"
@
click=
"bbb(item)"
>
</view>
<view
class=
"n-head"
>
<swiper
《
{{
item
.
title
}}
》
:current=
"swiperCurrent"
</view>
@
transition=
"transition"
<view
class=
"news"
v-html=
"item.body"
>
@
animationfinish=
"animationfinish"
{{
item
.
body
}}
style=
"height: 755rpx"
</view>
>
</view>
<swiper-item
class=
"swiper-item"
>
<view
v-shou=
"isLoadMore"
>
<scroll-view
<u-loadmore
:status=
"loadStatus"
/>
scroll-y
</view>
style=
"height: 796rpx; width: 100%"
</scroll-view>
@
scrolltolower=
"onreachBottom"
</swiper-item>
>
<swiper-item
class=
"swiper-item"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
>
<text>
充电桩交付规范
</text>
<view
class=
"lean"
>
<text>
>
</text>
<view
class=
"top"
>
</view>
<view
class=
"currency-class"
>
</scroll-view>
<view
class=
"title"
>
通用课程
</view>
</swiper-item>
<view
class=
"class1"
@
click=
ccc(courselist[0].id)
>
<swiper-item
class=
"swiper-item"
>
<image
class=
"img"
:src=
courselist[0].pic
mode=
""
></image>
<scroll-view
<view
class=
"right"
>
scroll-y
<view
class=
""
>
style=
"height: 100%; width: 100%"
{{
courselist
[
0
].
title
}}
@
scrolltolower=
"onreachBottom"
</view>
>
<view
class=
"intro"
>
<view
{{
courselist
[
0
].
desc
}}
v-for=
"item in list"
</view>
:key=
"item.id"
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
class=
"notice"
<u-line-progress
active-color=
"#2979ff"
@
click=
"bbb(item)"
:percent=
courselist[0].percent
style=
"width:54%;"
>
>
</u-line-progress>
<view
class=
"n-head"
>
《
{{
item
.
title
}}
》
</view>
<text
v-text=
"courselist[0].status"
></text>
<view
class=
"news"
v-html=
"item.body"
>
</view>
{{
item
.
body
}}
</view>
</view>
</view>
</view>
<view
class=
"class1"
@
click=
ccc(courselist[1].id)
>
<view
v-shou=
"isLoadMore"
>
<image
class=
"img"
:src=
courselist[1].pic
mode=
""
></image>
<u-loadmore
:status=
"loadStatus"
/>
<view
class=
"right"
>
</view>
<view
class=
""
>
</scroll-view>
{{
courselist
[
1
].
title
}}
</swiper-item>
</view>
<swiper-item
class=
"swiper-item"
>
<view
class=
""
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
>
{{
courselist
[
1
].
desc
}}
<view
class=
"lean"
>
</view>
<view
class=
"top"
>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
class=
"currency-class"
>
<u-line-progress
active-color=
"#2979ff"
<view
class=
"title"
>
通用课程
</view>
:percent=
"courselist[1].percent"
style=
"width:54%;"
>
<view
</u-line-progress>
class=
"class1"
<text
v-text=
"courselist[1].status"
></text>
@
click=
"ccc(courselist[0].id)"
</view>
>
</view>
<image
</view>
class=
"img"
</view>
:src=
"courselist[0].pic"
<view
class=
"currency-class"
>
mode=
""
<view
class=
"title"
>
技能课程
</view>
></image>
<view
class=
"class1"
@
click=
ccc(courselist[2].id)
>
<view
class=
"right"
>
<image
class=
"img"
:src=
courselist[2].pic
mode=
""
></image>
<view
class=
""
>
<view
class=
"right"
>
{{
courselist
[
0
].
title
}}
<view
class=
""
>
</view>
{{
courselist
[
2
].
title
}}
<view
class=
"intro"
>
</view>
{{
courselist
[
0
].
desc
}}
<view
class=
""
>
</view>
{{
courselist
[
2
].
desc
}}
<view
</view>
class=
""
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
style=
"
<u-line-progress
active-color=
"#2979ff"
display: flex;
:percent=
"courselist[2].percent"
style=
"width:54%;"
>
justify-content: space-between;
</u-line-progress>
"
<text
v-text=
"courselist[2].status"
></text>
>
</view>
<u-line-progress
</view>
active-color=
"#2979ff"
</view>
:percent=
"courselist[0].percent"
</view>
style=
"width: 54%"
</view>
>
</view>
</u-line-progress>
</scroll-view>
<text
</swiper-item>
v-text=
"courselist[0].status"
<swiper-item>
></text>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
</view>
<view
class=
"lean"
>
</view>
<view
class=
"top"
>
</view>
<view
class=
"currency-class"
>
<view
<text
class=
"title"
>
通用认证
</text>
class=
"class1"
<view
class=
"class1"
@
click=
"aaa"
>
@
click=
"ccc(courselist[1].id)"
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
>
<view
class=
"right"
>
<image
<view
class=
""
>
class=
"img"
服务规范
:src=
"courselist[1].pic"
</view>
mode=
""
<view
class=
""
>
></image>
通过本认证,是接单的前提条件
<view
class=
"right"
>
</view>
<view
class=
""
>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
{{
courselist
[
1
].
title
}}
<text
style=
"color: #a69999;"
>
随机20题,及格20题
</text>
</view>
<text>
通过
</text>
<view
class=
""
>
</view>
{{
courselist
[
1
].
desc
}}
</view>
</view>
</view>
<view
<view
class=
"class1"
@
click=
"aaa"
>
class=
""
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
style=
"
<view
class=
"right"
>
display: flex;
<view
class=
""
>
justify-content: space-between;
接单操作
"
</view>
>
<view
class=
""
>
<u-line-progress
快速认证,是否具备接单操作能力
active-color=
"#2979ff"
</view>
:percent=
"courselist[1].percent"
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
style=
"width: 54%"
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text>
>
<text>
未通过
</text>
</u-line-progress>
</view>
<text
</view>
v-text=
"courselist[1].status"
</view>
></text>
</view>
</view>
<view
class=
"currency-class"
>
</view>
<text
class=
"title"
>
技能认证
</text>
</view>
<view
class=
"class1"
@
click=
"aaa"
>
</view>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"currency-class"
>
<view
class=
"right"
>
<view
class=
"title"
>
技能课程
</view>
<view
class=
""
>
<view
从0-1学习充电桩安装服务
class=
"class1"
</view>
@
click=
"ccc(courselist[2].id)"
<view
class=
""
>
>
通过本认证后,可接充电桩业务单
<image
</view>
class=
"img"
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
:src=
"courselist[2].pic"
<text
style=
"color: #a69999;"
>
随机30题,及格25题
</text>
mode=
""
<text>
未通过
</text>
></image>
</view>
<view
class=
"right"
>
</view>
<view
class=
""
>
</view>
{{
courselist
[
2
].
title
}}
</view>
</view>
</view>
<view
class=
""
>
</view>
{{
courselist
[
2
].
desc
}}
</scroll-view>
</view>
</swiper-item>
<view
</swiper>
class=
""
</view>
style=
"
</view>
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[2].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[2].status"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"lean"
>
<view
class=
"top"
>
<view
class=
"currency-class"
>
<text
class=
"title"
>
通用认证
</text>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
服务规范
</view>
<view
class=
""
>
通过本认证,是接单的前提条件
</view>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机20题,及格20题
</text
>
<text>
通过
</text>
</view>
</view>
</view>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
接单操作
</view>
<view
class=
""
>
快速认证,是否具备接单操作能力
</view>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text
>
<text>
未通过
</text>
</view>
</view>
</view>
</view>
<view
class=
"currency-class"
>
<text
class=
"title"
>
技能认证
</text>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
从0-1学习充电桩安装服务
</view>
<view
class=
""
>
通过本认证后,可接充电桩业务单
</view>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机30题,及格25题
</text
>
<text>
未通过
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
msg
:
"赣南吴彦祖"
,
msg
:
"赣南吴彦祖"
,
tabs
:
[{
tabs
:
[
name
:
"交付规范"
,
{
},
name
:
"交付规范"
,
{
},
name
:
"培训通知"
,
{
},
name
:
"培训通知"
,
{
},
name
:
"在线学习"
,
{
},
name
:
"在线学习"
,
{
},
name
:
"考核认证"
,
{
},
name
:
"考核认证"
,
],
},
current
:
0
,
],
swiperCurrent
:
0
,
current
:
0
,
params
:
{
swiperCurrent
:
0
,
start
:
0
,
params
:
{
},
start
:
0
,
list
:
[],
},
courselist
:
[{
list
:
[],
title
:
'服务规范'
,
courselist
:
[
desc
:
'为用户提供更好服务,自己赚更多钱'
,
{
percent
:
0
,
title
:
"服务规范"
,
status
:
''
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
pic
:
'http://deimg.c.xixia.cc/preview/f5/e7/0e/Pbm9Q3V5ymTn8VeK0521.png'
,
percent
:
0
,
id
:
173
status
:
""
,
},
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan1@3x.png"
,
{
id
:
173
,
title
:
'接单操作'
,
},
desc
:
'快速学习,使用APP 接单、抢单'
,
{
percent
:
0
,
title
:
"接单操作"
,
status
:
''
,
desc
:
"快速学习,使用APP 接单、抢单"
,
pic
:
'http://deimg.c.xixia.cc/preview/f5/e7/0e/Pbm9Q3V5ymTn8VeK0521.png'
,
percent
:
0
,
id
:
173
status
:
""
,
},
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan2@3x.png"
,
{
id
:
173
,
title
:
'从0-1学习充电桩安装服务'
,
},
desc
:
'让你全面了解充电桩市场及服务规范'
,
{
percent
:
0
,
title
:
"从0-1学习充电桩安装服务"
,
status
:
''
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
pic
:
'http://deimg.c.xixia.cc/preview/f5/e7/0e/Pbm9Q3V5ymTn8VeK0521.png'
,
percent
:
0
,
id
:
173
status
:
""
,
}
pic
:
process
.
uniEnv
.
qn_base_url
+
"kecehng1@3x.png"
,
],
id
:
173
,
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
},
isLoadMore
:
false
,
//是否加载中
],
course_id
:
"course_id_=173"
,
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
exam
:
null
,
isLoadMore
:
false
,
//是否加载中
};
course_id
:
"course_id_=173"
,
},
exam
:
null
,
onLoad
()
{
};
// this.getList();
},
// this.getCourseList();
onLoad
()
{
// this.getUserExamInfo();
// this.getList();
},
// this.getCourseList();
computed
:
{
// this.getUserExamInfo();
bannerImage
()
{
},
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx.png"
;
computed
:
{
},
bannerImage
()
{
},
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx@3x.png"
;
methods
:
{
},
getList
()
{
},
this
.
$u
.
api
methods
:
{
.
getTrainingNoticeList
(
this
.
params
)
getList
()
{
.
then
((
res
)
=>
{
this
.
$u
.
api
if
(
res
.
code
==
200
)
{
.
getTrainingNoticeList
(
this
.
params
)
if
(
res
.
data
)
{
.
then
((
res
)
=>
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
length
<
5
)
{
if
(
res
.
data
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
this
.
isLoadMore
=
true
;
if
(
res
.
data
.
length
<
5
)
{
this
.
loadStatus
=
"nomore"
;
//判断接口返回数据量小于请求数据量,则表示此为最后一页
}
else
{
this
.
isLoadMore
=
true
;
this
.
isLoadMore
=
false
;
this
.
loadStatus
=
"nomore"
;
}
}
else
{
}
else
{
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
true
;
}
this
.
loadStatus
=
"nomore"
;
}
else
{
}
this
.
isLoadMore
=
true
;
}
else
{
this
.
loadStatus
=
"nomore"
;
//接口请求失败的处理
}
uni
.
showToast
({
}
else
{
title
:
res
.
message
,
//接口请求失败的处理
icon
:
"none"
,
uni
.
showToast
({
});
title
:
res
.
message
,
this
.
isLoadMore
=
false
;
icon
:
"none"
,
if
(
this
.
params
.
start
>
0
)
{
});
this
.
page
-=
5
;
this
.
isLoadMore
=
false
;
}
if
(
this
.
params
.
start
>
0
)
{
}
this
.
page
-=
5
;
})
}
.
catch
((
err
)
=>
{
}
uni
.
showToast
({
})
title
:
err
,
.
catch
((
err
)
=>
{
icon
:
"none"
,
uni
.
showToast
({
});
title
:
err
,
this
.
isLoadMore
=
false
;
icon
:
"none"
,
if
(
this
.
params
.
start
>
0
)
{
});
this
.
page
-=
5
;
this
.
isLoadMore
=
false
;
}
if
(
this
.
params
.
start
>
0
)
{
});
this
.
page
-=
5
;
},
}
getTypeName
(
percent
){
});
if
(
percent
==
0
){
},
return
'未开始'
;
getTypeName
(
percent
)
{
}
else
if
(
percent
==
'100'
){
if
(
percent
==
0
)
{
return
'已完成'
;
return
"未开始"
;
}
else
{
}
else
if
(
percent
==
"100"
)
{
return
'继续'
;
return
"已完成"
;
}
}
else
{
},
return
"继续"
;
//在线学习通用课程信息
}
getCourseList
()
{
},
let
courseLength
=
this
.
courselist
.
length
;
//在线学习通用课程信息
for
(
let
i
=
0
;
i
<
courseLength
;
i
++
){
getCourseList
()
{
let
param
=
{
let
courseLength
=
this
.
courselist
.
length
;
course_id
:
this
.
courselist
[
i
].
id
for
(
let
i
=
0
;
i
<
courseLength
;
i
++
)
{
};
let
param
=
{
this
.
$u
.
api
course_id
:
this
.
courselist
[
i
].
id
,
.
CourseList
(
param
)
};
.
then
((
res
)
=>
{
this
.
$u
.
api
if
(
res
.
code
==
200
)
{
.
CourseList
(
param
)
if
(
res
.
data
)
{
.
then
((
res
)
=>
{
this
.
courselist
[
i
].
status
=
this
.
getTypeName
(
res
.
data
.
learnedInfo
.
learnPercent
);
if
(
res
.
code
==
200
)
{
this
.
courselist
[
i
].
percent
=
res
.
data
.
learnedInfo
.
learnPercent
;
if
(
res
.
data
)
{
}
this
.
courselist
[
i
].
status
=
this
.
getTypeName
(
}
res
.
data
.
learnedInfo
.
learnPercent
})
);
.
catch
((
err
)
=>
{
this
.
courselist
[
i
].
percent
=
uni
.
showToast
({
res
.
data
.
learnedInfo
.
learnPercent
;
title
:
err
,
}
icon
:
"none"
,
}
});
})
});
.
catch
((
err
)
=>
{
}
uni
.
showToast
({
},
title
:
err
,
//tabs通知swiper切换
icon
:
"none"
,
tabsChange
(
index
)
{
});
this
.
swiperCurrent
=
index
;
});
switch
(
index
)
{
}
case
1
:
},
this
.
params
.
start
=
0
;
//tabs通知swiper切换
this
.
list
=
[];
tabsChange
(
index
)
{
this
.
getList
();
this
.
swiperCurrent
=
index
;
break
;
switch
(
index
)
{
case
2
:
case
1
:
this
.
getCourseList
();
this
.
params
.
start
=
0
;
console
.
log
(
'重新加载学习进度'
);
this
.
list
=
[];
break
;
this
.
getList
();
case
3
:
break
;
this
.
getUserExamInfo
();
case
2
:
break
;
this
.
getCourseList
();
}
console
.
log
(
"重新加载学习进度"
);
},
break
;
//swiper-item左右移动,通知tabs的滑块跟随移动
case
3
:
transition
(
e
)
{
this
.
getUserExamInfo
();
let
dx
=
e
.
detail
.
dx
;
break
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
}
},
},
animationfinish
(
e
)
{
//swiper-item左右移动,通知tabs的滑块跟随移动
let
current
=
e
.
detail
.
current
;
transition
(
e
)
{
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
let
dx
=
e
.
detail
.
dx
;
this
.
swiperCurrent
=
current
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
this
.
current
=
current
;
},
},
animationfinish
(
e
)
{
//跳转到assessment页面
let
current
=
e
.
detail
.
current
;
aaa
()
{
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
wx
.
navigateTo
({
this
.
swiperCurrent
=
current
;
url
:
"./assessment"
,
this
.
current
=
current
;
});
},
},
//跳转到assessment页面
//跳转到课程介绍
aaa
()
{
ccc
(
id
)
{
var
id
=
this
.
exam
.
id
;
uni
.
navigateTo
({
if
(
this
.
exam
.
examStatus
==
0
)
{
url
:
"./curriculum?course_id="
+
id
,
console
.
log
(
"这是个标识符"
,
this
.
exam
.
id
);
});
},
//跳转到
bbb
(
e
)
{
var
news
=
{
body
:
e
.
body
,
id
:
e
.
id
,
level
:
e
.
level
,
title
:
e
.
title
,
};
// console.log(news)
uni
.
navigateTo
({
wx
.
navigateTo
({
url
:
"./news-details"
,
url
:
"./answer?userExamId="
+
id
,
});
});
setTimeout
(()
=>
{
}
else
if
(
this
.
exam
.
examStatus
==
1
)
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
wx
.
navigateTo
({
},
500
);
url
:
"./result?userExamId="
+
id
,
});
}
else
if
(
this
.
exam
.
examStatus
==
2
)
{
wx
.
navigateTo
({
url
:
"./assessment"
,
});
}
},
//跳转到课程介绍
ccc
(
id
)
{
uni
.
navigateTo
({
url
:
"./curriculum?course_id="
+
id
,
});
},
//跳转到
bbb
(
e
)
{
var
news
=
{
body
:
e
.
body
,
id
:
e
.
id
,
level
:
e
.
level
,
title
:
e
.
title
,
};
// console.log(news)
console
.
log
(
"跳转结束11111111"
);
uni
.
navigateTo
({
},
url
:
"./news-details"
,
//scroll-view到底部加载更多
});
onreachBottom
()
{
setTimeout
(()
=>
{
console
.
log
(
"上拉触底函数"
);
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
//上拉触底函数
},
500
);
if
(
!
this
.
isLoadMore
)
{
this
.
isLoadMore
=
true
;
this
.
params
.
start
+=
5
;
if
(
this
.
loadStatus
!==
"nomore"
)
{
this
.
getList
();
}
}
},
//跳转到拍照小程序首页
goToPrint
()
{
console
.
log
(
"111111"
);
uni
.
navigateToMiniProgram
({
appId
:
"wxd1d6eede324b0465"
,
success
(
res
)
{
//打开成功
console
.
log
(
"success"
,
res
);
},
fail
(
err
)
{
console
.
log
(
"err"
,
err
);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo
()
{
uni
.
showLoading
({
title
:
"请稍候"
,
});
let
that
=
this
;
console
.
log
(
"跳转结束11111111"
);
uni
.
request
({
},
url
:
"http://192.168.1.22"
+
//scroll-view到底部加载更多
"/wxh-worker-rest/rest/exam"
+
onreachBottom
()
{
"/serviceRule/userExamInfo/"
+
console
.
log
(
"上拉触底函数"
);
getApp
().
globalData
.
token
+
//上拉触底函数
"?examId="
+
if
(
!
this
.
isLoadMore
)
{
2
,
this
.
isLoadMore
=
true
;
method
:
"POST"
,
this
.
params
.
start
+=
5
;
data
:
{
if
(
this
.
loadStatus
!==
"nomore"
)
{
//examId:this.examId,
this
.
getList
();
},
}
header
:
{
}
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
},
//跳转到拍照小程序首页
success
:
(
res
)
=>
{
goToPrint
()
{
console
.
log
(
res
.
data
);
console
.
log
(
"111111"
);
uni
.
hideLoading
();
uni
.
navigateToMiniProgram
({
if
(
!
res
.
data
)
{
appId
:
"wxd1d6eede324b0465"
,
return
;
success
(
res
)
{
}
//打开成功
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
console
.
log
(
"success"
,
res
);
// uni.navigateTo({
},
// url: '/pages/login/wxlogin'
fail
(
err
)
{
// })
console
.
log
(
"err"
,
err
);
// return
},
console
.
log
(
"洪塘张学友"
);
});
}
},
if
(
res
.
data
.
code
==
200
)
{
//考核认证,通用认证,考试通过or未通过查询接口请求
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
getUserExamInfo
()
{
that
.
exam
=
res
.
data
.
data
;
uni
.
showLoading
({
console
.
log
(
that
.
exam
);
title
:
"请稍候"
,
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
});
that
.
applyExam
();
return
;
let
that
=
this
;
}
uni
.
request
({
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
url
:
console
.
log
(
"111111111111111111111111111"
);
"http://192.168.1.22"
+
that
.
isComplete
=
true
;
"/wxh-worker-rest/rest/exam"
+
that
.
examScore
=
res
.
data
.
data
.
examScore
;
"/serviceRule/userExamInfo/"
+
that
.
postResult
();
that
.
vuex_token
+
return
;
"?examId="
+
}
2
,
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
method
:
"POST"
,
that
.
userExamId
=
res
.
data
.
data
.
id
;
data
:
{
that
.
getNext
();
//examId:this.examId,
}
},
}
else
{
header
:
{
uni
.
showToast
({
"Content-Type"
:
"application/x-www-form-urlencoded"
,
icon
:
"none"
,
},
title
:
res
.
data
.
message
,
success
:
(
res
)
=>
{
});
console
.
log
(
res
.
data
);
}
uni
.
hideLoading
();
},
if
(
!
res
.
data
)
{
fail
:
(
e
)
=>
{
return
;
uni
.
hideLoading
();
}
uni
.
showToast
({
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
icon
:
"none"
,
// uni.navigateTo({
title
:
"获取考试信息失败"
,
// url: '/pages/login/wxlogin'
});
// })
},
// return
});
console
.
log
(
"洪塘张学友"
);
},
}
},
if
(
res
.
data
.
code
==
200
)
{
};
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that
.
exam
=
res
.
data
.
data
;
console
.
log
(
that
.
exam
);
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
that
.
applyExam
();
return
;
}
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
console
.
log
(
"111111111111111111111111111"
);
that
.
isComplete
=
true
;
that
.
examScore
=
res
.
data
.
data
.
examScore
;
that
.
postResult
();
return
;
}
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
that
.
userExamId
=
res
.
data
.
data
.
id
;
that
.
getNext
();
}
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
res
.
data
.
message
,
});
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
},
});
},
},
};
</
script
>
</
script
>
<
style
>
<
style
>
.study
{
.study
{
height
:
100vh
;
height
:
100vh
;
background-color
:
#f4f5f7
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
}
.title-view
{
.title-view
{
color
:
#333333
;
color
:
#333333
;
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
40
rpx
;
font-size
:
40
rpx
;
}
}
.banner
{
.banner
{
width
:
690
rpx
;
width
:
690
rpx
;
height
:
240
rpx
;
height
:
240
rpx
;
/* margin-left: -15rpx; */
margin-top
:
10
rpx
;
}
}
/* //交付规范 */
/* //交付规范 */
.standard
{
.standard
{
width
:
656
rpx
;
width
:
656
rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
border-bottom
:
1
rpx
solid
#82848a
;
border-bottom
:
1
rpx
solid
#82848a
;
padding
:
0
34
rpx
;
padding
:
0
34
rpx
;
margin
:
72
rpx
auto
;
margin
:
72
rpx
auto
;
}
}
/* //培训通知 */
/* //培训通知 */
.notice
{
.notice
{
border
:
#808080
solid
2
rpx
;
border
:
#808080
solid
2
rpx
;
width
:
100%
;
width
:
100%
;
height
:
400
rpx
;
height
:
400
rpx
;
margin-top
:
36
rpx
;
margin-top
:
36
rpx
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.n-head
{
.n-head
{
text-align
:
center
;
text-align
:
center
;
margin
:
32
rpx
0
;
margin
:
32
rpx
0
;
}
}
.news
{}
.news
{
}
/* //在线学习 */
/* //在线学习 */
.currency-class
{
.currency-class
{
width
:
100%
;
width
:
100%
;
background
:
#ffffff
;
background
:
#ffffff
;
padding
:
18
rpx
;
padding
:
18
rpx
;
margin-bottom
:
11px
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
border-radius
:
12
rpx
;
}
}
.title
{
.title
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
}
.class1
{
.class1
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding-top
:
22
rpx
;
padding-top
:
22
rpx
;
margin-top
:
28
rpx
;
margin-top
:
28
rpx
;
border-top
:
1
rpx
solid
#808080
;
border-top
:
1
rpx
solid
#808080
;
}
}
.img
{
.img
{
width
:
201
rpx
;
width
:
201
rpx
;
height
:
201
rpx
;
height
:
201
rpx
;
display
:
block
;
display
:
block
;
margin-right
:
0
rpx
;
margin-right
:
0
rpx
;
}
}
.right
{
.right
{
width
:
428
rpx
;
width
:
428
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.intro
{
.intro
{
color
:
#9999a6
;
color
:
#9999a6
;
}
}
.tab
{
.tab
{
background
:
#fff
;
background
:
#fff
;
height
:
82
rpx
;
height
:
82
rpx
;
margin
:
0
0
;
margin
:
0
0
;
}
}
.text
{
.text
{
margin
:
0
40
rpx
;
margin
:
0
40
rpx
;
line-height
:
82
rpx
;
line-height
:
82
rpx
;
color
:
#667eb5
;
color
:
#667eb5
;
}
}
.content
{
.content
{
margin
:
5px
0
;
margin
:
5px
0
;
height
:
485
rpx
;
height
:
485
rpx
;
background
:
#fff
;
background
:
#fff
;
}
}
swiper
{
swiper
{
height
:
691
rpx
;
height
:
691
rpx
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/learn/result.vue
View file @
a033412d
<
template
>
<
template
>
<view
class=
"test-result"
>
<view
class=
"test-result"
>
<text
class=
"title"
>
考试结果
</text>
<text
class=
"title"
>
考试结果
</text>
<view
class=
"result"
>
<view
class=
"result"
>
{{
text
}}
</view>
未通过
<view
class=
"test-explain"
>
</view>
<view
class=
"hang"
>
<view
class=
"test-explain"
>
<text
class=
"text1"
>
合格条件:
</text
<view
class=
"hang"
>
><text
class=
"text2"
>
答对20题
</text>
<text
class=
"text1"
>
合格条件:
</text><text
class=
"text2"
>
答对20题
</text>
</view>
</view>
<view
class=
"hang"
>
<view
class=
"hang"
>
<text
class=
"text1"
>
考试结果:
</text
<text
class=
"text1"
>
考试结果:
</text><text
class=
"text2"
>
答对10题
</text>
><text
class=
"text2"
>
答对10题
</text>
</view>
</view>
<view
class=
"hang"
>
<view
class=
"hang"
>
<text
class=
"text1"
>
考试用时:
</text><text
class=
"text2"
>
16分29秒
</text>
<text
class=
"text1"
>
考试用时:
</text
</view>
><text
class=
"text2"
>
16分29秒
</text>
</view>
</view>
<view
class=
"btn"
>
</view>
<button
class=
"btn1"
>
再答一次
</button>
<view
class=
"btn"
>
<button
class=
"btn2"
>
退出重考
</button>
<button
class=
"btn1"
@
click=
"getAgain()"
>
再答一次
</button>
</view>
<button
class=
"btn2"
@
click=
"toIndex"
>
下次再考
</button>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
text
:
""
,
}
examId
:
2
,
},
result
:
null
,
methods
:
{
userExamId
:
null
,
};
}
},
}
onLoad
(
a
)
{
this
.
userExamId
=
a
.
userExamId
;
console
.
log
(
"userExamId是"
,
this
.
userExamId
);
this
.
nextClick
();
},
onUnload
()
{
wx
.
reLaunch
({
url
:
"./index"
,
});
},
methods
:
{
//考试结果
nextClick
:
function
()
{
console
.
log
(
"wwwwwwwwww"
);
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
this
.
result
=
res
.
data
.
data
;
this
.
text
=
res
.
data
.
data
.
examLevelResult
;
console
.
log
(
"标识符55"
,
this
.
result
);
},
});
},
//再次考试
getAgain
:
function
()
{
wx
.
navigateTo
({
url
:
"./assessment"
,
});
},
//下次再考跳转到学习主界面页面
toIndex
:
function
()
{
wx
.
reLaunch
({
url
:
"./index"
,
});
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.test-result
{
.test-result
{
width
:
610rpx
;
width
:
610rpx
;
height
:
965rpx
;
height
:
965rpx
;
margin
:
70rpx
auto
0
;
margin
:
70rpx
auto
0
;
.title
{
.title
{
margin
:
0
44rpx
0
;
margin
:
0
44rpx
0
;
}
}
.result
{
.result
{
color
:
red
;
color
:
red
;
font-size
:
66rpx
;
font-size
:
66rpx
;
text-align
:
center
;
text-align
:
center
;
border-bottom
:
1px
dashed
#000000
;
border-bottom
:
1px
dashed
#000000
;
margin
:
74rpx
0
;
margin
:
74rpx
0
;
padding
:
66rpx
;
padding
:
66rpx
;
}
}
.test-explain
{
.test-explain
{
.hang
{
.hang
{
margin
:
26rpx
26rpx
;
margin
:
26rpx
26rpx
;
.text1
{
.text1
{
color
:
#a69999
;
color
:
#a69999
;
margin-right
:
22rpx
;
margin-right
:
22rpx
;
}
}
.text2
{
.text2
{
color
:
#333333
;
color
:
#333333
;
}
}
}
}
}
}
.btn
{
.btn
{
margin-top
:
236rpx
;
margin-top
:
236rpx
;
.btn1
{
.btn1
{
width
:
478rpx
;
width
:
478rpx
;
height
:
60rpx
;
height
:
60rpx
;
background
:
#0079fe
;
background
:
#0079fe
;
color
:
#fff
;
color
:
#fff
;
font-size
:
26rpx
;
font-size
:
26rpx
;
line-height
:
60rpx
;
line-height
:
60rpx
;
margin
:
20rpx
auto
;
margin
:
20rpx
auto
;
}
}
.btn2
{
.btn2
{
width
:
478rpx
;
width
:
478rpx
;
height
:
60rpx
;
height
:
60rpx
;
background
:
#f2f2f2
;
background
:
#f2f2f2
;
color
:
#333333
;
color
:
#333333
;
font-size
:
26rpx
;
font-size
:
26rpx
;
line-height
:
60rpx
;
line-height
:
60rpx
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
}
}
}
}
</
style
>
</
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