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
2cbcea04
Commit
2cbcea04
authored
Apr 28, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
aa3c83d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
541 additions
and
428 deletions
+541
-428
.env.dev.js
.env.dev.js
+0
-13
index.vue
src/pages/learn/index.vue
+541
-415
No files found.
.env.dev.js
deleted
100644 → 0
View file @
aa3c83d8
const
UNI_APP
=
{
ucenterUrl
:
{
apiUrl
:
'http://rest-u.yunya.com'
,
//php端域名请求头
xueUrl
:
'http://xue.yunya.com'
,
//学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl
:
{
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl
:
'http://apidoc.banshouhui.com:3000/mock/31'
,
// mock端域名请求头
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
}
module
.
exports
=
UNI_APP
;
src/pages/learn/index.vue
View file @
2cbcea04
<
template
>
<view
class=
"study"
>
<u-navbar
:is-back=
"false"
background=
"
{background: transparent}" :border-bottom="false" :is-fixed="false">
<u-navbar
:is-back=
"false"
background=
"
{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text
class=
"title-view"
>
学习
</text>
</u-navbar>
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
<view>
<u-tabs-swiper
bg-color=
"#F4F5F7"
inactive-color=
"#999999"
font-size=
"28"
ref=
"uTabs"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
<u-tabs-swiper
bg-color=
"#F4F5F7"
inactive-color=
"#999999"
font-size=
"28"
ref=
"uTabs"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx;"
>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:796rpx;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<scroll-view
scroll-y
style=
"height: 796rpx; width: 100%"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
<text>
充电桩交付规范
</text>
<text>
>
</text>
...
...
@@ -19,13 +41,20 @@
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<view
v-for=
"item in list"
:key=
"item.id"
class=
"notice"
@
click=
"bbb(item)"
>
<view
class=
"n-head"
>
《
{{
item
.
title
}}
》
</view>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"onreachBottom"
>
<view
v-for=
"item in list"
:key=
"item.id"
class=
"notice"
@
click=
"bbb(item)"
>
<view
class=
"n-head"
>
《
{{
item
.
title
}}
》
</view>
<view
class=
"news"
v-html=
"item.body"
>
{{
item
.
body
}}
{{
item
.
body
}}
</view>
</view>
<view
v-shou=
"isLoadMore"
>
...
...
@@ -34,13 +63,20 @@
</scroll-view>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:
100%;width:100%;
"
>
<scroll-view
scroll-y
style=
"height:
100%; width: 100%
"
>
<view
class=
"lean"
>
<view
class=
"top"
>
<view
class=
"currency-class"
>
<view
class=
"title"
>
通用课程
</view>
<view
class=
"class1"
@
click=
ccc(courselist[0].id)
>
<image
class=
"img"
:src=
"courselist[0].pic"
mode=
""
></image>
<view
class=
"class1"
@
click=
"ccc(courselist[0].id)"
>
<image
class=
"img"
:src=
"courselist[0].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
{{
courselist
[
0
].
title
}}
...
...
@@ -48,16 +84,34 @@
<view
class=
"intro"
>
{{
courselist
[
0
].
desc
}}
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
courselist[0].percent
style=
"width:54%;"
>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[0].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[0].status"
></text>
<text
v-text=
"courselist[0].status"
></text>
</view>
</view>
</view>
<view
class=
"class1"
@
click=
ccc(courselist[1].id)
>
<image
class=
"img"
:src=
"courselist[1].pic"
mode=
""
></image>
<view
class=
"class1"
@
click=
"ccc(courselist[1].id)"
>
<image
class=
"img"
:src=
"courselist[1].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
{{
courselist
[
1
].
title
}}
...
...
@@ -65,19 +119,37 @@
<view
class=
""
>
{{
courselist
[
1
].
desc
}}
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[1].percent"
style=
"width:54%;"
>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[1].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[1].status"
></text>
<text
v-text=
"courselist[1].status"
></text>
</view>
</view>
</view>
</view>
<view
class=
"currency-class"
>
<view
class=
"title"
>
技能课程
</view>
<view
class=
"class1"
@
click=
ccc(courselist[2].id)
>
<image
class=
"img"
:src=
"courselist[2].pic"
mode=
""
></image>
<view
class=
"class1"
@
click=
"ccc(courselist[2].id)"
>
<image
class=
"img"
:src=
"courselist[2].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
{{
courselist
[
2
].
title
}}
...
...
@@ -85,11 +157,22 @@
<view
class=
""
>
{{
courselist
[
2
].
desc
}}
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[2].percent"
style=
"width:54%;"
>
<view
class=
""
style=
"
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>
<text
v-text=
"courselist[2].status"
></text>
</view>
</view>
</view>
...
...
@@ -99,37 +182,61 @@
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<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>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
服务规范
</view>
<view
class=
""
>
服务规范
</view>
<view
class=
""
>
通过本认证,是接单的前提条件
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<text
style=
"color: #a69999;"
>
随机20题,及格20题
</text>
<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>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
接单操作
</view>
<view
class=
""
>
接单操作
</view>
<view
class=
""
>
快速认证,是否具备接单操作能力
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text
>
<text>
未通过
</text>
</view>
</view>
...
...
@@ -138,7 +245,11 @@
<view
class=
"currency-class"
>
<text
class=
"title"
>
技能认证
</text>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
从0-1学习充电桩安装服务
...
...
@@ -146,8 +257,16 @@
<view
class=
""
>
通过本认证后,可接充电桩业务单
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<text
style=
"color: #a69999;"
>
随机30题,及格25题
</text>
<view
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机30题,及格25题
</text
>
<text>
未通过
</text>
</view>
</view>
...
...
@@ -162,423 +281,430 @@
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:
"赣南吴彦祖"
,
tabs
:
[{
name
:
"交付规范"
,
},
{
name
:
"培训通知"
,
},
{
name
:
"在线学习"
,
},
{
name
:
"考核认证"
,
},
],
current
:
0
,
swiperCurrent
:
0
,
params
:
{
start
:
0
,
export
default
{
data
()
{
return
{
msg
:
"赣南吴彦祖"
,
tabs
:
[
{
name
:
"交付规范"
,
},
list
:
[],
courselist
:
[{
title
:
'服务规范'
,
desc
:
'为用户提供更好服务,自己赚更多钱'
,
percent
:
0
,
status
:
''
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan1@3x.png"
,
id
:
173
},
{
title
:
'接单操作'
,
desc
:
'快速学习,使用APP 接单、抢单'
,
percent
:
0
,
status
:
''
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan2@3x.png"
,
id
:
173
},
{
title
:
'从0-1学习充电桩安装服务'
,
desc
:
'让你全面了解充电桩市场及服务规范'
,
percent
:
0
,
status
:
''
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"kecehng1@3x.png"
,
id
:
173
}
],
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
exam
:
null
,
};
},
onLoad
()
{
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
},
computed
:
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx@3x.png"
;
{
name
:
"培训通知"
,
},
{
name
:
"在线学习"
,
},
{
name
:
"考核认证"
,
},
],
current
:
0
,
swiperCurrent
:
0
,
params
:
{
start
:
0
,
},
list
:
[],
courselist
:
[
{
title
:
"服务规范"
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan1@3x.png"
,
id
:
173
,
},
{
title
:
"接单操作"
,
desc
:
"快速学习,使用APP 接单、抢单"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan2@3x.png"
,
id
:
173
,
},
{
title
:
"从0-1学习充电桩安装服务"
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"kecehng1@3x.png"
,
id
:
173
,
},
],
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
exam
:
null
,
};
},
onLoad
()
{
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
},
computed
:
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx@3x.png"
;
},
methods
:
{
getList
()
{
this
.
$u
.
api
.
getTrainingNoticeList
(
this
.
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
}
else
{
this
.
isLoadMore
=
false
;
}
}
else
{
},
methods
:
{
getList
()
{
this
.
$u
.
api
.
getTrainingNoticeList
(
this
.
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
}
else
{
this
.
isLoadMore
=
false
;
}
}
else
{
//接口请求失败的处理
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
}
}
)
.
catch
((
err
)
=>
{
}
else
{
//接口请求失败的处理
uni
.
showToast
({
title
:
err
,
title
:
res
.
message
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
},
getTypeName
(
percent
)
{
if
(
percent
==
0
)
{
return
'未开始'
;
}
else
if
(
percent
==
'100'
)
{
return
'已完成'
;
}
else
{
return
'继续'
;
}
},
//在线学习通用课程信息
getCourseList
()
{
let
courseLength
=
this
.
courselist
.
length
;
for
(
let
i
=
0
;
i
<
courseLength
;
i
++
)
{
let
param
=
{
course_id
:
this
.
courselist
[
i
].
id
};
this
.
$u
.
api
.
CourseList
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courselist
[
i
].
status
=
this
.
getTypeName
(
res
.
data
.
learnedInfo
.
learnPercent
);
this
.
courselist
[
i
].
percent
=
res
.
data
.
learnedInfo
.
learnPercent
;
}
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
},
getTypeName
(
percent
)
{
if
(
percent
==
0
)
{
return
"未开始"
;
}
else
if
(
percent
==
"100"
)
{
return
"已完成"
;
}
else
{
return
"继续"
;
}
},
//在线学习通用课程信息
getCourseList
()
{
let
courseLength
=
this
.
courselist
.
length
;
for
(
let
i
=
0
;
i
<
courseLength
;
i
++
)
{
let
param
=
{
course_id
:
this
.
courselist
[
i
].
id
,
};
this
.
$u
.
api
.
CourseList
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courselist
[
i
].
status
=
this
.
getTypeName
(
res
.
data
.
learnedInfo
.
learnPercent
);
this
.
courselist
[
i
].
percent
=
res
.
data
.
learnedInfo
.
learnPercent
;
}
}
)
.
catch
((
err
)
=>
{
uni
.
showToast
(
{
title
:
err
,
icon
:
"none"
,
});
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
}
},
//tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
switch
(
index
)
{
case
1
:
this
.
params
.
start
=
0
;
this
.
list
=
[];
this
.
getList
();
break
;
case
2
:
this
.
getCourseList
();
console
.
log
(
'重新加载学习进度'
);
break
;
case
3
:
this
.
getUserExamInfo
();
break
;
}
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
//跳转到assessment页面
aaa
()
{
var
id
=
this
.
exam
.
id
;
if
(
this
.
exam
.
examStatus
==
0
)
{
console
.
log
(
"这是个标识符"
,
this
.
exam
.
id
);
wx
.
navigateTo
({
url
:
"./answer?userExamId="
+
id
,
});
}
else
if
(
this
.
exam
.
examStatus
==
1
)
{
wx
.
navigateTo
({
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)
}
},
//tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
switch
(
index
)
{
case
1
:
this
.
params
.
start
=
0
;
this
.
list
=
[];
this
.
getList
();
break
;
case
2
:
this
.
getCourseList
();
console
.
log
(
"重新加载学习进度"
);
break
;
case
3
:
this
.
getUserExamInfo
();
break
;
}
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
//跳转到assessment页面
aaa
()
{
var
id
=
this
.
exam
.
id
;
if
(
this
.
exam
.
examStatus
==
0
)
{
console
.
log
(
"这是个标识符"
,
this
.
exam
.
id
);
uni
.
navigateTo
({
url
:
"./
news-details"
,
wx
.
navigateTo
({
url
:
"./
answer?userExamId="
+
id
,
});
setTimeout
(()
=>
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
},
500
);
console
.
log
(
"跳转结束11111111"
);
},
//scroll-view到底部加载更多
onreachBottom
()
{
console
.
log
(
"上拉触底函数"
);
//上拉触底函数
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
);
},
}
else
if
(
this
.
exam
.
examStatus
==
1
)
{
wx
.
navigateTo
({
url
:
"./result?userExamId="
+
id
,
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo
()
{
uni
.
showLoading
({
title
:
"请稍候"
,
}
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)
let
that
=
this
;
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
getApp
().
globalData
.
token
+
"?examId="
+
2
,
method
:
"POST"
,
data
:
{
//examId:this.examId,
},
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
);
uni
.
hideLoading
();
if
(
!
res
.
data
)
{
uni
.
navigateTo
({
url
:
"./news-details"
,
});
setTimeout
(()
=>
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
},
500
);
console
.
log
(
"跳转结束11111111"
);
},
//scroll-view到底部加载更多
onreachBottom
()
{
console
.
log
(
"上拉触底函数"
);
//上拉触底函数
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
;
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
that
.
vuex_token
+
"?examId="
+
2
,
method
:
"POST"
,
data
:
{
//examId:this.examId,
},
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
);
uni
.
hideLoading
();
if
(
!
res
.
data
)
{
return
;
}
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
.
code
==
401
||
res
.
data
.
code
==
403
)
{
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console
.
log
(
"洪塘张学友"
)
;
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
console
.
log
(
"111111111111111111111111111"
);
that
.
isComplete
=
true
;
that
.
examScore
=
res
.
data
.
data
.
examScore
;
that
.
postResult
();
return
;
}
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
,
});
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
that
.
userExamId
=
res
.
data
.
data
.
id
;
that
.
getNext
();
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
();
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
title
:
res
.
data
.
message
,
});
},
});
},
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
},
});
},
};
},
};
</
script
>
<
style
>
.study
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
.study
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40
rpx
;
}
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40
rpx
;
}
.banner
{
width
:
690
rpx
;
height
:
240
rpx
;
margin-top
:
10
rpx
;
}
.banner
{
width
:
690
rpx
;
height
:
240
rpx
;
margin-top
:
10
rpx
;
}
/* //交付规范 */
.standard
{
width
:
656
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1
rpx
solid
#82848a
;
padding
:
0
34
rpx
;
margin
:
72
rpx
auto
;
}
/* //交付规范 */
.standard
{
width
:
656
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1
rpx
solid
#82848a
;
padding
:
0
34
rpx
;
margin
:
72
rpx
auto
;
}
/* //培训通知 */
.notice
{
border
:
#808080
solid
2
rpx
;
width
:
100%
;
height
:
400
rpx
;
margin-top
:
36
rpx
;
overflow
:
hidden
;
}
/* //培训通知 */
.notice
{
border
:
#808080
solid
2
rpx
;
width
:
100%
;
height
:
400
rpx
;
margin-top
:
36
rpx
;
overflow
:
hidden
;
}
.n-head
{
text-align
:
center
;
margin
:
32
rpx
0
;
}
.n-head
{
text-align
:
center
;
margin
:
32
rpx
0
;
}
.news
{}
.news
{
}
/* //在线学习 */
.currency-class
{
width
:
100%
;
background
:
#ffffff
;
padding
:
18
rpx
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
}
/* //在线学习 */
.currency-class
{
width
:
100%
;
background
:
#ffffff
;
padding
:
18
rpx
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
}
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
.class1
{
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
22
rpx
;
margin-top
:
28
rpx
;
border-top
:
1
rpx
solid
#808080
;
}
.class1
{
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
22
rpx
;
margin-top
:
28
rpx
;
border-top
:
1
rpx
solid
#808080
;
}
.img
{
width
:
201
rpx
;
height
:
201
rpx
;
display
:
block
;
margin-right
:
0
rpx
;
}
.img
{
width
:
201
rpx
;
height
:
201
rpx
;
display
:
block
;
margin-right
:
0
rpx
;
}
.right
{
width
:
428
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.right
{
width
:
428
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.intro
{
color
:
#9999a6
;
}
.intro
{
color
:
#9999a6
;
}
.tab
{
background
:
#fff
;
height
:
82
rpx
;
margin
:
0
0
;
}
.tab
{
background
:
#fff
;
height
:
82
rpx
;
margin
:
0
0
;
}
.text
{
margin
:
0
40
rpx
;
line-height
:
82
rpx
;
color
:
#667eb5
;
}
.text
{
margin
:
0
40
rpx
;
line-height
:
82
rpx
;
color
:
#667eb5
;
}
.content
{
margin
:
5px
0
;
height
:
485
rpx
;
background
:
#fff
;
}
.content
{
margin
:
5px
0
;
height
:
485
rpx
;
background
:
#fff
;
}
swiper
{
height
:
691
rpx
;
}
swiper
{
height
:
691
rpx
;
}
</
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