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
0bf99ddf
Commit
0bf99ddf
authored
Apr 25, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突
parent
10fa606f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
365 additions
and
370 deletions
+365
-370
.env.dev.js
.env.dev.js
+2
-2
.env.js
.env.js
+1
-1
index.vue
src/pages/learn/index.vue
+362
-367
No files found.
.env.dev.js
View file @
0bf99ddf
const
UNI_APP
=
{
const
UNI_APP
=
{
ucenterUrl
:
{
ucenterUrl
:
{
apiUrl
:
'http://
rest-u.yunya.com
'
,
//php端域名请求头
apiUrl
:
'http://
192.168.1.46
'
,
//php端域名请求头
// xueUrl: 'https://xue.banshouhui.com
', //学院
xueUrl
:
'http://192.168.1.46:8088
'
,
//学院
// banshou: 'https://m.banshou.com', //扳手app
// banshou: 'https://m.banshou.com', //扳手app
},
},
systemUrl
:
{
systemUrl
:
{
...
...
.env.js
View file @
0bf99ddf
;
;
(
function
()
{
(
function
()
{
let
NODE_ENV
=
'
test
'
;
// dev:开发环境 | test:测试环境
let
NODE_ENV
=
'
dev
'
;
// dev:开发环境 | test:测试环境
let
ENV_VAR
=
null
;
let
ENV_VAR
=
null
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/pages/learn/index.vue
View file @
0bf99ddf
...
@@ -162,383 +162,378 @@
...
@@ -162,383 +162,378 @@
</
template
>
</
template
>
<
script
>
<
script
>
<<<<<<<
.
merge_file_a10028
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
msg
:
"赣南吴彦祖"
,
msg
:
"赣南吴彦祖"
,
tabs
:
[
tabs
:
[{
{
name
:
"交付规范"
,
name
:
"交付规范"
,
},
},
{
{
name
:
"培训通知"
,
name
:
"培训通知"
,
},
},
{
{
name
:
"在线学习"
,
name
:
"在线学习"
,
},
},
{
{
name
:
"考核认证"
,
name
:
"考核认证"
,
},
},
],
],
current
:
0
,
current
:
0
,
swiperCurrent
:
0
,
swiperCurrent
:
0
,
params
:
{
params
:
{
start
:
0
,
start
:
0
,
},
},
list
:
[],
list
:
[],
courselist
:
null
,
courselist
:
null
,
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
course_id
:
"course_id_=173"
,
exam
:
null
exam
:
null
,
};
};
},
},
onLoad
()
{
onLoad
()
{
this
.
getList
();
this
.
getList
();
this
.
getCourseList
();
this
.
getCourseList
();
this
.
getUserExamInfo
();
this
.
getUserExamInfo
();
},
},
computed
:{
computed
:
{
bannerImage
()
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'banner-xx.png'
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx.png"
;
},
},
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
this
.
$u
.
api
this
.
$u
.
api
.
getTrainingNoticeList
(
this
.
params
)
.
getTrainingNoticeList
(
this
.
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
data
.
length
<
5
)
{
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this
.
isLoadMore
=
true
;
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
this
.
loadStatus
=
"nomore"
;
}
else
{
}
else
{
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
}
}
}
else
{
}
else
{
this
.
isLoadMore
=
true
;
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
this
.
loadStatus
=
"nomore"
;
}
}
}
else
{
}
else
{
//接口请求失败的处理
//接口请求失败的处理
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
"none"
icon
:
"none"
,
});
});
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
this
.
page
-=
5
;
}
}
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
,
title
:
err
,
icon
:
"none"
,
icon
:
"none"
,
});
});
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
this
.
page
-=
5
;
}
}
});
});
},
},
//在线学习通用课程信息
//在线学习通用课程信息
getCourseList
()
{
getCourseList
()
{
this
.
$u
.
api
this
.
$u
.
api
.
CourseList
()
.
CourseList
()
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
courselist
=
res
.
data
;
this
.
courselist
=
res
.
data
;
console
.
log
(
"--------"
)
console
.
log
(
"--------"
);
console
.
log
(
this
.
courselist
)
console
.
log
(
this
.
courselist
);
if
(
res
.
data
.
length
<
5
)
{
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this
.
isLoadMore
=
true
;
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
this
.
loadStatus
=
"nomore"
;
}
else
{
}
else
{
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
}
}
}
else
{
}
else
{
this
.
isLoadMore
=
true
;
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
this
.
loadStatus
=
"nomore"
;
}
}
}
else
{
}
else
{
//接口请求失败的处理
//接口请求失败的处理
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
"none"
icon
:
"none"
,
});
});
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
this
.
page
-=
5
;
}
}
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
,
title
:
err
,
icon
:
"none"
,
icon
:
"none"
,
});
});
this
.
isLoadMore
=
false
;
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
this
.
page
-=
5
;
}
}
});
});
},
},
//tabs通知swiper切换
//tabs通知swiper切换
tabsChange
(
index
)
{
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
swiperCurrent
=
index
;
},
},
//swiper-item左右移动,通知tabs的滑块跟随移动
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
},
animationfinish
(
e
)
{
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
this
.
current
=
current
;
},
},
//跳转到assessment页面
//跳转到assessment页面
aaa
()
{
aaa
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"./assessment"
,
url
:
"./assessment"
,
});
});
},
},
//跳转到课程介绍
//跳转到课程介绍
ccc
(
id
){
ccc
(
id
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"./curriculum?course_id="
+
id
url
:
"./curriculum?course_id="
+
id
,
})
});
},
},
//跳转到
//跳转到
bbb
(
e
)
{
bbb
(
e
)
{
var
news
=
{
var
news
=
{
body
:
e
.
body
,
body
:
e
.
body
,
id
:
e
.
id
,
id
:
e
.
id
,
level
:
e
.
level
,
level
:
e
.
level
,
title
:
e
.
title
title
:
e
.
title
,
};
};
// console.log(news)
// console.log(news)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"./news-details"
url
:
"./news-details"
,
});
});
setTimeout
(()
=>
{
uni
.
$emit
(
'news'
,
news
),
console
.
log
(
'发送数据'
)},
500
)
setTimeout
(()
=>
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
console
.
log
(
'跳转结束11111111'
)
},
500
);
},
console
.
log
(
"跳转结束11111111"
);
//scroll-view到底部加载更多
},
onreachBottom
()
{
//scroll-view到底部加载更多
console
.
log
(
"上拉触底函数"
);
onreachBottom
()
{
//上拉触底函数
console
.
log
(
"上拉触底函数"
);
if
(
!
this
.
isLoadMore
)
{
//上拉触底函数
this
.
isLoadMore
=
true
;
if
(
!
this
.
isLoadMore
)
{
this
.
params
.
start
+=
5
;
this
.
isLoadMore
=
true
;
if
(
this
.
loadStatus
!==
"nomore"
)
{
this
.
params
.
start
+=
5
;
this
.
getList
();
if
(
this
.
loadStatus
!==
"nomore"
)
{
}
this
.
getList
();
}
}
},
}
//跳转到拍照小程序首页
},
goToPrint
()
{
//跳转到拍照小程序首页
console
.
log
(
"111111"
);
goToPrint
()
{
uni
.
navigateToMiniProgram
({
console
.
log
(
"111111"
);
appId
:
"wxd1d6eede324b0465"
,
uni
.
navigateToMiniProgram
({
success
(
res
)
{
appId
:
"wxd1d6eede324b0465"
,
//打开成功
success
(
res
)
{
console
.
log
(
"success"
,
res
);
//打开成功
},
console
.
log
(
"success"
,
res
);
fail
(
err
)
{
},
console
.
log
(
"err"
,
err
);
fail
(
err
)
{
},
console
.
log
(
"err"
,
err
);
});
},
},
});
//考核认证,通用认证,考试通过or未通过查询接口请求
},
getUserExamInfo
()
{
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'请稍候'
title
:
"请稍候"
,
})
});
let
that
=
this
let
that
=
this
;
uni
.
request
({
uni
.
request
({
url
:
'http://192.168.1.22'
+
url
:
'/wxh-worker-rest/rest/exam'
+
"http://192.168.1.22"
+
'/serviceRule/userExamInfo/'
+
"/wxh-worker-rest/rest/exam"
+
'RTOKENe83309bff5846d2ff0949d58a0c0f643d60d107d'
+
"/serviceRule/userExamInfo/"
+
'?examId='
+
2
,
getApp
().
globalData
.
token
+
method
:
'POST'
,
"?examId="
+
data
:
{
2
,
//examId:this.examId,
method
:
"POST"
,
},
data
:
{
header
:
{
//examId:this.examId,
'Content-Type'
:
'application/x-www-form-urlencoded'
},
},
header
:
{
success
:
(
res
)
=>
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
console
.
log
(
res
.
data
)
},
uni
.
hideLoading
()
success
:
(
res
)
=>
{
if
(
!
res
.
data
)
{
console
.
log
(
res
.
data
);
return
uni
.
hideLoading
();
}
if
(
!
res
.
data
)
{
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
return
;
// uni.navigateTo({
}
// url: '/pages/login/wxlogin'
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
// })
// uni.navigateTo({
// return
// url: '/pages/login/wxlogin'
console
.
log
(
'洪塘张学友'
)
// })
}
// return
if
(
res
.
data
.
code
==
200
)
{
console
.
log
(
"洪塘张学友"
);
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
}
that
.
exam
=
res
.
data
.
data
if
(
res
.
data
.
code
==
200
)
{
console
.
log
(
that
.
exam
)
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
that
.
exam
=
res
.
data
.
data
;
that
.
applyExam
()
console
.
log
(
that
.
exam
);
return
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
}
that
.
applyExam
();
if
(
res
.
data
.
data
.
examStatus
==
1
){
return
;
console
.
log
(
'111111111111111111111111111'
)
}
that
.
isComplete
=
true
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
that
.
examScore
=
res
.
data
.
data
.
examScore
console
.
log
(
"111111111111111111111111111"
);
that
.
postResult
()
that
.
isComplete
=
true
;
return
that
.
examScore
=
res
.
data
.
data
.
examScore
;
}
that
.
postResult
();
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
return
;
that
.
userExamId
=
res
.
data
.
data
.
id
}
that
.
getNext
()
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
}
that
.
userExamId
=
res
.
data
.
data
.
id
;
that
.
getNext
();
}
else
{
}
uni
.
showToast
({
}
else
{
icon
:
'none'
,
uni
.
showToast
({
title
:
res
.
data
.
message
icon
:
"none"
,
})
title
:
res
.
data
.
message
,
});
}
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
();
},
uni
.
showToast
({
fail
:
(
e
)
=>
{
icon
:
"none"
,
uni
.
hideLoading
()
title
:
"获取考试信息失败"
,
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-left: -15rpx; */
}
}
//
交付规范
/* //交付规范 */
.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
>
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