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
d00c5517
Commit
d00c5517
authored
Jul 27, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:证书查询
parent
dc626dba
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
715 additions
and
329 deletions
+715
-329
user.js
src/api/user.js
+4
-0
pages.json
src/pages.json
+16
-1
detail.vue
src/pages/cert/detail.vue
+152
-71
detailLearn.vue
src/pages/cert/detailLearn.vue
+254
-0
cert.vue
src/pages/index/cert.vue
+221
-192
mine.vue
src/pages/index/mine.vue
+1
-1
info.vue
src/pages/mine/info.vue
+12
-7
u-td.vue
src/uview-ui/components/u-td/u-td.vue
+55
-57
No files found.
src/api/user.js
View file @
d00c5517
...
@@ -27,6 +27,9 @@ let userApiFun = function(vm) {
...
@@ -27,6 +27,9 @@ let userApiFun = function(vm) {
params
params
)
)
let
getCertFromOut
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/certificate/national'
,
params
)
const
userApi
=
{
const
userApi
=
{
updateUserInfo
,
updateUserInfo
,
getUserInfo
,
getUserInfo
,
...
@@ -35,6 +38,7 @@ let userApiFun = function(vm) {
...
@@ -35,6 +38,7 @@ let userApiFun = function(vm) {
getCountryCertList
,
getCountryCertList
,
getlearnCertList
,
getlearnCertList
,
getlearnCertDetail
,
getlearnCertDetail
,
getCertFromOut
,
}
}
return
userApi
return
userApi
}
}
...
...
src/pages.json
View file @
d00c5517
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"证书"
,
"navigationBarTitleText"
:
"证书"
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
tru
e
"disableScroll"
:
fals
e
}
}
},
},
{
{
...
@@ -239,6 +239,21 @@
...
@@ -239,6 +239,21 @@
}
}
]
]
},
},
{
"root"
:
"pages/cert"
,
"pages"
:
[
{
"path"
:
"detailLearn"
,
"name"
:
"certDetailLearn"
,
"style"
:
{
"navigationBarTitleText"
:
"证书详情-学时证"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
false
}
}
]
},
{
{
"root"
:
"pages/mine"
,
"root"
:
"pages/mine"
,
"pages"
:
[
"pages"
:
[
...
...
src/pages/cert/detail.vue
View file @
d00c5517
...
@@ -14,96 +14,76 @@
...
@@ -14,96 +14,76 @@
<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
class=
"item"
>
<view
v-if=
"type == 'country'"
class=
"item"
>
<view
class=
"name"
>
低压电工证
</view>
<view
class=
"name"
>
{{
certName
}}
</view>
<view
class=
"table"
>
<view
class=
"table"
>
<u-table>
<u-table>
<u-tr
v-for=
"item in data.certificateTextContent"
class=
"u-tr"
>
<u-td
v-for=
"(val, name, index) in item"
:key=
"index"
class=
"u-td"
>
{{
val
}}
</u-td>
</u-tr>
</u-table>
</view>
</view>
<view
v-if=
"type == 'learn'"
class=
"item"
style=
"margin-top: 30rpx;"
>
<view
class=
"table"
>
<u-table
border-color=
"#9EA5BB"
>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-th
class=
"u-th"
>
姓名
</u-th>
<u-td
class=
"u-td bg-td"
>
姓名
</u-td>
<u-th
class=
"u-th"
>
年龄
</u-th>
<u-td
class=
"u-td"
>
{{
name
}}
</u-td>
<u-th
class=
"u-th"
>
籍贯
</u-th>
<u-th
class=
"u-th"
>
性别
</u-th>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td bg-td"
>
身份证号
</u-td></u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
idCard
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td bg-td"
>
工作单位
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
company
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td bg-td"
>
资格类型
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
subjectName
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td bg-td"
>
培训机构
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
institutionName
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td bg-td"
>
培训日期
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
learnDate
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
</u-table>
</u-table>
</view>
</view>
</view>
<view
class=
"table"
style=
"margin-top: 30rpx;"
>
<view
class=
"item"
>
<u-table
class=
"table"
>
<view
class=
"name"
>
低压电工证
</view>
<view
class=
"table"
>
<u-table>
<u-tr
class=
"u-tr"
>
<u-th
class=
"u-th"
>
姓名
</u-th>
<u-th
class=
"u-th"
>
年龄
</u-th>
<u-th
class=
"u-th"
>
籍贯
</u-th>
<u-th
class=
"u-th"
>
性别
</u-th>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td"
>
培训方式
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
最高分
</u-td>
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
实修学时
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
<u-td
class=
"u-td"
>
测试成绩
</u-td>
</u-tr>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td"
>
在线培训
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
{{
maxpoint
}}
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
{{
learnTime
}}
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
<u-td
class=
"u-td"
>
{{
resultForTest
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
吕布
</u-td>
<u-td
class=
"u-td"
>
22
</u-td>
<u-td
class=
"u-td"
>
楚河
</u-td>
<u-td
class=
"u-td"
>
男
</u-td>
</u-tr>
</u-tr>
</u-table>
</u-table>
</view>
</view>
<view
class=
"cert-foot"
>
<text
class=
"cert-top"
>
{{
institutionName
}}
</text>
<text
class=
"cert-bottom"
>
{{
startDate
}}
</text>
</view>
</view>
</view>
</view>
</view>
<view
class=
"foot"
>
<view
class=
"foot"
>
<text>
证书机构:中华人民共和国应急管理部
</text>
<text>
证书机构:中华人民共和国应急管理部
</text>
<text
style=
"padding-top: 28rpx;"
>
更新时间:
2021.07.21
</text>
<text
style=
"padding-top: 28rpx;"
>
更新时间:
{{
nowDate
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -114,13 +94,95 @@
...
@@ -114,13 +94,95 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
data
:
null
,
data
:
{
certificateTextContent
:
[],
},
learnData
:
{},
type
:
null
,
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
}
}
},
},
onShow
:
function
()
{
onShow
:
function
()
{
this
.
data
=
getApp
().
globalData
.
certItemData
this
.
formatDataByType
()
console
.
log
(
'shoudao param'
,
this
.
data
)
},
computed
:
{
nowDate
(){
var
Today
=
new
Date
();
let
m
=
(
Today
.
getMonth
()
+
1
)
let
d
=
Today
.
getDate
()
return
(
Today
.
getFullYear
()
+
'.'
+
(
String
(
m
).
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
String
(
d
).
length
>
1
?
d
:
'0'
+
d
))
},
startDate
(){
return
this
.
learnData
.
startDate
||
' '
},
learnDate
(){
return
this
.
learnData
.
startDate
+
'~'
+
this
.
learnData
.
endDate
},
name
(){
return
this
.
learnData
.
name
||
' '
},
idCard
(){
return
this
.
learnData
.
idCard
||
' '
},
company
(){
return
this
.
learnData
.
company
||
' '
},
subjectName
(){
return
this
.
learnData
.
subjectName
||
' '
},
institutionName
(){
return
this
.
learnData
.
institutionName
||
' '
},
maxpoint
(){
return
this
.
learnData
.
maxPoint
||
0
},
learnTime
(){
return
this
.
learnData
.
time
||
0
},
resultForTest
(){
return
this
.
learnData
.
maxPoint
>
80
&&
'合格'
||
'不合格'
},
},
methods
:
{
formatDataByType
()
{
console
.
log
(
'shoudao param'
,
getApp
().
globalData
.
certItemData
)
if
(
!
getApp
().
globalData
.
certItemData
)
{
return
}
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
count
=
certData
.
data
.
count
||
2
let
list
console
.
log
(
'data is'
,
certData
.
data
)
if
(
!
certData
.
data
.
certificateTextContent
){
list
=
JSON
.
parse
(
JSON
.
parse
(
JSON
.
stringify
(
certData
.
data
.
certificateContent
)))
console
.
log
(
'list is'
,
list
)
}
else
{
list
=
certData
.
data
.
certificateTextContent
}
for
(
let
key
in
list
)
{
countryData
[
key
]
=
[]
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
countryData
[
key
].
push
(
list
[
key
][
'filedName_'
+
i
])
countryData
[
key
].
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
}
},
},
},
}
}
</
script
>
</
script
>
...
@@ -149,7 +211,7 @@ export default {
...
@@ -149,7 +211,7 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding
:
1
30rpx
24rpx
0rpx
24rpx
;
padding
:
30rpx
24rpx
0rpx
24rpx
;
}
}
.cert-body
{
.cert-body
{
...
@@ -161,20 +223,25 @@ export default {
...
@@ -161,20 +223,25 @@ export default {
position
:
relative
;
position
:
relative
;
.top
{
.top
{
height
:
116rpx
;
height
:
116rpx
;
background-color
:
#000000
;
}
}
.table-list
{
.table-list
{
margin-top
:
20rpx
;
margin-top
:
20rpx
;
margin-bottom
:
200rpx
;
margin-bottom
:
200rpx
;
.name
{
.name
{
font-size
:
2
4
rpx
;
font-size
:
2
8
rpx
;
text-align
:
left
;
text-align
:
left
;
padding
:
30rpx
0
;
padding
:
30rpx
0
;
color
:
#191C27
;
font-weight
:
bold
;
}
}
.table
{
.table
{
background-color
:
#2953ff
;
/* background-color: #2953ff; */
min-height
:
200rpx
;
min-height
:
200rpx
;
}
}
.bg-td
{
background-color
:
#E8EBF3
!
important
;
font-weight
:
bold
!
important
;
}
}
}
.foot
{
.foot
{
position
:
absolute
;
position
:
absolute
;
...
@@ -189,5 +256,19 @@ export default {
...
@@ -189,5 +256,19 @@ export default {
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#5a6073
;
color
:
#5a6073
;
}
}
.cert-foot
{
height
:
100rpx
;
width
:
100%
;
text-align
:
right
;
padding-left
:
24rpx
;
display
:
flex
;
flex-direction
:
column
;
font-size
:
24rpx
;
color
:
#5a6073
;
}
.
u-tr
:
:
v-deep
.
u-td
{
font-size
:
22rpx
!
important
;
height
:
70rpx
;
}
}
}
</
style
>
</
style
>
src/pages/cert/detailLearn.vue
0 → 100644
View file @
d00c5517
<
template
>
<view
class=
"begin-answer"
>
<u-navbar
back-icon-color=
"#ffffff"
background=
"transparent"
title=
"证书详情"
titleColor=
"#ffffff"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"content"
>
<view
class=
"cert-body"
>
<view
class=
"top"
></view>
<view
class=
"top-baody"
>
<view
class=
"table-list"
>
<view
class=
"head-photo"
>
<u-image
:src=
"headPhoto"
width=
"144"
height=
"144"
shape=
"circle"
></u-image>
</view>
<view
v-if=
"type == 'learn'"
class=
"item"
style=
"margin-top: 30rpx;"
>
<view
class=
"table"
>
<u-table
border-color=
"#9EA5BB"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
姓名
</u-td>
<u-td
class=
"u-td"
>
{{
name
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
身份证号
</u-td></u-td>
<u-td
class=
"u-td"
>
{{
idCard
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
工作单位
</u-td>
<u-td
class=
"u-td"
>
{{
company
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
资格类型
</u-td>
<u-td
class=
"u-td"
>
{{
subjectName
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
培训机构
</u-td>
<u-td
class=
"u-td"
>
{{
institutionName
}}
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
培训日期
</u-td>
<u-td
class=
"u-td"
>
{{
learnDate
}}
</u-td>
</u-tr>
</u-table>
</view>
<view
class=
"table"
style=
"margin-top: 30rpx;"
>
<u-table
class=
"table"
border-color=
"#9EA5BB"
>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td bg-td"
>
培训方式
</u-td>
<u-td
class=
"u-td bg-td"
>
最高分
</u-td></u-td>
<u-td
class=
"u-td bg-td"
>
实修学时
</u-td>
<u-td
class=
"u-td bg-td"
>
测试成绩
</u-td>
</u-tr>
<u-tr
class=
"u-tr"
>
<u-td
class=
"u-td"
>
在线培训
</u-td>
<u-td
class=
"u-td"
>
{{
maxpoint
}}
</u-td>
<u-td
class=
"u-td"
>
{{
learnTime
}}
</u-td>
<u-td
class=
"u-td"
>
{{
resultForTest
}}
</u-td>
</u-tr>
</u-table>
</view>
</view>
<view
class=
"cert-foot"
>
<text
class=
"cert-top"
style=
"line-height: 60rpx;"
>
{{
institutionName
}}
</text>
<text
class=
"cert-bottom"
>
{{
startDate
}}
</text>
</view>
</view>
</view>
<view
class=
"foot"
>
<text>
证书机构:中华人民共和国应急管理部
</text>
<text
style=
"padding-top: 28rpx;"
>
更新时间:
{{
nowDate
}}
</text>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
learnData
:
{},
type
:
null
,
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
,
}
},
onShow
:
function
()
{
this
.
formatDataByType
()
},
computed
:
{
nowDate
(){
var
Today
=
new
Date
();
let
m
=
(
Today
.
getMonth
()
+
1
)
let
d
=
Today
.
getDate
()
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
},
headPhoto
(){
return
this
.
learnData
.
photo
||
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
},
startDate
()
{
return
this
.
learnData
.
startDate
||
' '
},
learnDate
()
{
return
this
.
learnData
.
startDate
+
'~'
+
this
.
learnData
.
endDate
},
name
()
{
return
this
.
learnData
.
name
||
' '
},
idCard
()
{
return
this
.
learnData
.
idCard
||
' '
},
company
()
{
return
this
.
learnData
.
company
||
' '
},
subjectName
()
{
return
this
.
learnData
.
subjectName
||
' '
},
institutionName
()
{
return
this
.
learnData
.
institutionName
||
' '
},
maxpoint
()
{
return
this
.
learnData
.
maxPoint
||
0
},
learnTime
()
{
return
this
.
learnData
.
time
||
0
},
resultForTest
()
{
return
(
this
.
learnData
.
maxPoint
>
80
&&
'合格'
)
||
'不合格'
},
},
methods
:
{
formatDataByType
()
{
console
.
log
(
'shoudao param'
,
getApp
().
globalData
.
certItemData
.
data
)
if
(
!
getApp
().
globalData
.
certItemData
)
{
return
}
this
.
certName
=
getApp
().
globalData
.
certItemData
.
certificateName
this
.
type
=
'learn'
this
.
learnData
=
getApp
().
globalData
.
certItemData
.
data
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.begin-answer
{
display
:
flex
;
flex-direction
:
column
;
background-color
:
#2953ff
;
background-size
:
100%
920rpx
;
background-repeat
:
no-repeat
;
height
:
120vh
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
}
.content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
padding
:
30rpx
24rpx
0rpx
24rpx
;
}
.cert-body
{
width
:
702rpx
;
background-color
:
#ffffff
;
text-align
:
center
;
border-radius
:
12rpx
;
position
:
relative
;
height
:
1254rpx
;
.top
{
width
:
100%
;
height
:
240rpx
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background-image
:
url('https://qn-static.banshouhui.com/study/xueshitoubu@2x.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
;
background-position
:
center
;
}
.top-baody
{
height
:
1090rpx
;
width
:
100%
;
position
:
absolute
;
background-repeat
:
no-repeat
;
background-size
:
95%
;
background-position
:
center
;
background-image
:
url('https://qn-static.banshouhui.com/study/biantiao@2x.png')
;
.head-photo
{
height
:
145rpx
;
padding-left
:
260rpx
;
}
.table-list
{
padding
:
160rpx
40rpx
0
40rpx
;
.name
{
font-size
:
24rpx
;
text-align
:
left
;
padding
:
30rpx
0
;
}
.table
{
/* background-color: #2953ff; */
/* min-height: 200rpx; */
}
::v-deep
.u-td
{
height
:
70rpx
;
}
.bg-td
{
background-color
:
#E8EBF3
;
font-weight
:
bold
;
}
}
.cert-foot
{
height
:
100rpx
;
width
:
100%
;
text-align
:
right
;
padding-left
:
24rpx
;
display
:
flex
;
flex-direction
:
column
;
font-size
:
24rpx
;
color
:
#5a6073
;
margin-top
:
30rpx
;
}
.
u-tr
:
:
v-deep
.
u-td
{
font-size
:
22rpx
!
important
;
}
}
.foot
{
height
:
100rpx
;
width
:
100%
;
text-align
:
left
;
padding-left
:
24rpx
;
display
:
flex
;
flex-direction
:
column
;
font-size
:
28rpx
;
color
:
#5a6073
;
position
:
absolute
;
font-weight
:
500
;
bottom
:
40rpx
;
left
:
0
;
}
}
</
style
>
src/pages/index/cert.vue
View file @
d00c5517
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view
class=
"study"
>
<view
class=
"study"
>
<u-tabs-swiper
<u-tabs-swiper
bg-color=
"#F4F5F7"
bg-color=
"#F4F5F7"
inactive-color=
"#
999999
"
inactive-color=
"#
191C27
"
font-size=
"28"
font-size=
"28"
ref=
"uTabs"
ref=
"uTabs"
:list=
"tabs"
:list=
"tabs"
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
:is-scroll=
"false"
:is-scroll=
"false"
:bar-width=
"52"
:bar-width=
"52"
swiperWidth=
"750"
swiperWidth=
"750"
active-color=
"#2953FF"
></u-tabs-swiper>
></u-tabs-swiper>
<swiper
<swiper
class=
"swiper_group"
class=
"swiper_group"
...
@@ -44,10 +45,12 @@
...
@@ -44,10 +45,12 @@
<view
class=
"item"
>
<view
class=
"item"
>
<text
class=
"title"
>
选择查询证书类型
</text>
<text
class=
"title"
>
选择查询证书类型
</text>
<u-input
<u-input
v-model=
"
valu
e"
v-model=
"
checkTyp
e"
:type=
"type"
:type=
"type"
:border=
"border"
:border=
"border"
@
click=
"show = true"
@
click=
"show = true"
value=
"特种作业操作证查询"
placeholder=
"请选择"
/>
/>
</view>
</view>
<view
class=
"item"
>
<view
class=
"item"
>
...
@@ -56,6 +59,7 @@
...
@@ -56,6 +59,7 @@
class=
"input"
class=
"input"
v-model=
"certId"
v-model=
"certId"
placeholder=
"请输入身份证号"
placeholder=
"请输入身份证号"
:clearable=
"false"
/>
/>
</view>
</view>
<view
class=
"item"
>
<view
class=
"item"
>
...
@@ -64,11 +68,12 @@
...
@@ -64,11 +68,12 @@
class=
"input"
class=
"input"
v-model=
"certName"
v-model=
"certName"
placeholder=
"请输入姓名"
placeholder=
"请输入姓名"
:clearable=
"false"
/>
/>
</view>
</view>
<view
class=
"tips-bottom"
></view>
<view
class=
"tips-bottom"
>
请确认与所在考试省份一致
</view>
</view>
</view>
<button
class=
"sub-button"
>
查询
</button>
<button
class=
"sub-button"
@
tap=
"submit"
>
查询
</button>
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
...
@@ -115,20 +120,9 @@
...
@@ -115,20 +120,9 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
// lists: [
checkType
:
null
,
// {
certId
:
null
,
// certificateName: '低压电工证',
certName
:
null
,
// bgImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png'
// },
// {
// certificateName: '高压电工证',
// bgImage: process.uniEnv.qn_base_url + 'zhengshubeijing@2x.png'
// },
// {
// certificateName: '高处安装、维护、拆除作业人员',
// bgImage: process.uniEnv.qn_base_url + 'xueshizhengmingbeijing@2x.png'
// },
// ],
countryCertList
:
[],
countryCertList
:
[],
learnCertList
:
[],
learnCertList
:
[],
countryCertImage
:
process
.
uniEnv
.
qn_base_url
+
'zhengshubeijing@2x.png'
,
countryCertImage
:
process
.
uniEnv
.
qn_base_url
+
'zhengshubeijing@2x.png'
,
...
@@ -166,25 +160,9 @@ export default {
...
@@ -166,25 +160,9 @@ export default {
_freshing
:
false
,
_freshing
:
false
,
}
}
},
},
computed
:
{
computed
:
{},
// lists(){
// let data = []
// if(this.countryCertList.length > 0){
// for(let j in this.countryCertList){
// data.unshift(this.countryCertList[j])
// }
// }
// if(this.learnCertList.length > 0){
// for(let k in this.learnCertList){
// data.unshift(this.learnCertList[k])
// }
// }
// console.log('data', data)
// return data
// }
},
onLoad
()
{
onLoad
()
{
this
.
checkType
=
'特种作业操作证查询'
},
},
onShow
:
function
(
param
)
{
onShow
:
function
(
param
)
{
try
{
try
{
...
@@ -196,6 +174,44 @@ export default {
...
@@ -196,6 +174,44 @@ export default {
this
.
tabsChange
(
this
.
current
)
this
.
tabsChange
(
this
.
current
)
},
},
methods
:
{
methods
:
{
submit
(){
if
(
!
this
.
checkType
){
this
.
$u
.
toast
(
'请选择查询类型'
)
return
}
console
.
log
(
'cert'
,
this
.
certId
)
if
(
!
this
.
certId
){
this
.
$u
.
toast
(
'请填写证件号码!'
)
return
}
if
(
!
this
.
certName
){
this
.
$u
.
toast
(
'请填写姓名!'
)
return
}
let
param
=
{
personalCertNum
:
this
.
certId
,
personalName
:
this
.
certName
}
console
.
log
(
param
)
this
.
$u
.
api
.
getCertFromOut
(
param
).
then
((
res
)
=>
{
console
.
log
(
'证书查询结果'
,
res
)
if
(
!
res
){
this
.
$u
.
toast
(
'证书暂未公布'
)
return
}
let
item
=
{}
item
.
certificateName
=
res
[
0
].
certificateName
.
replace
(
'作业'
,
'证'
)
item
.
bgImage
=
this
.
countryCertImage
item
.
type
=
'country'
item
.
key
=
0
item
.
data
=
res
[
0
]
this
.
goDetail
(
item
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
$u
.
toast
(
'证书暂未公布'
)
return
})
},
//获取国家证书数据
//获取国家证书数据
getCountryCert
(){
getCountryCert
(){
this
.
$u
.
api
.
getCountryCertList
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getCountryCertList
().
then
((
res
)
=>
{
...
@@ -208,16 +224,16 @@ export default {
...
@@ -208,16 +224,16 @@ export default {
for
(
let
key
in
res
){
for
(
let
key
in
res
){
//判断是否是table数据格式,否则暂不展示,后面如果有再补充显示图片格式
//判断是否是table数据格式,否则暂不展示,后面如果有再补充显示图片格式
if
(
if
(
res
[
key
].
certificateSource
!=
2
Number
(
res
[
key
].
certificateType
)
!=
2
){
||
res
[
key
].
certificateType
!=
2
){
continue
continue
}
}
data
[
key
]
=
{}
let
item
=
{}
data
[
key
].
certificateName
=
res
[
key
].
certificateName
.
replace
(
'作业'
,
'证'
)
item
.
certificateName
=
res
[
key
].
certificateName
.
replace
(
'作业'
,
'证'
)
data
[
key
].
bgImage
=
this
.
countryCertImage
item
.
bgImage
=
this
.
countryCertImage
data
[
key
].
type
=
'country'
item
.
type
=
'country'
data
[
key
].
key
=
key
item
.
key
=
key
data
[
key
].
data
=
res
[
key
]
//传给详情页
item
.
data
=
res
[
key
]
//传给详情页
data
.
push
(
item
)
}
}
this
.
countryCertList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
this
.
countryCertList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
})
})
...
@@ -225,128 +241,128 @@ export default {
...
@@ -225,128 +241,128 @@ export default {
//获取学时数据
//获取学时数据
getLearnCert
(){
getLearnCert
(){
this
.
$u
.
api
.
getlearnCertList
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getlearnCertList
().
then
((
res
)
=>
{
res
=
[
//
res = [
{
//
{
"id"
:
"1415602594134360064"
,
//
"id": "1415602594134360064",
"createTime"
:
"2021-07-15 17:41:51"
,
//
"createTime": "2021-07-15 17:41:51",
"createdBy"
:
"1415215255998431232"
,
//
"createdBy": "1415215255998431232",
"updateTime"
:
"2021-07-15 17:41:51"
,
//
"updateTime": "2021-07-15 17:41:51",
"updatedBy"
:
null
,
//
"updatedBy": null,
"echoMap"
:
{
//
"echoMap": {
"studentId"
:
{
//
"studentId": {
"id"
:
"1414459877807357952"
,
//
"id": "1414459877807357952",
"createTime"
:
"2021-07-12 13:41:29"
,
//
"createTime": "2021-07-12 13:41:29",
"createdBy"
:
"3"
,
//
"createdBy": "3",
"updateTime"
:
"2021-07-20 20:41:13"
,
//
"updateTime": "2021-07-20 20:41:13",
"updatedBy"
:
"1414459877807357952"
,
//
"updatedBy": "1414459877807357952",
"echoMap"
:
{},
//
"echoMap": {},
"cardCount"
:
null
,
//
"cardCount": null,
"consumeAmount"
:
null
,
//
"consumeAmount": null,
"loginTime"
:
null
,
//
"loginTime": null,
"code"
:
"XY20210723000001"
,
//
"code": "XY20210723000001",
"unionid"
:
""
,
//
"unionid": "",
"nickname"
:
""
,
//
"nickname": "",
"name"
:
""
,
//
"name": "",
"phoneNumber"
:
"11111111111"
,
//
"phoneNumber": "11111111111",
"avatarPath"
:
""
,
//
"avatarPath": "",
"identityNumber"
:
""
,
//
"identityNumber": "",
"identityFrontPath"
:
""
,
//
"identityFrontPath": "",
"identityBackPath"
:
""
,
//
"identityBackPath": "",
"certificatePhotoPath"
:
""
,
//
"certificatePhotoPath": "",
"certificateValidityDate"
:
null
,
//
"certificateValidityDate": null,
"workUnit"
:
""
,
//
"workUnit": "",
"address"
:
""
//
"address": ""
},
//
},
"questionWarehouseId"
:
{
//
"questionWarehouseId": {
"id"
:
"1"
,
//
"id": "1",
"createTime"
:
"2021-07-12 16:33:20"
,
//
"createTime": "2021-07-12 16:33:20",
"createdBy"
:
null
,
//
"createdBy": null,
"updateTime"
:
"2021-07-21 14:40:44"
,
//
"updateTime": "2021-07-21 14:40:44",
"updatedBy"
:
"1413688964405002240"
,
//
"updatedBy": "1413688964405002240",
"echoMap"
:
{},
//
"echoMap": {},
"institutionId"
:
"1"
,
//
"institutionId": "1",
"subjectId"
:
"1413687160678121472"
,
//
"subjectId": "1413687160678121472",
"title"
:
"测试1"
,
//
"title": "测试1",
"subtitle"
:
"侧首"
,
//
"subtitle": "侧首",
"description"
:
"哈哈哈哈"
,
//
"description": "哈哈哈哈",
"effectiveTime"
:
"1"
,
//
"effectiveTime": "1",
"provinceId"
:
"470715"
,
//
"provinceId": "470715",
"cityId"
:
"475286"
,
//
"cityId": "475286",
"type"
:
"1"
,
//
"type": "1",
"price"
:
"100.00"
,
//
"price": "100.00",
"realPrice"
:
"50.00"
,
//
"realPrice": "50.00",
"state"
:
true
,
//
"state": true,
"remark"
:
"123231"
,
//
"remark": "123231",
"version"
:
null
//
"version": null
}
//
}
},
//
},
"number"
:
null
,
//
"number": null,
"questionWarehouseId"
:
"1"
,
//
"questionWarehouseId": "1",
"institutionId"
:
"-1"
,
//
"institutionId": "-1",
"studentId"
:
"1414459877807357952"
,
//
"studentId": "1414459877807357952",
"cardId"
:
"1416278788987158528"
//
"cardId": "1416278788987158528"
},
//
},
{
//
{
"id"
:
"1418473748293484544"
,
//
"id": "1418473748293484544",
"createTime"
:
"2021-07-23 15:31:10"
,
//
"createTime": "2021-07-23 15:31:10",
"createdBy"
:
"1414459877807357952"
,
//
"createdBy": "1414459877807357952",
"updateTime"
:
"2021-07-24 14:45:15"
,
//
"updateTime": "2021-07-24 14:45:15",
"updatedBy"
:
"1414459877807357952"
,
//
"updatedBy": "1414459877807357952",
"echoMap"
:
{
//
"echoMap": {
"studentId"
:
{
//
"studentId": {
"id"
:
"1414459877807357952"
,
//
"id": "1414459877807357952",
"createTime"
:
"2021-07-12 13:41:29"
,
//
"createTime": "2021-07-12 13:41:29",
"createdBy"
:
"3"
,
//
"createdBy": "3",
"updateTime"
:
"2021-07-20 20:41:13"
,
//
"updateTime": "2021-07-20 20:41:13",
"updatedBy"
:
"1414459877807357952"
,
//
"updatedBy": "1414459877807357952",
"echoMap"
:
{},
//
"echoMap": {},
"cardCount"
:
null
,
//
"cardCount": null,
"consumeAmount"
:
null
,
//
"consumeAmount": null,
"loginTime"
:
null
,
//
"loginTime": null,
"code"
:
"XY20210723000001"
,
//
"code": "XY20210723000001",
"unionid"
:
""
,
//
"unionid": "",
"nickname"
:
""
,
//
"nickname": "",
"name"
:
""
,
//
"name": "",
"phoneNumber"
:
"11111111111"
,
//
"phoneNumber": "11111111111",
"avatarPath"
:
""
,
//
"avatarPath": "",
"identityNumber"
:
""
,
//
"identityNumber": "",
"identityFrontPath"
:
""
,
//
"identityFrontPath": "",
"identityBackPath"
:
""
,
//
"identityBackPath": "",
"certificatePhotoPath"
:
""
,
//
"certificatePhotoPath": "",
"certificateValidityDate"
:
null
,
//
"certificateValidityDate": null,
"workUnit"
:
""
,
//
"workUnit": "",
"address"
:
""
//
"address": ""
},
//
},
"questionWarehouseId"
:
{
//
"questionWarehouseId": {
"id"
:
"1414854649273384960"
,
//
"id": "1414854649273384960",
"createTime"
:
"2021-07-13 15:50:10"
,
//
"createTime": "2021-07-13 15:50:10",
"createdBy"
:
"1413688964405002240"
,
//
"createdBy": "1413688964405002240",
"updateTime"
:
"2021-07-23 14:41:30"
,
//
"updateTime": "2021-07-23 14:41:30",
"updatedBy"
:
"1413688964405002240"
,
//
"updatedBy": "1413688964405002240",
"echoMap"
:
{},
//
"echoMap": {},
"institutionId"
:
"1"
,
//
"institutionId": "1",
"subjectId"
:
"1418169087225233408"
,
//
"subjectId": "1418169087225233408",
"title"
:
"登高架设作业"
,
//
"title": "登高架设作业",
"subtitle"
:
"大狼狗"
,
//
"subtitle": "大狼狗",
"description"
:
"sad"
,
//
"description": "sad",
"effectiveTime"
:
"0"
,
//
"effectiveTime": "0",
"provinceId"
:
"470715"
,
//
"provinceId": "470715",
"cityId"
:
"475286"
,
//
"cityId": "475286",
"type"
:
"1"
,
//
"type": "1",
"price"
:
"100.00"
,
//
"price": "100.00",
"realPrice"
:
"60.00"
,
//
"realPrice": "60.00",
"state"
:
true
,
//
"state": true,
"remark"
:
""
,
//
"remark": "",
"version"
:
"0"
//
"version": "0"
}
//
}
},
//
},
"number"
:
null
,
//
"number": null,
"questionWarehouseId"
:
"1414854649273384960"
,
//
"questionWarehouseId": "1414854649273384960",
"institutionId"
:
"-1"
,
//
"institutionId": "-1",
"studentId"
:
"1414459877807357952"
,
//
"studentId": "1414459877807357952",
"cardId"
:
"0"
//
"cardId": "0"
}
//
}
]
//
]
console
.
log
(
'学时证'
,
res
);
console
.
log
(
'学时证'
,
res
);
if
(
!
res
||
res
.
length
==
0
){
if
(
!
res
||
res
.
length
==
0
){
//空显示缺醒
//空显示缺醒
...
@@ -358,12 +374,13 @@ export default {
...
@@ -358,12 +374,13 @@ export default {
if
(
!
res
[
key
].
echoMap
||
!
res
[
key
].
echoMap
.
questionWarehouseId
){
if
(
!
res
[
key
].
echoMap
||
!
res
[
key
].
echoMap
.
questionWarehouseId
){
continue
continue
}
}
data
[
key
]
=
{}
let
item
=
{}
data
[
key
].
certificateName
=
res
[
key
].
echoMap
.
questionWarehouseId
.
title
.
replace
(
'作业'
,
'证'
)
item
.
certificateName
=
res
[
key
].
echoMap
.
questionWarehouseId
.
title
.
replace
(
'作业'
,
'证'
)
data
[
key
].
id
=
res
[
key
].
echoMap
.
questionWarehouseId
.
id
item
.
id
=
res
[
key
].
echoMap
.
questionWarehouseId
.
id
data
[
key
].
bgImage
=
this
.
learnCertImage
item
.
bgImage
=
this
.
learnCertImage
data
[
key
].
type
=
'learn'
item
.
type
=
'learn'
data
[
key
].
key
=
key
item
.
key
=
key
data
.
push
(
item
)
}
}
console
.
log
(
'学时证处理结果'
,
data
)
console
.
log
(
'学时证处理结果'
,
data
)
this
.
learnCertList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
this
.
learnCertList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
...
@@ -373,30 +390,30 @@ export default {
...
@@ -373,30 +390,30 @@ export default {
console
.
log
(
'goto param'
,
param
)
console
.
log
(
'goto param'
,
param
)
if
(
param
.
type
==
'learn'
){
if
(
param
.
type
==
'learn'
){
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
this
.
$u
.
api
.
getlearnCertDetail
(
param
.
id
).
then
((
res
)
=>
{
//
this.$u.api.getlearnCertDetail(param.id).then((res)=>{
res
=
{
// let
res = {
photo
:
""
,
头像
,
// photo: "https://thirdwx.qlogo.cn/mmopen/vi_32/c20Wk8HTurnNnKJMmnAnib9CUtqicwKKIMCvzViaBn0icNnpmeOQbSiaRklWCcfUOlW7oqj2o7u65d6F3ZwmZtLVZaw/132",//
头像,
name
:
""
,
名字
,
// name: "阿三哥",//
名字,
idCard
:
""
,
身份证
,
// idCard: "111141222",//
身份证,
company
:
""
,
工作单位
,
// company: "维修班",//
工作单位,
subjectName
:
"测试1"
,
资格类型
,
// subjectName: "测试1",//
资格类型,
institutionName
:
null
,
培训机构名称
,
// institutionName: '阿斯顿学院',//
培训机构名称,
startDate
:
""
,
培训开始时间
,
// startDate: "2011-01-01",//
培训开始时间,
endDate
:
"2021-07-24"
,
培训结束时间
,
// endDate: "2021-07-24",//
培训结束时间,
maxPoint
:
0
,
最高分
,
// maxPoint: 20,//
最高分,
time
:
0
,
学时
,
// time: 0,//
学时,
questionWarehouse
:
null
,
//
questionWarehouse: null,
}
//
}
param
.
data
=
res
param
.
data
=
res
getApp
().
globalData
.
certItemData
=
param
getApp
().
globalData
.
certItemData
=
param
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/cert/detail'
,
url
:
'pages/cert/detail
Learn
'
,
})
})
}).
catch
(
err
=>
{
//
}).catch(err => {
console
.
log
(
err
)
//
console.log(err)
})
//
})
}
else
{
}
else
{
console
.
log
(
'点击国家证,直接参数带过去'
)
console
.
log
(
'点击国家证,直接参数带过去'
,
param
)
getApp
().
globalData
.
certItemData
=
param
getApp
().
globalData
.
certItemData
=
param
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/cert/detail'
,
url
:
'pages/cert/detail'
,
...
@@ -497,6 +514,9 @@ page {
...
@@ -497,6 +514,9 @@ page {
.form
{
.form
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.item
{
padding-top
:
30rpx
;
}
}
}
.
study
:
:
v-deep
swiper
{
.
study
:
:
v-deep
swiper
{
height
:
100%
;
height
:
100%
;
...
@@ -516,6 +536,10 @@ page {
...
@@ -516,6 +536,10 @@ page {
}
}
}
}
}
}
.tips-bottom
{
font-size
:
26rpx
;
color
:
#9EA5BB
;
}
.
study
:
:
v-deep
.
u-input__input
{
.
study
:
:
v-deep
.
u-input__input
{
width
:
702rpx
;
width
:
702rpx
;
height
:
104rpx
;
height
:
104rpx
;
...
@@ -524,6 +548,12 @@ page {
...
@@ -524,6 +548,12 @@ page {
margin
:
32rpx
0
;
margin
:
32rpx
0
;
padding
:
0
0
0
30rpx
;
padding
:
0
0
0
30rpx
;
}
}
.
study
:
:
v-deep
.
u-tabs
{
padding
:
0
130rpx
;
}
/* .study ::v-deep .u-tabs-item{
color: #191C27 !important;
} */
.sub-button
{
.sub-button
{
margin-top
:
150rpx
;
margin-top
:
150rpx
;
height
:
104rpx
;
height
:
104rpx
;
...
@@ -552,7 +582,6 @@ page {
...
@@ -552,7 +582,6 @@ page {
width
:
100%
;
width
:
100%
;
margin-bottom
:
500rpx
;
margin-bottom
:
500rpx
;
.item
{
.item
{
background-color
:
#2953ff
;
width
:
100%
;
width
:
100%
;
height
:
444rpx
;
height
:
444rpx
;
margin-top
:
30rpx
;
margin-top
:
30rpx
;
...
...
src/pages/index/mine.vue
View file @
d00c5517
...
@@ -129,7 +129,7 @@ export default {
...
@@ -129,7 +129,7 @@ export default {
return
this
.
userInfo
.
nickName
!=
undefined
return
this
.
userInfo
.
nickName
!=
undefined
},
},
loginTips
()
{
loginTips
()
{
return
this
.
student
.
consumeAmount
||
0
return
(
this
.
student
&&
this
.
student
.
consumeAmount
)
||
0
},
},
avatar
()
{
avatar
()
{
return
(
this
.
userInfo
&&
this
.
userInfo
.
avatarUrl
)
||
this
.
pic
return
(
this
.
userInfo
&&
this
.
userInfo
.
avatarUrl
)
||
this
.
pic
...
...
src/pages/mine/info.vue
View file @
d00c5517
...
@@ -77,25 +77,27 @@ export default {
...
@@ -77,25 +77,27 @@ export default {
},
},
computed
:
{
computed
:
{
headPhoto
()
{
headPhoto
()
{
return
this
.
student
.
avatarPath
||
this
.
userInfo
.
avatarUrl
return
(
(
this
.
student
&&
this
.
student
.
avatarPath
)
||
this
.
userInfo
.
avatarUrl
)
},
},
headCertPhoto
()
{
headCertPhoto
()
{
return
(
return
(
this
.
student
.
certificatePhotoPath
||
(
this
.
student
&&
this
.
student
.
certificatePhotoPath
)
||
process
.
uniEnv
.
qn_base_url
+
'xitongtouxiang.png'
process
.
uniEnv
.
qn_base_url
+
'xitongtouxiang.png'
)
)
},
},
isupLoadCertPhoto
()
{
isupLoadCertPhoto
()
{
return
this
.
student
.
identityNumber
||
false
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
},
},
getMobile
()
{
getMobile
()
{
return
this
.
student
.
phoneNumber
||
''
return
(
this
.
student
&&
this
.
student
.
phoneNumber
)
||
''
},
},
getCompany
()
{
getCompany
()
{
return
this
.
student
.
workUnit
||
''
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
''
},
},
getCertifyStatus
()
{
getCertifyStatus
()
{
return
!
this
.
student
.
isCertify
?
'去认证'
:
'已认证'
return
this
.
student
&&
!
this
.
student
.
isCertify
?
'去认证'
:
'已认证'
},
},
},
},
onLoad
()
{
onLoad
()
{
...
@@ -108,7 +110,10 @@ export default {
...
@@ -108,7 +110,10 @@ export default {
}
}
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
res
.
isCertify
=
res
.
identityNumber
?
true
:
false
if
(
res
&&
res
.
identityNumber
)
{
res
.
isCertify
=
true
}
this
.
student
=
res
this
.
student
=
res
})
})
},
},
...
...
src/uview-ui/components/u-td/u-td.vue
View file @
d00c5517
<
template
>
<
template
>
<view
class=
"u-td"
:style=
"[tdStyle]"
>
<view
class=
"u-td"
:style=
"[tdStyle]"
>
<slot></slot>
<slot></slot>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
/**
/**
* td td单元格
* td td单元格
* @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
* @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
* @tutorial https://www.uviewui.com/components/table.html#td-props
* @tutorial https://www.uviewui.com/components/table.html#td-props
* @property {String Number} width 单元格宽度百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度(默认auto)
* @property {String Number} width 单元格宽度百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度(默认auto)
* @example <u-td>二年级</u-td>
* @example <u-td>二年级</u-td>
*/
*/
export
default
{
export
default
{
name
:
"u-td"
,
name
:
'u-td'
,
props
:
{
props
:
{
// 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
// 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比
width
:
{
width
:
{
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
default
:
'auto'
default
:
'auto'
,
}
},
},
},
data
()
{
data
()
{
return
{
return
{
tdStyle
:
{
tdStyle
:
{},
}
}
},
}
created
()
{
},
this
.
parent
=
false
created
()
{
},
this
.
parent
=
false
;
mounted
()
{
},
this
.
parent
=
this
.
$u
.
$parent
.
call
(
this
,
'u-table'
)
mounted
()
{
if
(
this
.
parent
)
{
this
.
parent
=
this
.
$u
.
$parent
.
call
(
this
,
'u-table'
);
// 将父组件的相关参数,合并到本组件
if
(
this
.
parent
)
{
let
style
=
{}
// 将父组件的相关参数,合并到本组件
if
(
this
.
width
!=
'auto'
)
style
.
flex
=
`0 0
${
this
.
width
}
`
let
style
=
{};
style
.
textAlign
=
this
.
parent
.
align
if
(
this
.
width
!=
"auto"
)
style
.
flex
=
`0 0
${
this
.
width
}
`
;
style
.
fontSize
=
this
.
parent
.
fontSize
+
'rpx'
style
.
textAlign
=
this
.
parent
.
align
;
style
.
padding
=
this
.
parent
.
padding
style
.
fontSize
=
this
.
parent
.
fontSize
+
'rpx'
;
style
.
borderBottom
=
`solid 1px
${
this
.
parent
.
borderColor
}
`
style
.
padding
=
this
.
parent
.
padding
;
style
.
borderRight
=
`solid 1px
${
this
.
parent
.
borderColor
}
`
style
.
borderBottom
=
`solid 1px
${
this
.
parent
.
borderColor
}
`
;
style
.
color
=
this
.
parent
.
color
style
.
borderRight
=
`solid 1px
${
this
.
parent
.
borderColor
}
`
;
this
.
tdStyle
=
style
style
.
color
=
this
.
parent
.
color
;
}
this
.
tdStyle
=
style
;
},
}
}
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"../../libs/css/style.components.scss"
;
@import
'../../libs/css/style.components.scss'
;
.u-td
{
.u-td
{
@include
vue-flex
;
@include
vue-flex
;
flex-direction
:
column
;
flex-direction
:
column
;
flex
:
1
;
flex
:
1
;
justify-content
:
center
;
justify-content
:
center
;
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
$u-content-color
;
color
:
$u-content-color
;
align-self
:
stretch
;
align-self
:
stretch
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
100%
;
height
:
100%
;
}
}
</
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