Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
3f743565
Commit
3f743565
authored
Jul 28, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
d79bb612
1de0a98e
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
246 additions
and
502 deletions
+246
-502
.env.dev.js
.env.dev.js
+2
-2
user.js
src/api/user.js
+17
-7
http.interceptor.js
src/common/http.interceptor.js
+2
-2
index.vue
src/components/swiper-limited-load/index.vue
+6
-1
pages.json
src/pages.json
+1
-1
detail.vue
src/pages/cert/detail.vue
+29
-40
detailLearn.vue
src/pages/cert/detailLearn.vue
+14
-6
cert.vue
src/pages/index/cert.vue
+96
-232
answer.vue
src/pages/learn/answer.vue
+13
-6
beginAnswer.vue
src/pages/learn/beginAnswer.vue
+3
-1
score.vue
src/pages/learn/score.vue
+0
-1
bank.vue
src/pages/mine/bank.vue
+24
-172
certify.vue
src/pages/mine/certify.vue
+17
-15
info.vue
src/pages/mine/info.vue
+18
-14
index.vue
src/pages/search/index.vue
+4
-2
No files found.
.env.dev.js
View file @
3f743565
const
UNI_APP
=
{
const
UNI_APP
=
{
apiUrl
:
'http://192.168.
0.204
:8760'
,
apiUrl
:
'http://192.168.
1.22
:8760'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_asset_url
:
'http
://deudn.c.pp.cc
/'
,
qn_asset_url
:
'http
s://img2.banshouhui.com
/'
,
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
argoDebugMode
:
1
,
argoDebugMode
:
1
,
version
:
'v1.0.0'
,
version
:
'v1.0.0'
,
...
...
src/api/user.js
View file @
3f743565
...
@@ -14,21 +14,29 @@ let userApiFun = function(vm) {
...
@@ -14,21 +14,29 @@ let userApiFun = function(vm) {
//验证身份证反面
//验证身份证反面
let
checkIdCardBack
=
async
(
params
=
{})
=>
let
checkIdCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
uCenterUrl
+
'v1/settled/card-back'
,
params
)
await
vm
.
$u
.
post
(
uCenterUrl
+
'v1/settled/card-back'
,
params
)
//获取国家证列表
let
getCountryCertList
=
async
(
params
=
{})
=>
let
getCountryCertList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
apiUrl
+
'/rest/certificate/query'
,
params
)
await
vm
.
$u
.
post
(
apiUrl
+
'/rest/certificate/query'
,
params
)
//获取学时证列表
let
getlearnCertList
=
async
(
params
=
{})
=>
let
getlearnCertList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate'
,
params
)
//获取学时证详情
let
getlearnCertDetail
=
async
(
questionWarehouseId
,
params
=
{}
)
=>
let
getlearnCertDetail
=
async
(
questionWarehouseId
)
=>
await
vm
.
$u
.
get
(
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate/'
+
questionWarehouseId
,
apiUrl
+
'/rest/question/getSchoolCertificate/'
+
questionWarehouseId
params
)
)
//证书查询结果
let
getCertFromOut
=
async
(
params
=
{})
=>
let
getCertFromOut
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/certificate/national'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/certificate/national'
,
params
)
//身份证识别
let
getCertifyInfoByType
=
async
(
type
,
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/student/get/idCard/'
+
type
,
params
)
//获取学员题库列表
let
getUserQuestionWareHouse
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/query/allStudentQuestionWarehouse'
,
params
)
const
userApi
=
{
const
userApi
=
{
updateUserInfo
,
updateUserInfo
,
...
@@ -39,6 +47,8 @@ let userApiFun = function(vm) {
...
@@ -39,6 +47,8 @@ let userApiFun = function(vm) {
getlearnCertList
,
getlearnCertList
,
getlearnCertDetail
,
getlearnCertDetail
,
getCertFromOut
,
getCertFromOut
,
getCertifyInfoByType
,
getUserQuestionWareHouse
,
}
}
return
userApi
return
userApi
}
}
...
...
src/common/http.interceptor.js
View file @
3f743565
...
@@ -44,7 +44,7 @@ const install = (Vue, vm) => {
...
@@ -44,7 +44,7 @@ const install = (Vue, vm) => {
if
(
data
.
code
===
0
)
{
if
(
data
.
code
===
0
)
{
return
data
.
data
return
data
.
data
}
else
if
(
data
.
code
===
401
)
{
}
else
if
(
data
.
code
===
401
)
{
vm
.
$u
.
toast
(
data
.
msg
)
vm
.
$u
.
toast
(
'登录过期,请重新登录!'
)
// 如果不是在登录页,则跳转到登录页
// 如果不是在登录页,则跳转到登录页
if
(
route
!==
'pages/login/index'
)
{
if
(
route
!==
'pages/login/index'
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -59,7 +59,7 @@ const install = (Vue, vm) => {
...
@@ -59,7 +59,7 @@ const install = (Vue, vm) => {
}
}
}
else
if
(
res
.
statusCode
===
401
)
{
}
else
if
(
res
.
statusCode
===
401
)
{
// 登录过期
// 登录过期
vm
.
$u
.
toast
(
data
.
msg
)
vm
.
$u
.
toast
(
'登录过期,请重新登录!'
)
if
(
route
!==
'pages/login/index'
)
{
if
(
route
!==
'pages/login/index'
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
vm
.
$u
.
route
(
'/pages/login/index'
)
vm
.
$u
.
route
(
'/pages/login/index'
)
...
...
src/components/swiper-limited-load/index.vue
View file @
3f743565
...
@@ -142,6 +142,10 @@ export default {
...
@@ -142,6 +142,10 @@ export default {
let
info
=
{}
let
info
=
{}
info
.
source
=
e
.
detail
.
source
info
.
source
=
e
.
detail
.
source
this
.
$nextTick
(()
=>
{
this
.
swiperCurrent
=
current
})
// 正向滑动,到下一个的时候
// 正向滑动,到下一个的时候
// 是正向衔接
// 是正向衔接
let
isLoopPositive
=
current
==
START
&&
lastIndex
==
END
let
isLoopPositive
=
current
==
START
&&
lastIndex
==
END
...
@@ -178,9 +182,10 @@ export default {
...
@@ -178,9 +182,10 @@ export default {
if
(
currentItem
==
null
)
return
if
(
currentItem
==
null
)
return
info
.
current
=
currentItem
.
index
info
.
current
=
currentItem
.
index
this
.
$emit
(
"change"
,
info
)
// 记录滑过来的位置,此值对于下一次滑动的计算很重要
// 记录滑过来的位置,此值对于下一次滑动的计算很重要
this
.
swiperIndex
=
current
this
.
swiperIndex
=
current
this
.
$emit
(
"change"
,
info
)
if
(
this
.
model
===
2
)
{
if
(
this
.
model
===
2
)
{
this
.
changeModel
()
this
.
changeModel
()
}
}
...
...
src/pages.json
View file @
3f743565
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"证书"
,
"navigationBarTitleText"
:
"证书"
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
fals
e
"disableScroll"
:
tru
e
}
}
},
},
{
{
...
...
src/pages/cert/detail.vue
View file @
3f743565
...
@@ -14,15 +14,11 @@
...
@@ -14,15 +14,11 @@
<u-image
:src=
"topImage"
height=
"116rpx"
width=
"100%"
></u-image>
<u-image
:src=
"topImage"
height=
"116rpx"
width=
"100%"
></u-image>
</view>
</view>
<view
class=
"table-list"
>
<view
class=
"table-list"
>
<view
v-if=
"type == 'country'"
class=
"item
"
>
<view
class=
"item"
v-for=
"(data, k) in dataList
"
>
<view
class=
"name"
>
{{
certName
}}
</view>
<view
class=
"name"
>
{{
certName
[
k
]
}}
</view>
<view
class=
"table"
>
<view
class=
"table"
>
<u-table
border-color=
"#9EA5BB"
>
<u-table
border-color=
"#9EA5BB"
>
<u-tr
<u-tr
v-for=
"(item, i) in data"
:key=
"i"
class=
"u-tr"
>
v-for=
"(item, i) in data.certificateTextContent"
:key=
"i"
class=
"u-tr"
>
<u-td
<u-td
v-for=
"(val, name, index) in item"
v-for=
"(val, name, index) in item"
:key=
"index"
:key=
"index"
...
@@ -48,16 +44,13 @@
...
@@ -48,16 +44,13 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
data
:
{
dataList
:
[],
certificateTextContent
:
[],
},
learnData
:
{},
learnData
:
{},
type
:
null
,
certName
:
[],
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
}
}
},
},
on
Show
:
function
()
{
on
Load
:
function
()
{
this
.
formatDataByType
()
this
.
formatDataByType
()
},
},
computed
:
{
computed
:
{
...
@@ -111,39 +104,33 @@ export default {
...
@@ -111,39 +104,33 @@ export default {
return
return
}
}
let
certData
=
getApp
().
globalData
.
certItemData
let
certData
=
getApp
().
globalData
.
certItemData
this
.
certName
=
certData
.
certificateName
if
(
certData
.
type
==
'country'
)
{
console
.
log
(
'ok'
)
this
.
type
=
'country'
this
.
certName
=
certData
.
certificateName
let
countryData
=
[]
let
countryData
=
[]
let
count
=
certData
.
data
.
count
||
2
let
certName
=
[]
let
list
let
count
,
list
console
.
log
(
'data is'
,
certData
.
data
)
for
(
let
k
in
certData
)
{
if
(
!
certData
.
data
.
certificateTextContent
)
{
countryData
[
k
]
=
[]
count
=
certData
[
k
].
data
.
count
||
2
certName
[
k
]
=
certData
[
k
].
certificateName
.
replace
(
'作业'
,
'证'
)
//格式化表格数据为json
if
(
!
certData
[
k
].
data
.
certificateTextContent
)
{
list
=
JSON
.
parse
(
list
=
JSON
.
parse
(
JSON
.
parse
(
JSON
.
stringify
(
certData
.
data
.
certificateContent
))
JSON
.
parse
(
JSON
.
stringify
(
certData
[
k
]
.
data
.
certificateContent
))
)
)
console
.
log
(
'list is'
,
list
)
}
else
{
}
else
{
list
=
certData
.
data
.
certificateTextContent
list
=
certData
[
k
]
.
data
.
certificateTextContent
}
}
//组合表格数据
for
(
let
key
in
list
)
{
for
(
let
key
in
list
)
{
countryData
[
key
]
=
[]
countryData
[
k
][
k
ey
]
=
[]
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
countryData
[
key
].
push
(
list
[
key
][
'filedName_'
+
i
])
countryData
[
k
][
k
ey
].
push
(
list
[
key
][
'filedName_'
+
i
])
countryData
[
key
].
push
(
list
[
key
][
'filedValue_'
+
i
])
countryData
[
k
][
k
ey
].
push
(
list
[
key
][
'filedValue_'
+
i
])
}
}
}
}
console
.
log
(
'data countryData'
,
countryData
)
certData
.
data
.
certificateTextContent
=
countryData
this
.
data
=
certData
.
data
console
.
log
(
'data log'
,
this
.
data
)
}
else
if
(
certData
.
type
==
'learn'
)
{
this
.
type
=
'learn'
this
.
learnData
=
certData
.
data
}
}
this
.
certName
=
certName
this
.
dataList
=
countryData
console
.
log
(
'data redo log'
,
this
.
dataList
)
},
},
},
},
}
}
...
@@ -156,13 +143,15 @@ export default {
...
@@ -156,13 +143,15 @@ export default {
color
:
transparent
;
color
:
transparent
;
display
:
none
;
display
:
none
;
}
}
page
{
background-color
:
#2953ff
;
}
.begin-answer
{
.begin-answer
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
background-color
:
#2953ff
;
background-size
:
100%
920rpx
;
background-size
:
100%
920rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
height
:
1
2
0vh
;
height
:
1
0
0vh
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
width
:
100%
;
width
:
100%
;
...
@@ -173,7 +162,7 @@ export default {
...
@@ -173,7 +162,7 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding
:
30rpx
24rpx
0rpx
24rpx
;
padding
:
30rpx
24rpx
5
0rpx
24rpx
;
}
}
.cert-body
{
.cert-body
{
...
...
src/pages/cert/detailLearn.vue
View file @
3f743565
...
@@ -85,16 +85,24 @@ export default {
...
@@ -85,16 +85,24 @@ export default {
type
:
null
,
type
:
null
,
certName
:
''
,
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
,
workPlace
:
''
}
}
},
},
onLoad
(){
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
workPlace
=
res
&&
res
.
workUnit
||
null
})
},
onShow
:
function
()
{
onShow
:
function
()
{
this
.
formatDataByType
()
this
.
formatDataByType
()
},
},
computed
:
{
computed
:
{
nowDate
(){
nowDate
(){
var
Today
=
new
Date
();
var
Today
=
new
Date
();
let
m
=
(
Today
.
getMonth
()
+
1
)
let
m
=
String
(
Today
.
getMonth
()
+
1
)
let
d
=
Today
.
getDate
()
let
d
=
String
(
Today
.
getDate
())
console
.
log
(
'd length'
,
d
.
length
)
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
},
},
headPhoto
(){
headPhoto
(){
...
@@ -113,7 +121,7 @@ export default {
...
@@ -113,7 +121,7 @@ export default {
return
this
.
learnData
.
idCard
||
' '
return
this
.
learnData
.
idCard
||
' '
},
},
company
()
{
company
()
{
return
this
.
learnData
.
company
||
' '
return
this
.
workPlace
},
},
subjectName
()
{
subjectName
()
{
return
this
.
learnData
.
subjectName
||
' '
return
this
.
learnData
.
subjectName
||
' '
...
@@ -122,13 +130,13 @@ export default {
...
@@ -122,13 +130,13 @@ export default {
return
this
.
learnData
.
institutionName
||
'模考大师'
return
this
.
learnData
.
institutionName
||
'模考大师'
},
},
maxpoint
()
{
maxpoint
()
{
return
this
.
learnData
.
maxPoint
||
0
return
this
.
learnData
.
maxPoint
>
0
&&
this
.
learnData
.
maxPoint
||
''
},
},
learnTime
()
{
learnTime
()
{
return
this
.
learnData
.
time
||
0
return
this
.
learnData
.
maxPoint
>
0
&&
this
.
learnData
.
time
||
''
},
},
resultForTest
()
{
resultForTest
()
{
return
(
this
.
learnData
.
maxPoint
>
80
&&
'合格'
)
||
'不合格
'
return
this
.
learnData
.
maxPoint
>
0
&&
((
this
.
learnData
.
maxPoint
>
80
&&
'合格'
)
||
'不合格'
)
||
'
'
},
},
},
},
methods
:
{
methods
:
{
...
...
src/pages/index/cert.vue
View file @
3f743565
This diff is collapsed.
Click to expand it.
src/pages/learn/answer.vue
View file @
3f743565
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
titleColor=
"#191C27"
titleColor=
"#191C27"
:border-bottom=
"false"
:border-bottom=
"false"
:custom-back=
"customBack"
:custom-back=
"customBack"
title=
"答题
"
:title=
"title
"
title-bold
title-bold
></u-navbar>
></u-navbar>
<view
class=
"u-flex contents"
v-if=
"total > 0"
>
<view
class=
"u-flex contents"
v-if=
"total > 0"
>
...
@@ -152,6 +152,7 @@ export default {
...
@@ -152,6 +152,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
title
:
'答题'
,
show
:
false
,
show
:
false
,
// 1 练习 or 每日一练 2 考试 3 收藏记录 4 错题记录
// 1 练习 or 每日一练 2 考试 3 收藏记录 4 错题记录
type
:
1
,
type
:
1
,
...
@@ -179,7 +180,7 @@ export default {
...
@@ -179,7 +180,7 @@ export default {
current
:
0
,
current
:
0
,
// 仅仅记录swiper的位置
// 仅仅记录swiper的位置
currentIndex
:
0
,
currentIndex
:
0
,
swiperDuration
:
'
10
00'
,
swiperDuration
:
'
8
00'
,
// 分页数据
// 分页数据
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
100
,
pageSize
:
100
,
...
@@ -262,13 +263,17 @@ export default {
...
@@ -262,13 +263,17 @@ export default {
this
.
$u
.
vuex
(
`lastIndex.
${
this
.
questionWarehouseId
}
`
,
0
)
this
.
$u
.
vuex
(
`lastIndex.
${
this
.
questionWarehouseId
}
`
,
0
)
this
.
$u
.
vuex
(
`questionList.
${
this
.
questionWarehouseId
}
`
,
[])
this
.
$u
.
vuex
(
`questionList.
${
this
.
questionWarehouseId
}
`
,
[])
}
}
}
else
if
(
this
.
source
===
4
)
{
this
.
title
=
'收藏的题'
}
else
if
(
this
.
source
===
5
)
{
this
.
title
=
'错题记录'
}
}
this
.
init
()
this
.
init
()
},
},
methods
:
{
methods
:
{
// 初始化数据
// 初始化数据
init
()
{
init
(
i
)
{
const
params
=
{
const
params
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
questionWarehouseId
:
this
.
questionWarehouseId
,
recordId
:
this
.
recordId
,
recordId
:
this
.
recordId
,
...
@@ -297,7 +302,7 @@ export default {
...
@@ -297,7 +302,7 @@ export default {
// 上次答到了第几题
// 上次答到了第几题
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
this
.
refresh
(
index
)
this
.
refresh
(
i
?
i
:
i
ndex
)
}
}
})
})
},
},
...
@@ -465,7 +470,9 @@ export default {
...
@@ -465,7 +470,9 @@ export default {
}
}
return
return
}
}
this
.
$nextTick
(()
=>
{
this
.
current
=
this
.
currentIndex
+
1
this
.
current
=
this
.
currentIndex
+
1
})
}
}
},
},
// 保存答案
// 保存答案
...
@@ -575,7 +582,7 @@ export default {
...
@@ -575,7 +582,7 @@ export default {
remove
()
{
remove
()
{
const
info
=
this
.
list
.
find
(
v
=>
v
.
index
===
this
.
currentIndex
)
const
info
=
this
.
list
.
find
(
v
=>
v
.
index
===
this
.
currentIndex
)
this
.
$u
.
api
.
removeError
({
questionId
:
info
.
id
}).
then
(
res
=>
{
this
.
$u
.
api
.
removeError
({
questionId
:
info
.
id
}).
then
(
res
=>
{
if
(
res
)
this
.
current
=
this
.
currentIndex
+
1
if
(
res
)
this
.
init
(
this
.
currentIndex
)
})
})
},
},
// 以下方法用于初始化数据
// 以下方法用于初始化数据
...
...
src/pages/learn/beginAnswer.vue
View file @
3f743565
...
@@ -92,9 +92,11 @@ export default {
...
@@ -92,9 +92,11 @@ export default {
id
:
res
.
id
,
id
:
res
.
id
,
kemu
:
res
.
echoMap
?.
questionWarehouseId
?.
title
,
kemu
:
res
.
echoMap
?.
questionWarehouseId
?.
title
,
tishu
:
`
${
res
.
totalPoint
}
题`
,
tishu
:
`
${
res
.
totalPoint
}
题`
,
totalPoint
:
res
.
totalPoint
,
biaozhun
:
`
${
res
.
passPoint
}
分`
,
biaozhun
:
`
${
res
.
passPoint
}
分`
,
passPoint
:
res
.
passPoint
,
passPoint
:
res
.
passPoint
,
duration
:
`
${
res
.
duration
}
分钟`
,
duration
:
`
${
res
.
duration
}
分钟`
,
durationNumber
:
res
.
duration
,
guize
:
'根据国家规定比例随机抽取'
guize
:
'根据国家规定比例随机抽取'
}
}
})
})
...
@@ -117,7 +119,7 @@ export default {
...
@@ -117,7 +119,7 @@ export default {
source
:
3
,
source
:
3
,
passPoint
:
this
.
info
.
passPoint
,
passPoint
:
this
.
info
.
passPoint
,
totalPoint
:
this
.
info
.
totalPoint
,
totalPoint
:
this
.
info
.
totalPoint
,
duration
:
this
.
info
.
duration
duration
:
this
.
info
.
duration
Number
}
}
})
})
}
}
...
...
src/pages/learn/score.vue
View file @
3f743565
...
@@ -209,7 +209,6 @@ export default {
...
@@ -209,7 +209,6 @@ export default {
},
2500
)
},
2500
)
},
},
customBack
()
{
customBack
()
{
console
.
log
(
"111"
,
111
)
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'tab'
,
type
:
'tab'
,
url
:
'pages/index/index'
url
:
'pages/index/index'
...
...
src/pages/mine/bank.vue
View file @
3f743565
...
@@ -50,176 +50,7 @@ export default {
...
@@ -50,176 +50,7 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
this
.
$u
.
api
.
getUserQuestionWareHouse
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserQuestionWareHouse
().
then
((
res
)
=>
{
res
=
[
console
.
log
(
'tiku list'
,
res
)
{
id
:
'1415266126815821824'
,
createTime
:
'2021-07-14 19:05:14'
,
createdBy
:
'1415215255998431232'
,
updateTime
:
'2021-07-14 19:05:14'
,
updatedBy
:
'1415215255998431232'
,
echoMap
:
{
studentId
:
{
id
:
'1414459877807357952'
,
createTime
:
'2021-07-12 13:41:29'
,
createdBy
:
'3'
,
updateTime
:
'2021-07-20 20:41:13'
,
updatedBy
:
'1414459877807357952'
,
echoMap
:
{},
cardCount
:
null
,
consumeAmount
:
null
,
loginTime
:
null
,
unionid
:
''
,
nickname
:
''
,
name
:
''
,
phoneNumber
:
'11111111111'
,
avatarPath
:
''
,
identityNumber
:
''
,
identityFrontPath
:
''
,
identityBackPath
:
''
,
certificatePhotoPath
:
''
,
certificateValidityDate
:
null
,
workUnit
:
''
,
address
:
''
,
},
questionWarehouseId
:
{
id
:
'1414854649273384960'
,
createTime
:
'2021-07-13 15:50:10'
,
createdBy
:
'1413688964405002240'
,
updateTime
:
'2021-07-22 19:21:00'
,
updatedBy
:
'1413688964405002240'
,
echoMap
:
{},
institutionId
:
'1'
,
subjectId
:
'1418169087225233408'
,
title
:
'测试题库'
,
subtitle
:
'大狼狗'
,
description
:
'sad'
,
effectiveTime
:
'0'
,
provinceId
:
'470715'
,
cityId
:
'475286'
,
type
:
'1'
,
price
:
'100.00'
,
realPrice
:
'60.00'
,
state
:
true
,
remark
:
''
,
version
:
'0'
,
},
cardId
:
{
id
:
'1416278788987158528'
,
createTime
:
'2021-07-17 14:09:11'
,
createdBy
:
'1410776147574128640'
,
updateTime
:
'2021-07-17 14:09:11'
,
updatedBy
:
'1410776147574128640'
,
echoMap
:
{},
unitPrice
:
null
,
buyTime
:
null
,
subjectNames
:
null
,
instrtutionId
:
'1'
,
studentId
:
null
,
questionWarehouseId
:
'1'
,
cardType
:
'02'
,
cardNumber
:
'621001200010719'
,
cardSecret
:
'9923sibv'
,
cardStatus
:
5
,
isEnable
:
1
,
effectiveDay
:
30
,
bindingTime
:
null
,
activationTime
:
null
,
sourceType
:
{
code
:
'INSTRTUTION_SEND'
,
desc
:
'机构发卡'
,
},
sourceOrderId
:
'1416278788521590784'
,
},
},
questionWarehouseId
:
'1414854649273384960'
,
studentId
:
'1414459877807357952'
,
cardId
:
'1416278788987158528'
,
},
{
id
:
'1415602594134360064'
,
createTime
:
'2021-07-15 17:41:51'
,
createdBy
:
'1415215255998431232'
,
updateTime
:
'2021-07-15 17:41:51'
,
updatedBy
:
null
,
echoMap
:
{
studentId
:
{
id
:
'1414459877807357952'
,
createTime
:
'2021-07-12 13:41:29'
,
createdBy
:
'3'
,
updateTime
:
'2021-07-20 20:41:13'
,
updatedBy
:
'1414459877807357952'
,
echoMap
:
{},
cardCount
:
null
,
consumeAmount
:
null
,
loginTime
:
null
,
unionid
:
''
,
nickname
:
''
,
name
:
''
,
phoneNumber
:
'11111111111'
,
avatarPath
:
''
,
identityNumber
:
''
,
identityFrontPath
:
''
,
identityBackPath
:
''
,
certificatePhotoPath
:
''
,
certificateValidityDate
:
null
,
workUnit
:
''
,
address
:
''
,
},
questionWarehouseId
:
{
id
:
'1'
,
createTime
:
'2021-07-12 16:33:20'
,
createdBy
:
null
,
updateTime
:
'2021-07-21 14:40:44'
,
updatedBy
:
'1413688964405002240'
,
echoMap
:
{},
institutionId
:
'1'
,
subjectId
:
'1413687160678121472'
,
title
:
'测试1'
,
subtitle
:
'侧首'
,
description
:
'哈哈哈哈'
,
effectiveTime
:
'1'
,
provinceId
:
'470715'
,
cityId
:
'475286'
,
type
:
'1'
,
price
:
'100.00'
,
realPrice
:
'50.00'
,
state
:
true
,
remark
:
'123231'
,
version
:
null
,
},
cardId
:
{
id
:
'1416278788987158528'
,
createTime
:
'2021-07-17 14:09:11'
,
createdBy
:
'1410776147574128640'
,
updateTime
:
'2021-07-17 14:09:11'
,
updatedBy
:
'1410776147574128640'
,
echoMap
:
{},
unitPrice
:
null
,
buyTime
:
null
,
subjectNames
:
null
,
instrtutionId
:
'1'
,
studentId
:
null
,
questionWarehouseId
:
'1'
,
cardType
:
'02'
,
cardNumber
:
'621001200010719'
,
cardSecret
:
'9923sibv'
,
cardStatus
:
15
,
isEnable
:
1
,
effectiveDay
:
30
,
bindingTime
:
null
,
activationTime
:
null
,
sourceType
:
{
code
:
'INSTRTUTION_SEND'
,
desc
:
'机构发卡'
,
},
sourceOrderId
:
'1416278788521590784'
,
},
},
questionWarehouseId
:
'1'
,
studentId
:
'1414459877807357952'
,
cardId
:
'1416278788987158528'
,
},
]
let
length
=
res
.
length
let
length
=
res
.
length
if
(
res
.
length
<=
0
)
{
if
(
res
.
length
<=
0
)
{
this
.
lists
=
[]
this
.
lists
=
[]
...
@@ -237,7 +68,6 @@ export default {
...
@@ -237,7 +68,6 @@ export default {
//绑卡或支付时间
//绑卡或支付时间
data
[
i
].
title
=
res
[
i
].
echoMap
.
questionWarehouseId
.
title
data
[
i
].
title
=
res
[
i
].
echoMap
.
questionWarehouseId
.
title
data
[
i
].
subtitle
=
res
[
i
].
echoMap
.
questionWarehouseId
.
subtitle
data
[
i
].
time
=
data
[
i
].
time
=
res
[
i
].
echoMap
.
cardId
.
bindingTime
||
res
[
i
].
echoMap
.
cardId
.
bindingTime
||
res
[
i
].
echoMap
.
cardId
.
buyTime
||
res
[
i
].
echoMap
.
cardId
.
buyTime
||
...
@@ -247,18 +77,28 @@ export default {
...
@@ -247,18 +77,28 @@ export default {
case
0
:
case
0
:
status
=
'未绑定'
status
=
'未绑定'
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
subtitle
=
'请前往绑定'
break
break
case
5
:
case
5
:
status
=
'已绑定'
status
=
'已绑定'
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
subtitle
=
'请前往首页答题联系吧'
break
break
case
10
:
case
10
:
status
=
'已激活'
status
=
'已激活'
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
let
leaveDay
=
0
if
(
res
[
i
].
echoMap
.
cardId
&&
res
[
i
].
echoMap
.
cardId
.
activationTime
)
{
let
diff
=
this
.
datedifference
(
sDate1
,
sDate2
)
leaveDay
=
res
[
i
].
echoMap
.
cardId
.
effectiveDay
-
diff
leaveDay
=
leaveDay
>
0
?
leaveDay
:
0
}
data
[
i
].
subtitle
=
'题库将于'
+
leaveDay
+
'天后到期'
break
break
case
15
:
case
15
:
status
=
'已失效'
status
=
'已失效'
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
subtitle
=
'题库已失效'
break
break
default
:
default
:
break
break
...
@@ -266,9 +106,21 @@ export default {
...
@@ -266,9 +106,21 @@ export default {
data
[
i
].
status
=
status
data
[
i
].
status
=
status
}
}
this
.
lists
=
data
this
.
lists
=
data
console
.
log
(
data
)
console
.
log
(
'tiku data'
,
data
)
})
})
},
},
methods
:
{
datedifference
(
sDate1
,
sDate2
)
{
//2021-01-01,2020-02-01,31
var
dateSpan
,
tempDate
,
iDays
sDate1
=
Date
.
parse
(
sDate1
)
sDate2
=
Date
.
parse
(
sDate2
)
dateSpan
=
sDate2
-
sDate1
dateSpan
=
Math
.
abs
(
dateSpan
)
iDays
=
Math
.
floor
(
dateSpan
/
(
24
*
3600
*
1000
))
return
iDays
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/mine/certify.vue
View file @
3f743565
...
@@ -150,15 +150,16 @@ export default {
...
@@ -150,15 +150,16 @@ export default {
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
this
.
student
.
identityFrontPath
=
res
.
key
this
.
student
.
identityFrontPath
=
res
.
key
this
.
$u
.
api
this
.
$u
.
api
.
checkIdCardFront
({
id_card_front
:
res
.
key
})
.
getCertifyInfoByType
(
'front'
,
{
.
then
(()
=>
{})
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
console
.
log
(
'识别结果'
,
res
)
this
.
student
.
name
=
res
.
name
this
.
student
.
identityNumber
=
res
.
number
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
if
(
data
.
errMsg
==
'request:ok'
)
{
this
.
student
.
name
=
data
.
data
.
id_card_name
this
.
student
.
identityNumber
=
data
.
data
.
id_card_number
}
else
{
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
}
})
})
})
})
},
},
...
@@ -167,14 +168,15 @@ export default {
...
@@ -167,14 +168,15 @@ export default {
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
this
.
student
.
identityBackPath
=
res
.
key
this
.
student
.
identityBackPath
=
res
.
key
this
.
$u
.
api
this
.
$u
.
api
.
checkIdCardBack
({
id_card_back
:
res
.
key
})
.
getCertifyInfoByType
(
'back'
,
{
.
then
(()
=>
{})
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
console
.
log
(
'识别结果'
,
res
)
this
.
student
.
certificateValidityDate
=
res
.
expire
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
if
(
data
.
errMsg
==
'request:ok'
)
{
this
.
student
.
certificateValidityDate
=
data
.
data
.
id_card_expire
}
else
{
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
}
})
})
})
})
},
},
...
...
src/pages/mine/info.vue
View file @
3f743565
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
>
>
<view
slot=
"right-icon"
>
<view
slot=
"right-icon"
>
<u-image
<u-image
v-if=
"
isupLo
adCertPhoto"
v-if=
"
he
adCertPhoto"
width=
"92rpx"
width=
"92rpx"
height=
"120rpx"
height=
"120rpx"
:src=
"headCertPhoto"
:src=
"headCertPhoto"
...
@@ -82,7 +82,9 @@ import login from '@/common/login'
...
@@ -82,7 +82,9 @@ import login from '@/common/login'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
student
:
{},
student
:
{
isCertify
:
false
,
},
token
:
null
,
token
:
null
,
code
:
''
,
code
:
''
,
}
}
...
@@ -94,13 +96,11 @@ export default {
...
@@ -94,13 +96,11 @@ export default {
)
)
},
},
headCertPhoto
()
{
headCertPhoto
()
{
return
(
console
.
log
(
(
this
.
student
&&
this
.
student
.
certificatePhotoPath
)
||
'touxiang bianle'
,
process
.
uniEnv
.
qn_base_url
+
'xitongtouxiang.p
ng'
this
.
student
?
this
.
student
.
certificatePhotoPath
:
'ko
ng'
)
)
},
return
(
this
.
student
&&
this
.
student
.
certificatePhotoPath
)
||
false
isupLoadCertPhoto
()
{
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
},
},
getMobile
()
{
getMobile
()
{
return
(
return
(
...
@@ -115,20 +115,24 @@ export default {
...
@@ -115,20 +115,24 @@ export default {
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'去填写'
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'去填写'
},
},
getCertifyStatus
()
{
getCertifyStatus
()
{
return
this
.
student
&&
this
.
student
.
isCertify
?
'已认证'
:
'去认证'
console
.
log
(
'is cert'
,
this
.
student
.
isCertify
)
return
this
.
student
.
isCertify
?
'已认证'
:
'去认证'
},
},
},
},
onLoad
()
{
onLoad
()
{
this
.
$u
.
api
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
token
=
data
.
data
.
token
//token为七牛云的token一般由后台接口提供
console
.
log
(
'chushihua token'
,
res
)
getApp
().
globalData
.
qiNiuToken
=
data
.
data
.
token
this
.
token
=
res
//token为七牛云的token一般由后台接口提供
getApp
().
globalData
.
qiNiuToken
=
res
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
if
(
res
&&
res
.
identityNumber
)
{
console
.
log
(
'huoqu userinfo'
,
res
)
this
.
student
.
isCertify
=
true
res
.
isCertify
=
}
res
&&
res
.
identityNumber
&&
res
.
identityNumber
.
length
>
5
?
true
:
false
this
.
student
=
res
this
.
student
=
res
})
})
},
},
...
...
src/pages/search/index.vue
View file @
3f743565
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
bg-color=
"#fff"
bg-color=
"#fff"
v-model=
"keyword"
v-model=
"keyword"
@
custom=
"search"
@
custom=
"search"
@
search=
"search"
></u-search>
></u-search>
</view>
</view>
...
@@ -32,7 +31,7 @@
...
@@ -32,7 +31,7 @@
>
>
</view>
</view>
<view
class=
"u-flex clear"
@
click=
"removeHistory"
>
<view
class=
"u-flex clear"
@
click=
"removeHistory"
v-if=
"history.length > 0"
>
<image
:src=
"deleteImg"
></image>
<image
:src=
"deleteImg"
></image>
<view>
清空搜索历史记录
</view>
<view>
清空搜索历史记录
</view>
</view>
</view>
...
@@ -113,6 +112,9 @@ export default {
...
@@ -113,6 +112,9 @@ export default {
.history
{
.history
{
margin-top
:
20rpx
;
margin-top
:
20rpx
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
max-height
:
190rpx
;
overflow
:
hidden
;
align-items
:
flex-start
;
.history-list
{
.history-list
{
padding
:
20rpx
25rpx
;
padding
:
20rpx
25rpx
;
background
:
#fff
;
background
:
#fff
;
...
...
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