Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f7aaee44
authored
2026-06-08 13:58:50 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
头像
1 parent
58c2b92e
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
441 additions
and
151 deletions
common/utils.js
config.js
group/detail.vue
level/addApply.vue
level/apply.vue
level/applyDetail.vue
level/chooseStudent.vue
pages/rank/applyDetail.vue
personal/addVip_per.vue
personal/home.vue
personalVip/addVip.vue
personalVip/detail.vue
personalVip/list.vue
personalVip/vipList.vue
common/utils.js
View file @
f7aaee4
...
...
@@ -58,6 +58,7 @@ export function fillImgUrl(url, prefix) {
if
(
!
url
)
return
''
const
trimmedUrl
=
String
(
url
).
trim
()
if
(
!
trimmedUrl
)
return
''
if
(
trimmedUrl
===
'null'
||
trimmedUrl
===
'undefined'
)
return
''
if
(
trimmedUrl
.
startsWith
(
'msr:'
))
{
return
`
${
trimBaseUrl
(
config
.
baseUrl_api
)}
/fileServer/download?file=
${
encodeURIComponent
(
trimmedUrl
)}
&downFlag=0`
}
...
...
@@ -71,6 +72,21 @@ export function fillImgUrl(url, prefix) {
return
baseUrl
+
path
}
export
function
getMemberPhotoValue
(
item
=
{})
{
return
[
item
.
photo
,
item
.
perPhoto
,
item
.
photo2
,
item
.
perPhoto2
].
find
(
isValidUrlValue
)
||
''
}
export
function
fillMemberPhoto
(
item
=
{},
fallback
=
''
)
{
const
photo
=
getMemberPhotoValue
(
item
)
return
photo
?
fillImgUrl
(
photo
)
:
fallback
}
function
isValidUrlValue
(
value
)
{
if
(
value
===
undefined
||
value
===
null
)
return
false
const
url
=
String
(
value
).
trim
()
return
url
!==
''
&&
url
!==
'null'
&&
url
!==
'undefined'
}
function
trimBaseUrl
(
url
)
{
return
String
(
url
||
''
).
replace
(
/
\/
+$/
,
''
)
}
...
...
config.js
View file @
f7aaee4
// dev
const
baseUrl_api
=
'http://192.168.1.159:8787'
//
const baseUrl_api = 'http://192.168.1.159:8787'
// const baseUrl_api = 'http://47.98.186.233:8787'
//
const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/'
const
baseUrl_api
=
'https://tk001.wxjylt.com/stage-api/'
const
loginImage_api
=
'https://tk001.wxjylt.com/stage-api'
const
payUrl
=
'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
...
...
group/detail.vue
View file @
f7aaee4
...
...
@@ -34,9 +34,9 @@
</view>
</
template
>
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
config
from
'@/config.js'
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
{
fillMemberPhoto
}
from
'@/common/utils.js'
import
{
ref
,
getCurrentInstance
...
...
@@ -69,30 +69,28 @@
queryParams
.
value
.
pageNum
=
pageNum
queryParams
.
value
.
pageSize
=
pageSize
api
.
selectPageList
(
queryParams
.
value
).
then
(
res
=>
{
paging
.
value
.
complete
(
res
.
rows
)
list
.
value
=
res
.
rows
for
(
var
l
of
list
.
value
){
if
(
l
.
photo
&&
l
.
photo
.
indexOf
(
'http'
)
==-
1
){
l
.
photo
=
config
.
baseUrl_api
+
l
.
photo
}
}
})
}
const
rows
=
formatRows
(
res
.
rows
||
[])
paging
.
value
.
complete
(
rows
)
list
.
value
=
rows
})
}
function
getList
()
{
uni
.
showLoading
({
title
:
"加载中"
})
api
.
selectPageList
(
queryParams
.
value
).
then
(
res
=>
{
uni
.
hideLoading
()
paging
.
value
.
complete
(
res
.
rows
);
list
.
value
=
res
.
rows
for
(
var
l
of
list
.
value
){
if
(
l
.
photo
&&
l
.
photo
.
indexOf
(
'http'
)
==-
1
){
l
.
photo
=
config
.
baseUrl_api
+
l
.
photo
}
}
total
.
value
=
res
.
total
})
uni
.
hideLoading
()
const
rows
=
formatRows
(
res
.
rows
||
[])
paging
.
value
.
complete
(
rows
);
list
.
value
=
rows
total
.
value
=
res
.
total
})
}
function
formatRows
(
rows
)
{
return
rows
.
map
(
item
=>
({
...
item
,
photo
:
fillMemberPhoto
(
item
)
}))
}
function
goDetail
(
n
){
uni
.
navigateTo
({
...
...
@@ -124,4 +122,4 @@
font-size
:
26
rpx
;
}
}
</
style
>
\ No newline at end of file
</
style
>
...
...
level/addApply.vue
View file @
f7aaee4
...
...
@@ -270,6 +270,7 @@ import config from '@/config.js'
import
dayjs
from
'dayjs'
import
_
from
'underscore'
import
customModal
from
'@/components/custom-modal.vue'
import
{
fillMemberPhoto
}
from
'@/common/utils.js'
const
app
=
getApp
();
const
memberInfo
=
app
.
globalData
.
memberInfo
...
...
@@ -728,9 +729,7 @@ function getChosedStudentList() {
_
.
each
(
res
.
rows
,
(
d
)
=>
{
setDefaultLevel
(
d
)
d
.
levelOptions
=
cloneLevelOptions
()
if
(
d
.
photo
&&
d
.
photo
.
indexOf
(
'http'
)
==
-
1
)
{
d
.
photo
=
config
.
baseUrl_api
+
d
.
photo
}
d
.
photo
=
fillMemberPhoto
(
d
)
})
infoList
.
value
=
res
.
rows
...
...
level/apply.vue
View file @
f7aaee4
...
...
@@ -194,7 +194,7 @@ function upApply(id) {
function
goDetail
(
item
)
{
if
(
item
.
status
!=
'0'
)
{
let
path
=
`/
level/applyDetail?examId=
${
item
.
examId
}
`
let
path
=
`/
pages/rank/applyDetail?examId=
${
item
.
examId
}
&type=1
`
uni
.
navigateTo
({
url
:
path
});
...
...
level/applyDetail.vue
View file @
f7aaee4
<
template
>
<view
class=
"apply-detail-page"
>
<view
class=
"wBox"
>
<view
class=
"wBox
base-info-card
"
>
<view
class=
"tt"
>
考级基本信息
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
考级名称:
</text>
{{
form
?.
name
}}
<text
class=
"lab"
>
考级名称
</text>
<text
class=
"val"
>
{{
form
?.
name
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
申请日期:
</text>
{{
form
?.
applyTime
?.
slice
(
0
,
10
)
}}
<text
class=
"lab"
>
申请日期
</text>
<text
class=
"val"
>
{{
form
?.
applyTime
?.
slice
(
0
,
10
)
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
申请单位:
</text>
{{
form
?.
memberName
}}
<text
class=
"lab"
>
申请单位
</text>
<text
class=
"val"
>
{{
form
?.
memberName
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
考官:
</text>
{{
form
?.
examinerNames
?.
split
(
','
).
join
(
'/'
)
}}
<text
class=
"lab"
>
考官
</text>
<text
class=
"val"
>
{{
form
?.
examinerNames
?.
split
(
','
).
join
(
'/'
)
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
考试开始时间:
</text>
{{
form
?.
startTime
}}
<text
class=
"lab"
>
考试开始时间
</text>
<text
class=
"val"
>
{{
form
?.
startTime
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
考试结束时间:
</text>
{{
form
?.
endTime
}}
<text
class=
"lab"
>
考试结束时间
</text>
<text
class=
"val"
>
{{
form
?.
endTime
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
考级地点:
</text>
{{
form
?.
address
}}
<text
class=
"lab"
>
考级地点
</text>
<text
class=
"val"
>
{{
form
?.
address
||
'--'
}}
</text>
</view>
<view
class=
"ddd"
v-if=
"userType=='2'||userType=='1'"
>
<text
class=
"lab"
>
总金额:
</text>
<text
class=
"text-danger"
>
¥
{{
(
form
?.
totalAmount
*
1
).
toFixed
(
2
)
}}
</text>
<text
class=
"lab"
>
总金额
</text>
<text
class=
"val text-danger"
>
¥
{{
(
form
?.
totalAmount
*
1
).
toFixed
(
2
)
}}
</text>
</view>
<view
class=
"ddd"
>
<text
class=
"lab"
>
证书状态
</text>
<text
class=
"val"
>
{{
certStatusText
}}
</text>
</view>
</view>
<view
class=
"wBox"
>
...
...
@@ -61,10 +73,10 @@
¥
{{
(
n
.
examFee
*
1
).
toFixed
(
2
)
}}
</text>
</view>
<view>
是否通过
<text
v-if=
"n.isPass=='1'"
class=
"
text
-success"
>
通过
</text>
<text
v-else
class=
"
text
-danger"
>
未通过
</text>
<view
class=
"pass-block"
>
<text
class=
"field-label"
>
是否通过
</text>
<text
v-if=
"n.isPass=='1'"
class=
"
pass-tag pass
-success"
>
通过
</text>
<text
v-else
class=
"
pass-tag pass
-danger"
>
未通过
</text>
</view>
</view>
</view>
...
...
@@ -80,35 +92,46 @@
审核信息
</view>
<view>
<view
v-if=
"recordList.length === 0"
class=
"empty-text"
>
暂无审核信息
</view>
<view
class=
"stepItem"
v-for=
"(n,index) in recordList"
:key=
"index"
>
<view
class=
"time"
>
{{
n
.
handleDate
||
'待审批'
}}
</view>
<view
class=
"time"
>
{{
n
.
auditTime
||
n
.
handleDate
||
'待审批'
}}
</view>
<view
class=
"content"
>
<view
class=
"status"
>
<text
:class=
"
{
'text-success':
n.auditStatus
=='1',
'text-danger':
n.auditStatus=='2
',
'text-warning':
n.auditStatus=='3
'
}">
{{
n
.
auditStatusStr
}}
</text>
'text-success':
getAuditResult(n)=
=='1',
'text-danger':
getAuditResult(n)==='0
',
'text-warning':
getAuditResult(n)==='9
'
}">
{{
getAuditResultText
(
n
)
}}
</text>
</view>
<!--
<view
class=
"name"
>
第
{{
index
+
1
}}
步
</view>
-->
<view
class=
"deptName"
>
{{
n
.
deptName
}}
</view>
<view
v-if=
"n.audit
Status==2
"
>
备注:
{{
n
.
reason
||
'/'
}}
<view
class=
"deptName"
>
{{
n
.
auditDeptName
||
n
.
deptName
||
'--'
}}
</view>
<view
v-if=
"n.audit
Msg || n.reason
"
>
备注:
{{
n
.
auditMsg
||
n
.
reason
||
'/'
}}
</view>
</view>
</view>
</view>
</view>
<!--
<view
class=
"wBox"
>
<view
class=
"tt"
>
流程追踪
</view>
<view
class=
"cert-status-card"
:class=
"
{ active: isExamAuditPassed || hasLogistics, shipped: hasLogistics }">
<view
class=
"cert-info"
>
<view
class=
"cert-label"
>
证书状态
</view>
</view>
<view
class=
"cert-status-text"
>
{{
certStatusText
}}
</view>
</view>
</view>
-->
</view>
</
template
>
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
config
from
'@/config.js'
import
_
from
'underscore'
import
{
onMoun
ted
,
compu
ted
,
ref
}
from
'vue'
import
{
...
...
@@ -122,6 +145,7 @@
const
recordList
=
ref
([])
const
list
=
ref
([])
const
totalStudent
=
ref
(
0
)
const
certInfo
=
ref
({})
const
studentquery
=
ref
({
pageNum
:
1
,
pageSize
:
6
...
...
@@ -160,6 +184,7 @@
userType
.
value
=
app
.
globalData
.
userType
getRecordList
()
getTablePersonInfo
()
getCertInfo
()
}
function
getForm
()
{
...
...
@@ -171,11 +196,61 @@
}
function
getRecordList
()
{
api
.
getLogs
(
examId
).
then
(
res
=>
{
recordList
.
value
=
res
.
data
.
levelSteps
api
.
getLogs
(
examId
,
1
).
then
(
res
=>
{
recordList
.
value
=
normalizeRecordList
(
res
.
data
)
uni
.
hideLoading
()
})
}
function
normalizeRecordList
(
data
)
{
if
(
Array
.
isArray
(
data
))
return
data
if
(
Array
.
isArray
(
data
?.
levelSteps
))
return
data
.
levelSteps
return
[]
}
function
getAuditResult
(
row
=
{})
{
if
(
row
.
auditResult
!==
undefined
&&
row
.
auditResult
!==
null
)
return
String
(
row
.
auditResult
)
if
(
row
.
auditStatus
!==
undefined
&&
row
.
auditStatus
!==
null
)
{
const
status
=
String
(
row
.
auditStatus
)
if
(
status
===
'1'
)
return
'1'
if
(
status
===
'2'
)
return
'0'
if
(
status
===
'3'
)
return
'9'
return
status
}
return
''
}
function
getAuditResultText
(
row
=
{})
{
const
result
=
getAuditResult
(
row
)
if
(
result
===
'9'
)
return
'审核中'
if
(
result
===
'0'
)
return
'审核未通过'
if
(
result
===
'1'
)
return
'审核通过'
return
row
.
auditStatusStr
||
''
}
function
getCertInfo
()
{
api
.
paymentList
({
examId
,
type
:
'1'
,
pageNum
:
1
,
pageSize
:
1
}).
then
(
res
=>
{
certInfo
.
value
=
(
res
.
rows
||
[])[
0
]
||
{}
}).
catch
(()
=>
{
certInfo
.
value
=
{}
})
}
const
isExamAuditPassed
=
computed
(()
=>
{
const
status
=
String
(
form
.
value
?.
status
??
form
.
value
?.
auditStatus
??
''
)
if
(
status
)
return
status
===
'2'
return
recordList
.
value
.
some
(
item
=>
getAuditResult
(
item
)
===
'1'
)
})
const
hasLogistics
=
computed
(()
=>
{
return
!!
(
certInfo
.
value
?.
postCode
||
certInfo
.
value
?.
postName
||
String
(
certInfo
.
value
?.
postStatus
||
''
)
===
'1'
)
})
const
certStatusText
=
computed
(()
=>
{
// 证书状态优先看物流,其次看考试审核状态。
if
(
hasLogistics
.
value
)
return
'邮寄中'
if
(
isExamAuditPassed
.
value
)
return
'印制中'
return
'--'
})
function
getTablePersonInfo
()
{
api
.
getStudentList
(
studentquery
.
value
).
then
(
res
=>
{
list
.
value
=
res
.
rows
...
...
@@ -252,4 +327,140 @@
}
}
.base-info-card
{
.ddd
{
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
space-between
;
gap
:
28
rpx
;
margin
:
0
0
14
rpx
;
font-size
:
28
rpx
;
line-height
:
1.45
;
}
.lab
{
flex
:
0
0
180
rpx
;
color
:
#8A91A0
;
}
.val
{
flex
:
1
;
min-width
:
0
;
color
:
#1F2937
;
font-weight
:
500
;
text-align
:
right
;
word-break
:
break-all
;
}
}
.userlist
{
.item
{
border-radius
:
14
rpx
;
border
:
1
rpx
solid
rgba
(
196
,
18
,
27
,
0.06
);
}
.flexbox
{
align-items
:
center
;
gap
:
20
rpx
;
>
view
{
min-width
:
0
;
}
}
}
.pass-block
{
flex
:
0
0
118
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
text-align
:
center
;
}
.field-label
{
display
:
block
;
margin-bottom
:
8
rpx
;
color
:
#8A91A0
;
font-size
:
22
rpx
;
line-height
:
1
;
}
.pass-tag
{
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
min-width
:
78
rpx
;
height
:
38
rpx
;
line-height
:
34
rpx
;
padding
:
0
14
rpx
;
border-radius
:
999
rpx
;
font-size
:
22
rpx
;
}
.pass-success
{
color
:
#168653
;
background
:
linear-gradient
(
135deg
,
#e4f8ed
0%
,
#d2f2df
100%
);
border
:
1
rpx
solid
rgba
(
50
,
177
,
108
,
0.22
);
}
.pass-danger
{
color
:
#C4121B
;
background
:
linear-gradient
(
135deg
,
#fff0f1
0%
,
#ffe4e6
100%
);
border
:
1
rpx
solid
rgba
(
196
,
18
,
27
,
0.18
);
}
.cert-status-card
{
display
:
flex
;
align-items
:
center
;
gap
:
18
rpx
;
padding
:
22
rpx
24
rpx
;
border-radius
:
18
rpx
;
background
:
linear-gradient
(
135deg
,
#f7f8fb
0%
,
#ffffff
100%
);
border
:
1
rpx
solid
#eef0f4
;
}
.cert-status-card.active
{
background
:
linear-gradient
(
135deg
,
#fff4f5
0%
,
#ffffff
74%
);
border-color
:
rgba
(
196
,
18
,
27
,
0.16
);
}
.cert-status-card.shipped
{
background
:
linear-gradient
(
135deg
,
#f0fff7
0%
,
#ffffff
74%
);
border-color
:
rgba
(
50
,
177
,
108
,
0.2
);
}
.cert-info
{
flex
:
1
;
min-width
:
0
;
}
.cert-label
{
color
:
#0A1629
;
font-size
:
28
rpx
;
font-weight
:
600
;
}
.cert-status-text
{
flex
:
0
0
auto
;
padding
:
9
rpx
18
rpx
;
border-radius
:
999
rpx
;
color
:
#C4121B
;
background
:
rgba
(
196
,
18
,
27
,
0.08
);
font-size
:
24
rpx
;
font-weight
:
700
;
}
.cert-status-card.shipped
.cert-status-text
{
color
:
#168653
;
background
:
rgba
(
50
,
177
,
108
,
0.1
);
}
.empty-text
{
padding
:
18
rpx
0
;
color
:
#999
;
font-size
:
26
rpx
;
text-align
:
center
;
}
</
style
>
...
...
level/chooseStudent.vue
View file @
f7aaee4
...
...
@@ -94,6 +94,7 @@
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
config
from
'@/config.js'
import
{
fillMemberPhoto
}
from
'@/common/utils.js'
import
{
ref
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
...
...
@@ -131,9 +132,7 @@
const
rows
=
res
.
rows
||
[]
rows
.
forEach
(
item
=>
{
item
.
checked
=
selectedList
.
value
.
some
(
s
=>
s
.
perId
===
item
.
perId
)
if
(
item
.
photo
&&
item
.
photo
.
indexOf
(
'http'
)
==
-
1
)
{
item
.
photo
=
config
.
baseUrl_api
+
item
.
photo
}
item
.
photo
=
fillMemberPhoto
(
item
)
})
if
(
isMore
)
{
...
...
pages/rank/applyDetail.vue
View file @
f7aaee4
...
...
@@ -3,14 +3,14 @@
<scroll-view
class=
"detail-content"
scroll-y
>
<!-- 考
段
基本信息 -->
<!-- 考
试
基本信息 -->
<view
class=
"card"
>
<view
class=
"card-header"
>
<view
class=
"header-left"
>
基本信息
</view>
</view>
<view
class=
"card-body"
>
<view
class=
"info-row"
>
<text
class=
"label"
>
考试名称
</text>
<text
class=
"label"
>
{{
examNameLabel
}}
</text>
<text
class=
"value"
>
{{
form
.
name
||
''
}}
</text>
</view>
<view
class=
"info-row"
>
...
...
@@ -35,13 +35,18 @@
<text
class=
"value"
>
{{
parseDateTime
(
form
.
endTime
)
}}
</text>
</view>
<view
class=
"info-row"
>
<text
class=
"label"
>
考段地点
</text>
<text
class=
"label"
>
{{
examAddressLabel
}}
</text>
<text
class=
"value"
>
{{
form
.
address
||
'--'
}}
</text>
</view>
<view
class=
"info-row"
>
<text
class=
"label"
>
证书状态
</text>
<text
class=
"value"
>
{{
certStatusText
}}
</text>
</view>
<view
v-if=
"userType == '2' || userType == '1'"
class=
"info-row"
>
<text
class=
"label"
>
总金额
</text>
<text
class=
"value text-red"
>
¥
{{
(
Number
(
form
.
totalAmount
)
||
0
).
toFixed
(
2
)
}}
</text>
</view>
</view>
</view>
...
...
@@ -148,7 +153,7 @@
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
_
from
'underscore'
import
{
ref
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
szToHz
}
from
'@/common/utils.js'
...
...
@@ -163,6 +168,7 @@ const loading = ref(false)
const
loadingAudit
=
ref
(
false
)
const
loadingMore
=
ref
(
false
)
const
hasMore
=
ref
(
false
)
const
certInfo
=
ref
({})
const
selectForm
=
ref
({
pageNum
:
1
,
...
...
@@ -191,6 +197,7 @@ function initData() {
getForm
()
getList
()
getRecordList
()
getCertInfo
()
}
function
getForm
()
{
...
...
@@ -220,10 +227,15 @@ function getList() {
list
.
value
.
push
(...
res
.
rows
)
}
hasMore
.
value
=
list
.
value
.
length
<
(
res
.
total
||
0
)
calcPersonInfo
(
res
.
rows
)
if
(
isLevelDetail
.
value
)
{
getTablePersonInfo
()
}
else
{
calcPersonInfoByRows
(
list
.
value
)
}
}
else
{
list
.
value
=
[]
hasMore
.
value
=
false
tablePersonInfo
.
value
=
{
total
:
0
,
levelArr
:
[]}
}
}).
catch
(
err
=>
{
console
.
error
(
'getList error:'
,
err
)
...
...
@@ -233,12 +245,37 @@ function getList() {
})
}
function
calcPersonInfo
(
rows
)
{
function
getTablePersonInfo
()
{
api
.
getExamPersonNum
({
examId
,
type
:
'1'
}).
then
(
res
=>
{
calcPersonInfo
(
res
.
data
||
{})
}).
catch
(()
=>
{
tablePersonInfo
.
value
=
{
total
:
list
.
value
.
length
,
levelArr
:
[]}
})
}
function
calcPersonInfo
(
data
)
{
const
levelArr
=
[]
let
total
=
0
_
.
each
(
data
,
(
val
,
key
)
=>
{
if
(
val
>
0
)
{
levelArr
.
push
({
level
:
key
,
num
:
val
})
total
+=
val
}
})
tablePersonInfo
.
value
=
{
total
:
total
,
levelArr
:
_
.
sortBy
(
levelArr
,
(
l
)
=>
l
.
level
)
}
}
function
calcPersonInfoByRows
(
rows
)
{
if
(
!
rows
||
rows
.
length
===
0
)
{
tablePersonInfo
.
value
=
{
total
:
0
,
levelArr
:
[]}
return
}
const
total
=
rows
.
length
const
levelArr
=
[]
_
.
each
(
rows
,
(
d
)
=>
{
const
levelKey
=
String
(
d
.
levelNew
||
''
)
...
...
@@ -250,7 +287,7 @@ function calcPersonInfo(rows) {
}
})
tablePersonInfo
.
value
=
{
total
:
total
,
total
:
rows
.
length
,
levelArr
:
_
.
sortBy
(
levelArr
,
(
l
)
=>
l
.
level
)
}
}
...
...
@@ -277,6 +314,40 @@ function getRecordList() {
})
}
function
getCertInfo
()
{
api
.
paymentList
({
examId
,
type
:
certQueryType
.
value
,
pageNum
:
1
,
pageSize
:
1
}).
then
(
res
=>
{
certInfo
.
value
=
(
res
.
rows
||
[])[
0
]
||
{}
}).
catch
(()
=>
{
certInfo
.
value
=
{}
})
}
const
isLevelDetail
=
computed
(()
=>
String
(
examType
.
value
)
===
'1'
)
const
examNameLabel
=
computed
(()
=>
isLevelDetail
.
value
?
'考级名称'
:
'考试名称'
)
const
examAddressLabel
=
computed
(()
=>
isLevelDetail
.
value
?
'考级地点'
:
'考段地点'
)
const
certQueryType
=
computed
(()
=>
{
const
map
=
{
'1'
:
'1'
,
'2'
:
'2'
,
'3'
:
'2'
,
'4'
:
'3'
}
return
map
[
String
(
examType
.
value
)]
||
'2'
})
const
isExamAuditPassed
=
computed
(()
=>
{
const
status
=
String
(
form
.
value
?.
status
??
form
.
value
?.
auditStatus
??
''
)
if
(
status
)
return
status
===
'2'
return
recordList
.
value
.
some
(
item
=>
String
(
item
.
auditResult
)
===
'1'
)
})
const
hasLogistics
=
computed
(()
=>
{
return
!!
(
certInfo
.
value
?.
postCode
||
certInfo
.
value
?.
postName
||
String
(
certInfo
.
value
?.
postStatus
||
''
)
===
'1'
)
})
const
certStatusText
=
computed
(()
=>
{
if
(
hasLogistics
.
value
)
return
'邮寄中'
if
(
isExamAuditPassed
.
value
)
return
'印制中'
return
'--'
})
function
loadMore
()
{
if
(
hasMore
.
value
&&
!
loadingMore
.
value
)
{
loadingMore
.
value
=
true
...
...
personal/addVip_per.vue
View file @
f7aaee4
...
...
@@ -71,7 +71,7 @@
<uni-forms-item
label=
"头像"
required
>
<uni-file-picker
v-model=
"photoArr"
@
delete=
"delPhoto"
return-type=
"object"
limit=
"1"
@
select=
"upPhoto"
:del-ico=
"false"
:image-styles=
"imageStylesTx"
></uni-file-picker>
<image
mode=
"aspectFill"
v-if=
"baseFormData.photo2"
style=
"height:200rpx;width:200rpx;"
:src=
"
config.baseUrl_api + baseFormData.photo2"
/>
<image
mode=
"aspectFill"
v-if=
"baseFormData.photo2"
style=
"height:200rpx;width:200rpx;"
:src=
"
aes2.fillImgUrl(baseFormData.photo2)"
/>
</uni-forms-item>
-->
</view>
</uni-forms>
...
...
@@ -256,13 +256,13 @@ async function fetchMemberInfo(id) {
baseFormData
.
value
.
birth
=
data
.
birth
||
''
baseFormData
.
value
.
phone
=
data
.
phone
||
''
baseFormData
.
value
.
perCode
=
data
.
perCode
||
''
baseFormData
.
value
.
validityDate
=
data
.
validityDate
?
data
.
validityDate
.
slice
(
0
,
10
)
:
''
// 照片处理
if
(
data
.
photo2
)
{
const
photoUrl
=
data
.
photo2
.
indexOf
(
'http'
)
===
-
1
?
config
.
baseUrl_api
+
data
.
photo2
:
data
.
photo2
photoArr
.
value
=
{
url
:
photoUrl
,
name
:
'头像'
,
baseFormData
.
value
.
validityDate
=
data
.
validityDate
?
data
.
validityDate
.
slice
(
0
,
10
)
:
''
// 照片处理
const
photoUrl
=
aes2
.
fillMemberPhoto
(
data
)
if
(
photoUrl
)
{
photoArr
.
value
=
{
url
:
photoUrl
,
name
:
'头像'
,
extname
:
'jpg'
}
baseFormData
.
value
.
photo
=
data
.
photo
...
...
@@ -356,13 +356,13 @@ function upPhoto(e) {
});
api
.
uploadImgCorpPhoto
(
resp
.
tempFilePath
).
then
(
data
=>
{
console
.
log
(
data
)
baseFormData
.
value
.
photo
=
data
.
data
.
fang
;
baseFormData
.
value
.
photo2
=
data
.
data
.
yuan
;
photoArr
.
value
=
{
url
:
config
.
baseUrl_api
+
baseFormData
.
value
.
photo
,
name
:
'头像'
,
extname
:
'jpg'
}
baseFormData
.
value
.
photo
=
data
.
data
.
fang
;
baseFormData
.
value
.
photo2
=
data
.
data
.
yuan
;
photoArr
.
value
=
{
url
:
aes2
.
fillImgUrl
(
baseFormData
.
value
.
photo
),
name
:
'头像'
,
extname
:
'jpg'
}
});
},
fail
:
function
(
err
)
{
...
...
@@ -416,29 +416,18 @@ function getExtractInfo(obj) {
baseFormData
.
value
.
phone
=
res
.
data
.
phone
baseFormData
.
value
.
perCode
=
res
.
data
.
perCode
||
''
baseFormData
.
value
.
validityDate
=
res
.
data
.
validityDate
?.
slice
(
0
,
10
)
//去掉时分秒
// baseFormData.value.cityId = res.data.cityId
// baseFormData.value.address = res.data.address
if
(
res
.
data
.
photo
)
{
console
.
log
(
res
.
data
.
photo
)
if
(
res
.
data
.
photo
.
indexOf
(
'http'
)
==
-
1
)
{
baseFormData
.
value
.
photo
=
res
.
data
.
photo
let
obj
=
{
url
:
config
.
baseUrl_api
+
res
.
data
.
photo
,
name
:
'头像'
,
extname
:
'jpg'
}
photoArr
.
value
=
obj
}
else
{
baseFormData
.
value
.
photo
=
res
.
data
.
photo
let
obj
=
{
url
:
res
.
data
.
photo
,
name
:
'头像'
,
extname
:
'jpg'
}
photoArr
.
value
=
obj
}
}
// baseFormData.value.cityId = res.data.cityId
// baseFormData.value.address = res.data.address
const
photoUrl
=
aes2
.
fillMemberPhoto
(
res
.
data
)
if
(
photoUrl
)
{
baseFormData
.
value
.
photo
=
res
.
data
.
photo
||
res
.
data
.
perPhoto
||
''
baseFormData
.
value
.
photo2
=
res
.
data
.
photo2
||
res
.
data
.
perPhoto2
||
''
photoArr
.
value
=
{
url
:
photoUrl
,
name
:
'头像'
,
extname
:
'jpg'
}
}
// baseFormData.value.name = res.data.name
baseFormData
.
value
.
perId
=
res
.
data
.
perId
console
.
log
(
res
.
data
.
photo
,
baseFormData
.
value
.
photo
)
...
...
personal/home.vue
View file @
f7aaee4
...
...
@@ -642,16 +642,24 @@ const downCert = async () => {
uni
.
showToast
({
title
:
'请先绑定学员'
,
icon
:
'none'
})
return
}
const
perId
=
userInfo
.
value
?.
perId
if
(
!
perId
)
return
if
(
!
perInfo
.
value
.
perPhoto
||
!
perInfo
.
value
.
perPhoto2
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请先上传头像照片'
,
icon
:
'none'
})
return
}
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
})
const
[
err
,
res
]
=
await
to
(
downStuCertSingle
(
perId
))
const
perId
=
userInfo
.
value
?.
perId
||
perInfo
.
value
?.
perId
if
(
!
perId
)
return
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
})
const
[
infoErr
,
infoRes
]
=
await
to
(
getInfo
(
perId
))
const
latestPerInfo
=
infoErr
?
perInfo
.
value
:
(
infoRes
?.
data
||
perInfo
.
value
)
if
(
!
getAvatarPhoto
(
latestPerInfo
))
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请先上传头像照片'
,
icon
:
'none'
})
return
}
if
(
!
infoErr
&&
infoRes
?.
data
)
{
userStore
.
setPerInfo
({
...
perInfo
.
value
,
...
infoRes
.
data
})
}
const
[
err
,
res
]
=
await
to
(
downStuCertSingle
(
perId
))
uni
.
hideLoading
()
if
(
err
)
{
...
...
personalVip/addVip.vue
View file @
f7aaee4
...
...
@@ -111,7 +111,7 @@
}
from
'@dcloudio/uni-app'
import
config
from
'@/config.js'
import
*
as
aes2
from
'@/common/utils.js'
import
{
fillImgUrl
}
from
'@/common/utils.js'
import
{
fillImgUrl
,
fillMemberPhoto
}
from
'@/common/utils.js'
const
current
=
ref
(
0
)
const
agree
=
ref
(
false
)
const
perId
=
ref
()
...
...
@@ -421,11 +421,13 @@
baseFormData
.
value
.
perCode
=
res
.
data
.
perCode
||
''
baseFormData
.
value
.
validityDateRaw
=
res
.
data
.
validityDate
||
''
baseFormData
.
value
.
validityDate
=
res
.
data
.
validityDate
?.
slice
(
0
,
10
)
//去掉时分秒
if
(
res
.
data
.
photo
)
{
console
.
log
(
res
.
data
.
photo
)
baseFormData
.
value
.
photo
=
res
.
data
.
photo
const
photoUrl
=
fillMemberPhoto
(
res
.
data
)
if
(
photoUrl
)
{
console
.
log
(
res
.
data
.
photo
||
res
.
data
.
perPhoto
)
baseFormData
.
value
.
photo
=
res
.
data
.
photo
||
res
.
data
.
perPhoto
||
''
baseFormData
.
value
.
photo2
=
res
.
data
.
photo2
||
res
.
data
.
perPhoto2
||
''
let
obj
=
{
url
:
fillImgUrl
(
res
.
data
.
photo
)
,
url
:
photoUrl
,
name
:
'头像'
,
extname
:
'jpg'
}
...
...
personalVip/detail.vue
View file @
f7aaee4
...
...
@@ -64,10 +64,11 @@
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
config
from
'@/config.js'
import
{
onLoad
,
onShow
import
config
from
'@/config.js'
import
{
fillMemberPhoto
}
from
'@/common/utils.js'
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
;
import
{
ref
...
...
@@ -108,14 +109,12 @@
form
.
value
.
topAssName
=
form
.
value
?.
ancestorNameList
?.[
0
]
form
.
value
.
areaAssName
=
form
.
value
?.
ancestorNameList
?.[
1
]
form
.
value
.
memName
=
res
.
data
.
memName
if
(
form
.
value
.
cityId
)
{
getRegionsList
(
form
.
value
.
cityId
)
}
if
(
form
.
value
.
photo
&&
form
.
value
.
photo
.
indexOf
(
'http'
)
==
-
1
)
{
form
.
value
.
photo
=
config
.
baseUrl_api
+
form
.
value
.
photo
}
})
})
if
(
form
.
value
.
cityId
)
{
getRegionsList
(
form
.
value
.
cityId
)
}
form
.
value
.
photo
=
fillMemberPhoto
(
form
.
value
)
})
})
function
getRegionsList
(
cityId
)
{
api
.
regionsList
().
then
(
res
=>
{
...
...
@@ -274,4 +273,4 @@
}
}
}
</
style
>
\ No newline at end of file
</
style
>
...
...
personalVip/list.vue
View file @
f7aaee4
...
...
@@ -56,7 +56,7 @@
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
import
{
fill
ImgUrl
}
from
'@/common/utils.js'
import
{
fill
MemberPhoto
}
from
'@/common/utils.js'
import
{
onMounted
,
ref
...
...
@@ -119,7 +119,7 @@
function
formatRows
(
rows
)
{
return
rows
.
map
(
item
=>
({
...
item
,
photo
:
fill
ImgUrl
(
item
.
photo
)
photo
:
fill
MemberPhoto
(
item
)
}))
}
...
...
personalVip/vipList.vue
View file @
f7aaee4
...
...
@@ -53,11 +53,12 @@
</view>
</
template
>
<
script
setup
>
import
config
from
'@/config.js'
import
{
ref
,
getCurrentInstance
<
script
setup
>
import
config
from
'@/config.js'
import
{
fillMemberPhoto
}
from
'@/common/utils.js'
import
{
ref
,
getCurrentInstance
}
from
'vue'
import
{
onLoad
...
...
@@ -90,17 +91,14 @@
getList
()
})
async
function
getList
()
{
const
res
=
await
api
.
selectPageList
(
queryParams
.
value
)
list
.
value
=
res
.
rows
// 处理图片路径
for
(
var
l
of
list
.
value
){
if
(
l
.
photo
&&
l
.
photo
.
indexOf
(
'http'
)
==-
1
){
l
.
photo
=
config
.
baseUrl_api
+
l
.
photo
}
// 初始化选中状态
l
.
checked
=
false
}
async
function
getList
()
{
const
res
=
await
api
.
selectPageList
(
queryParams
.
value
)
list
.
value
=
res
.
rows
||
[]
for
(
var
l
of
list
.
value
){
l
.
photo
=
fillMemberPhoto
(
l
)
// 初始化选中状态
l
.
checked
=
false
}
total
.
value
=
res
.
total
}
...
...
@@ -277,4 +275,4 @@
border
:
none
;
}
}
</
style
>
\ No newline at end of file
</
style
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment