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
67e1a42f
authored
2026-06-16 09:47:48 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
考点考官
1 parent
8f77dd9a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
883 additions
and
777 deletions
common/api.js
level/addressManage.vue
level/paymentDetail.vue
level/ztx/examinationAudit.vue
level/ztx/examinationDetail.vue
level/ztx/examinationVerification.vue
myCenter/examPointApply.vue
myCenter/perfect.vue
pages/index/perfect.vue
common/api.js
View file @
67e1a42
...
...
@@ -1683,16 +1683,24 @@ export function getShenMemberInfo() {
// 考官列表
export
function
examinerDel
(
id
)
{
return
request
({
url
:
`/member/examiner/
${
id
}
`
,
method
:
'delete'
})
}
// 添加考官
export
function
otherAdd
(
memId
,
ids
)
{
return
request
({
export
function
examinerDel
(
id
)
{
return
request
({
url
:
`/member/examiner/
${
id
}
`
,
method
:
'delete'
})
}
// 清空当前考点申请已选考官
export
function
clearMyExaminer
()
{
return
request
({
url
:
`/member/examiner/clearMyExaminer`
,
method
:
'post'
})
}
// 添加考官
export
function
otherAdd
(
memId
,
ids
)
{
return
request
({
url
:
`/member/examiner/otherAdd/
${
memId
}
/
${
ids
}
`
,
method
:
'post'
})
...
...
level/addressManage.vue
View file @
67e1a42
...
...
@@ -229,6 +229,7 @@ const submitAddress = async () => {
form
.
value
.
province
=
region
.
value
[
0
];
form
.
value
.
city
=
region
.
value
[
1
];
form
.
value
.
area
=
region
.
value
[
2
];
form
.
value
.
address
=
`
${
form
.
value
.
province
||
''
}${
form
.
value
.
city
||
''
}${
form
.
value
.
area
||
''
}${
form
.
value
.
a
||
''
}
`
;
uni
.
showLoading
({
title
:
'保存中'
});
try
{
...
...
level/paymentDetail.vue
View file @
67e1a42
...
...
@@ -21,10 +21,10 @@
<view
class=
"info-card"
>
<view
class=
"card-header"
>
<text
class=
"card-title"
>
邮寄信息
</text>
<text
class=
"manage-btn"
@
click=
"goAddressManage"
>
管理地址
</text>
<text
v-if=
"allowEditAddress"
class=
"manage-btn"
@
click=
"goAddressManage"
>
管理地址
</text>
</view>
<view
v-if=
"selectedAddress.id"
class=
"address-content"
@
click=
"goAddressManage"
>
<view
v-if=
"selectedAddress.id"
:class=
"
{ disabled: !allowEditAddress }"
class="address-content" @click="goAddressManage">
<view
class=
"address-region"
>
{{
selectedAddress
.
province
}}
{{
selectedAddress
.
city
}}
{{
selectedAddress
.
area
}}
</view>
...
...
@@ -38,8 +38,8 @@
</view>
<view
v-else
class=
"empty-address"
@
click=
"goAddressManage"
>
<text
class=
"empty-tip"
>
请添加收货地址
</text>
<text
class=
"arrow"
>
›
</text>
<text
class=
"empty-tip"
>
{{
allowEditAddress
?
'请添加收货地址'
:
'暂无订单地址'
}}
</text>
<text
v-if=
"allowEditAddress"
class=
"arrow"
>
›
</text>
</view>
</view>
...
...
@@ -120,7 +120,9 @@
</view>
</view>
<view
v-if=
"!selectedAddress.id"
class=
"tip-text"
>
请先选择邮寄地址
</view>
<view
v-if=
"!selectedAddress.id"
class=
"tip-text"
>
{{
allowEditAddress
?
'请先选择邮寄地址'
:
'订单地址异常,请联系管理员'
}}
</view>
</view>
</
template
>
...
...
@@ -136,6 +138,7 @@ const orderId = ref('');
const
loading
=
ref
(
true
);
const
examData
=
ref
({});
const
selectedAddress
=
ref
({});
const
examInfo
=
ref
({});
const
memberInfo
=
ref
({});
const
deptInfo
=
ref
({});
const
payType
=
ref
(
'2'
);
...
...
@@ -146,6 +149,7 @@ const formData = ref({
// 判断是再次支付还是新订单
const
isRePay
=
computed
(()
=>
!!
orderId
.
value
);
const
allowEditAddress
=
computed
(()
=>
!
isRePay
.
value
);
// 级别标签
const
levelTags
=
computed
(()
=>
{
...
...
@@ -188,6 +192,10 @@ onMounted(() => {
});
onShow
(()
=>
{
if
(
!
allowEditAddress
.
value
)
{
getExamAddress
();
return
}
// 检查是否有选中的地址带回
const
pages
=
getCurrentPages
();
const
currentPage
=
pages
[
pages
.
length
-
1
];
...
...
@@ -230,7 +238,40 @@ const getDefaultAddress = async () => {
}
};
const
getExamAddress
=
async
()
=>
{
if
(
!
examId
.
value
)
return
try
{
const
res
=
await
api
.
getLevelApplyInfo
(
examId
.
value
)
const
data
=
res
.
data
||
{}
examInfo
.
value
=
data
const
address
=
data
.
postAddress
||
{}
if
(
address
.
id
)
{
selectedAddress
.
value
=
normalizePostAddress
(
address
)
return
}
}
catch
(
e
)
{
console
.
error
(
'获取考试地址失败'
,
e
)
}
};
function
normalizePostAddress
(
address
=
{})
{
return
{
id
:
address
.
id
,
province
:
address
.
province
||
''
,
city
:
address
.
city
||
''
,
area
:
address
.
area
||
''
,
a
:
address
.
a
||
''
,
name
:
address
.
name
||
''
,
phone
:
address
.
phone
||
''
,
defaultFlag
:
address
.
defaultFlag
}
}
const
goAddressManage
=
()
=>
{
if
(
!
allowEditAddress
.
value
)
{
uni
.
showToast
({
title
:
'重新支付订单不可修改地址'
,
icon
:
'none'
})
return
}
uni
.
navigateTo
({
url
:
'/level/addressManage'
});
...
...
@@ -245,7 +286,7 @@ const onPayTypeChange = (e) => {
const
handleSubmit
=
async
()
=>
{
if
(
!
selectedAddress
.
value
.
id
)
{
return
uni
.
showToast
({
title
:
'请先选择地址
'
,
icon
:
'none'
});
return
uni
.
showToast
({
title
:
allowEditAddress
.
value
?
'请先选择地址'
:
'订单地址异常,请联系管理员
'
,
icon
:
'none'
});
}
console
.
log
(
'支付参数:'
,
{
...
...
level/ztx/examinationAudit.vue
View file @
67e1a42
...
...
@@ -184,6 +184,7 @@ const form = ref({
})
const
currentDelItem
=
ref
({})
const
delPopup
=
ref
(
null
)
const
AUDIT_CACHE_KEY
=
'ztx_examination_audit_item'
onShow
(()
=>
{
if
(
memId
.
value
)
{
...
...
@@ -208,18 +209,26 @@ onLoad((options) => {
}
userType
.
value
=
app
.
globalData
.
userType
if
(
options
.
item
)
{
try
{
const
itemData
=
JSON
.
parse
(
decodeURIComponent
(
options
.
item
))
detailForm
.
value
=
itemData
photoList
.
value
=
normalizePhotos
(
itemData
.
photos
)
}
catch
(
e
)
{
console
.
error
(
'解析审核详情失败'
,
e
)
}
const
itemData
=
getAuditItem
(
options
)
if
(
itemData
?.
id
)
{
detailForm
.
value
=
itemData
photoList
.
value
=
normalizePhotos
(
itemData
.
photos
)
}
console
.
log
(
userType
.
value
)
})
function
getAuditItem
(
options
)
{
const
cacheItem
=
uni
.
getStorageSync
(
AUDIT_CACHE_KEY
)
if
(
cacheItem
&&
typeof
cacheItem
===
'object'
)
return
cacheItem
if
(
!
options
.
item
)
return
{}
try
{
return
JSON
.
parse
(
decodeURIComponent
(
options
.
item
))
}
catch
(
e
)
{
console
.
error
(
'解析审核详情失败'
,
e
)
return
{}
}
}
function
goBack
()
{
uni
.
navigateBack
()
}
...
...
level/ztx/examinationDetail.vue
View file @
67e1a42
...
...
@@ -123,26 +123,44 @@ const examinerList = ref([])
const
photoList
=
ref
([])
const
userType
=
ref
(
''
)
const
auditStatusMap
=
{
1
:
'审核中'
,
2
:
'审核通过'
,
3
:
'审核拒绝'
}
const
DETAIL_CACHE_KEY
=
'ztx_examination_detail_item'
onLoad
((
options
)
=>
{
userType
.
value
=
app
.
globalData
.
userType
if
(
options
.
item
)
{
try
{
const
itemData
=
JSON
.
parse
(
decodeURIComponent
(
options
.
item
))
form
.
value
=
itemData
if
(
itemData
.
auditLogs
)
{
auditList
.
value
=
JSON
.
parse
(
itemData
.
auditLogs
)
}
photoList
.
value
=
normalizePhotos
(
itemData
.
photos
)
if
(
itemData
.
memId
)
{
getExaminerList
(
itemData
.
memId
)
}
}
catch
(
e
)
{
console
.
error
(
'解析数据失败'
,
e
)
const
itemData
=
getDetailItem
(
options
)
if
(
itemData
?.
id
)
{
form
.
value
=
itemData
if
(
itemData
.
auditLogs
)
{
auditList
.
value
=
parseAuditLogs
(
itemData
.
auditLogs
)
}
photoList
.
value
=
normalizePhotos
(
itemData
.
photos
)
if
(
itemData
.
memId
)
{
getExaminerList
(
itemData
.
memId
)
}
}
})
function
getDetailItem
(
options
)
{
const
cacheItem
=
uni
.
getStorageSync
(
DETAIL_CACHE_KEY
)
if
(
cacheItem
&&
typeof
cacheItem
===
'object'
)
return
cacheItem
if
(
!
options
.
item
)
return
{}
try
{
return
JSON
.
parse
(
decodeURIComponent
(
options
.
item
))
}
catch
(
e
)
{
console
.
error
(
'解析数据失败'
,
e
)
return
{}
}
}
function
parseAuditLogs
(
auditLogs
)
{
if
(
Array
.
isArray
(
auditLogs
))
return
auditLogs
try
{
return
JSON
.
parse
(
auditLogs
)
}
catch
(
e
)
{
return
[]
}
}
function
getExaminerList
(
memId
)
{
api
.
listInfo
({
memId
:
memId
}).
then
(
res
=>
{
if
(
res
.
rows
)
{
...
...
level/ztx/examinationVerification.vue
View file @
67e1a42
...
...
@@ -185,6 +185,8 @@ const tabList = ref([
])
const
currentTab
=
ref
(
0
)
const
userType
=
ref
(
''
)
const
DETAIL_CACHE_KEY
=
'ztx_examination_detail_item'
const
AUDIT_CACHE_KEY
=
'ztx_examination_audit_item'
onLoad
(()
=>
{
...
...
@@ -332,6 +334,7 @@ function toggleSelect(item) {
}
function
goView
(
item
)
{
uni
.
setStorageSync
(
DETAIL_CACHE_KEY
,
item
)
const
itemStr
=
encodeURIComponent
(
JSON
.
stringify
(
item
))
uni
.
navigateTo
({
url
:
`/level/ztx/examinationDetail?item=${itemStr
}
`
...
...
@@ -339,6 +342,7 @@ function goView(item) {
}
function
goAudit
(
item
)
{
uni
.
setStorageSync
(
AUDIT_CACHE_KEY
,
item
)
const
itemStr
=
encodeURIComponent
(
JSON
.
stringify
(
item
))
uni
.
navigateTo
({
url
:
`/level/ztx/examinationAudit?ids=${item.id
}
&type=single&selfSelect=${item.selfSelect
}
&memId=${item.memId
}
&item=${itemStr
}
`
...
...
myCenter/examPointApply.vue
View file @
67e1a42
...
...
@@ -197,11 +197,26 @@ function handleDel(row) {
customModalRef
.
value
.
open
()
}
// 切换考官类型:打开自定义提示弹窗
function
onSelfSelectChange
(
e
)
{
form
.
value
.
selfSelect
=
e
.
detail
.
value
showExamine
.
value
=
e
.
detail
.
value
==
'1'
list
.
value
=
[]
// 切换考官类型:如果已有考官数据,先同步清空后端数据。
async
function
onSelfSelectChange
(
e
)
{
const
nextValue
=
e
.
detail
.
value
const
prevValue
=
form
.
value
.
selfSelect
if
(
nextValue
===
prevValue
)
return
if
(
list
.
value
.
length
>
0
)
{
uni
.
showLoading
({
title
:
'清空考官中'
})
try
{
await
api
.
clearMyExaminer
()
list
.
value
=
[]
}
catch
(
err
)
{
uni
.
showToast
({
title
:
err
?.
data
?.
msg
||
err
?.
msg
||
'清空考官失败,请稍后重试'
,
icon
:
'none'
})
form
.
value
.
selfSelect
=
prevValue
return
}
finally
{
uni
.
hideLoading
()
}
}
form
.
value
.
selfSelect
=
nextValue
showExamine
.
value
=
nextValue
==
'1'
searchResult
.
value
=
null
searchNoData
.
value
=
false
// if (e.detail.value == '0') {
...
...
myCenter/perfect.vue
View file @
67e1a42
<
template
>
<view>
<view
class=
"pd30"
style=
"padding: 30rpx 30rpx 180rpx;"
>
<
template
>
<view>
<view
class=
"pd30"
style=
"padding: 30rpx 30rpx 180rpx;"
>
<view
class=
"wBox"
>
<uni-forms
ref=
"baseForm"
label-width=
"100"
>
<uni-forms-item
label=
"营业执照"
required
>
...
...
@@ -15,30 +15,30 @@
</view>
</view>
</uni-forms-item>
<uni-forms-item
label=
"营业执照名称"
required
>
<uni-easyinput
v-model=
"form.companyName"
:disabled=
"isFieldDisabled('companyName')"
/>
</uni-forms-item>
<uni-forms-item
label=
"社会信用代码"
required
>
<uni-easyinput
v-model=
"form.creditCode"
:disabled=
"isFieldDisabled('creditCode')"
/>
</uni-forms-item>
<uni-forms-item
label=
"营业执照名称"
required
>
<uni-easyinput
v-model=
"form.companyName"
:disabled=
"isFieldDisabled('companyName')"
/>
</uni-forms-item>
<uni-forms-item
label=
"社会信用代码"
required
>
<uni-easyinput
v-model=
"form.creditCode"
:disabled=
"isFieldDisabled('creditCode')"
/>
</uni-forms-item>
<uni-forms-item
label=
"机构名称"
required
>
<uni-easyinput
v-model=
"form.name"
:disabled=
"
isFieldDisabled('name')
"
placeholder=
"机构名称"
/>
<uni-easyinput
v-model=
"form.name"
:disabled=
"
false
"
placeholder=
"机构名称"
/>
</uni-forms-item>
<uni-forms-item
label=
"认证地址"
required
>
<uni-data-picker
v-model=
"coordinates1"
@
change=
"changeCoordinates1"
placeholder=
"请选择认证地址"
:localdata=
"regionsList"
:readonly=
"isFieldDisabled('address')"
:disabled=
"isFieldDisabled('address')"
></uni-data-picker>
</uni-forms-item>
<uni-forms-item
label=
"认证详细地址"
required
>
<uni-easyinput
v-model=
"form.adress"
:disabled=
"isFieldDisabled('adress')"
placeholder=
"请输入详细地址"
type=
'textarea'
/>
</uni-forms-item>
<uni-forms-item
label=
"所属协会"
required
>
<view
style=
"width: 60vw;overflow:auto;"
>
<uni-forms-item
label=
"认证详细地址"
required
>
<uni-easyinput
v-model=
"form.adress"
:disabled=
"isFieldDisabled('adress')"
placeholder=
"请输入详细地址"
type=
'textarea'
/>
</uni-forms-item>
<uni-forms-item
label=
"所属协会"
required
>
<view
style=
"width: 60vw;overflow:auto;"
>
<uni-data-picker
v-model=
"form.parentId"
:localdata=
"tree"
:readonly=
"isFieldDisabled('parentId')"
:disabled=
"isFieldDisabled('parentId')"
:clear-icon=
"false"
placeholder=
"请选择协会"
:map=
"
{text:'label',value:'id'}" popup-title="" @change="changCase">
</uni-data-picker>
</view>
</uni-forms-item>
</view>
</uni-forms-item>
<uni-forms-item
label=
"法人身份证"
required
>
<view
class=
"idcard-box"
>
<view
class=
"idcard-item"
>
...
...
@@ -65,9 +65,9 @@
</view>
</view>
</uni-forms-item>
<uni-forms-item
label=
"法人姓名"
required
>
<uni-easyinput
v-model=
"form.legal"
:disabled=
"isFieldDisabled('legal')"
/>
</uni-forms-item>
<uni-forms-item
label=
"法人姓名"
required
>
<uni-easyinput
v-model=
"form.legal"
:disabled=
"isFieldDisabled('legal')"
/>
</uni-forms-item>
<uni-forms-item
label=
"法人证件号"
required
>
<uni-easyinput
v-model=
"form.legalIdcCode"
:disabled=
"isFieldDisabled('legalIdcCode')"
/>
</uni-forms-item>
...
...
@@ -89,148 +89,148 @@
</view>
</view>
</uni-forms-item>
<!--
<uni-forms-item
v-if=
"form.memCode"
label=
"会员编号"
required
>
<uni-easyinput
v-model=
"form.memCode"
disabled
/>
</uni-forms-item>
-->
<view
class=
"notice-box"
>
<checkbox-group
@
change=
"onNoticeChange"
>
<label
class=
"notice-label"
>
<checkbox
:checked=
"form.notice"
color=
"#e64329"
value=
"1"
/>
<text
class=
"notice-text"
>
我已阅读并同意
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(1)"
>
《注册须知》
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(2)"
>
《入会须知》
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(3)"
>
《免责声明》
</text>
</label>
</checkbox-group>
</view>
</uni-forms>
<view
class=
"fixedBottom"
>
<!--
<uni-forms-item
v-if=
"form.memCode"
label=
"会员编号"
required
>
<uni-easyinput
v-model=
"form.memCode"
disabled
/>
</uni-forms-item>
-->
<view
class=
"notice-box"
>
<checkbox-group
@
change=
"onNoticeChange"
>
<label
class=
"notice-label"
>
<checkbox
:checked=
"form.notice"
color=
"#e64329"
value=
"1"
/>
<text
class=
"notice-text"
>
我已阅读并同意
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(1)"
>
《注册须知》
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(2)"
>
《入会须知》
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(3)"
>
《免责声明》
</text>
</label>
</checkbox-group>
</view>
</uni-forms>
<view
class=
"fixedBottom"
>
<button
class=
"btn-red"
:disabled=
"btn"
:class=
"
{disabled: btn}" @click="submit()">确定
</button>
</view>
</view>
</view>
<uni-popup
ref=
"verifyPopup"
type=
"center"
background-color=
"rgba(0,0,0,0.5)"
>
<view
class=
"custom-modal"
>
<view
class=
"modal-title"
>
提示
</view>
<view
class=
"modal-content"
>
暂未查询到相关企业信息
</view>
<view
class=
" modal-content"
style=
"color:red"
>
企业信息异常请检查相关资料信息,确认无误后再次提交!
</view>
<view
class=
"modal-btns mt20"
>
<button
class=
"btn-cancel"
@
click=
"closeVerifyPopup()"
>
返回修改
</button>
<button
class=
"btn-confirm"
@
click=
"confirmSubmit()"
>
确认无误
</button>
</view>
</view>
</uni-popup>
<uni-popup
ref=
"applyPopup"
type=
"center"
background-color=
"rgba(0,0,0,0.5)"
>
<view
class=
"custom-modal apply-modal"
>
<view
class=
"modal-title"
>
考点申请
</view>
<view
class=
"modal-btns apply-btns"
>
<button
class=
"btn-cancel"
@
click=
"closeApplyPopup()"
>
暂不申请
</button>
<button
class=
"btn-confirm"
@
click=
"confirmApply()"
>
立即申请
</button>
</view>
<view
class=
"modal-tip"
>
友情提示:非考点无法申请级位考试
</view>
</view>
</uni-popup>
<uni-popup
ref=
"unpaidPopup"
type=
"center"
:mask-click=
"false"
>
<view
class=
"custom-modal"
>
<view
class=
"modal-title"
>
系统提示
</view>
<view
class=
"modal-content"
>
您有一笔订单尚未支付,请及时支付或取消订单。
</view>
<view
class=
"modal-btns"
>
<button
class=
"btn-cancel"
@
click=
"closeUnpaidPopup()"
>
取消订单
</button>
<button
class=
"btn-confirm"
@
click=
"goToPay()"
>
去支付
</button>
</view>
</view>
</uni-popup>
</view>
</
template
>
<
script
setup
>
import
{
ref
,
reactive
,
computed
}
from
'vue'
;
import
*
as
api
from
'@/common/api.js'
;
import
_
from
'underscore'
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
;
</view>
</view>
</view>
<uni-popup
ref=
"verifyPopup"
type=
"center"
background-color=
"rgba(0,0,0,0.5)"
>
<view
class=
"custom-modal"
>
<view
class=
"modal-title"
>
提示
</view>
<view
class=
"modal-content"
>
暂未查询到相关企业信息
</view>
<view
class=
" modal-content"
style=
"color:red"
>
企业信息异常请检查相关资料信息,确认无误后再次提交!
</view>
<view
class=
"modal-btns mt20"
>
<button
class=
"btn-cancel"
@
click=
"closeVerifyPopup()"
>
返回修改
</button>
<button
class=
"btn-confirm"
@
click=
"confirmSubmit()"
>
确认无误
</button>
</view>
</view>
</uni-popup>
<uni-popup
ref=
"applyPopup"
type=
"center"
background-color=
"rgba(0,0,0,0.5)"
>
<view
class=
"custom-modal apply-modal"
>
<view
class=
"modal-title"
>
考点申请
</view>
<view
class=
"modal-btns apply-btns"
>
<button
class=
"btn-cancel"
@
click=
"closeApplyPopup()"
>
暂不申请
</button>
<button
class=
"btn-confirm"
@
click=
"confirmApply()"
>
立即申请
</button>
</view>
<view
class=
"modal-tip"
>
友情提示:非考点无法申请级位考试
</view>
</view>
</uni-popup>
<uni-popup
ref=
"unpaidPopup"
type=
"center"
:mask-click=
"false"
>
<view
class=
"custom-modal"
>
<view
class=
"modal-title"
>
系统提示
</view>
<view
class=
"modal-content"
>
您有一笔订单尚未支付,请及时支付或取消订单。
</view>
<view
class=
"modal-btns"
>
<button
class=
"btn-cancel"
@
click=
"closeUnpaidPopup()"
>
取消订单
</button>
<button
class=
"btn-confirm"
@
click=
"goToPay()"
>
去支付
</button>
</view>
</view>
</uni-popup>
</view>
</
template
>
<
script
setup
>
import
{
ref
,
reactive
,
computed
}
from
'vue'
;
import
*
as
api
from
'@/common/api.js'
;
import
_
from
'underscore'
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
;
import
config
from
'@/config.js'
import
{
fillImgUrl
,
reLaunchHomeByRole
}
from
'@/common/utils.js'
const
app
=
getApp
();
const
verifyPopup
=
ref
(
null
)
const
applyPopup
=
ref
(
null
)
const
unpaidPopup
=
ref
(
null
)
const
verifyResult
=
ref
({})
const
payForm
=
ref
({})
const
form
=
ref
({
type
:
'1'
,
applyPoints
:
'0'
,
renewYear
:
1
,
legalIdcCode
:
''
,
notice
:
false
});
const
years
=
ref
([
'1'
,
'2'
,
'3'
,
'4'
,
'5'
])
const
yesno
=
ref
([{
value
:
'0'
,
text
:
'否'
},
{
value
:
'1'
,
text
:
'是'
}])
const
memberFee
=
ref
(
''
)
const
preferentialPolicy
=
ref
(
false
)
const
preferentialData
=
ref
({})
const
ocrLockedFields
=
ref
({})
const
typeList
=
ref
([{
value
:
'1'
,
text
:
'企业'
},
{
value
:
'2'
,
text
:
'国家组织'
},
{
value
:
'3'
,
text
:
'社会组织'
},
{
value
:
'4'
,
text
:
'其他'
}
])
const
regionArr
=
ref
();
const
regionsList
=
ref
([]);
const
tree
=
ref
([]);
const
showDirectly
=
ref
(
true
)
const
directUnderFlag
=
ref
(
0
)
const
current
=
ref
(
0
);
const
groupId
=
ref
(
0
);
const
currIndex
=
ref
(
null
);
const
signType
=
ref
();
const
app
=
getApp
();
const
verifyPopup
=
ref
(
null
)
const
applyPopup
=
ref
(
null
)
const
unpaidPopup
=
ref
(
null
)
const
verifyResult
=
ref
({})
const
payForm
=
ref
({})
const
form
=
ref
({
type
:
'1'
,
applyPoints
:
'0'
,
renewYear
:
1
,
legalIdcCode
:
''
,
notice
:
false
});
const
years
=
ref
([
'1'
,
'2'
,
'3'
,
'4'
,
'5'
])
const
yesno
=
ref
([{
value
:
'0'
,
text
:
'否'
},
{
value
:
'1'
,
text
:
'是'
}])
const
memberFee
=
ref
(
''
)
const
preferentialPolicy
=
ref
(
false
)
const
preferentialData
=
ref
({})
const
ocrLockedFields
=
ref
({})
const
typeList
=
ref
([{
value
:
'1'
,
text
:
'企业'
},
{
value
:
'2'
,
text
:
'国家组织'
},
{
value
:
'3'
,
text
:
'社会组织'
},
{
value
:
'4'
,
text
:
'其他'
}
])
const
regionArr
=
ref
();
const
regionsList
=
ref
([]);
const
tree
=
ref
([]);
const
showDirectly
=
ref
(
true
)
const
directUnderFlag
=
ref
(
0
)
const
current
=
ref
(
0
);
const
groupId
=
ref
(
0
);
const
currIndex
=
ref
(
null
);
const
signType
=
ref
();
const
editIng
=
ref
(
true
);
const
isSign
=
ref
(
false
);
const
type
=
ref
(
false
)
const
btn
=
ref
(
false
)
const
flag
=
ref
(
false
)
const
result
=
ref
(
false
)
const
query
=
ref
({
type
:
0
});
const
activeStatus
=
ref
(
0
)
const
active
=
ref
(
0
)
const
memberInfo
=
ref
({})
const
authenticationStatus
=
ref
()
const
authenticationStatusa
=
ref
()
const
newResult
=
ref
(
false
)
const
belongProvinceId
=
ref
()
const
query
=
ref
({
type
:
0
});
const
activeStatus
=
ref
(
0
)
const
active
=
ref
(
0
)
const
memberInfo
=
ref
({})
const
authenticationStatus
=
ref
()
const
authenticationStatusa
=
ref
()
const
newResult
=
ref
(
false
)
const
belongProvinceId
=
ref
()
const
picArr
=
ref
([])
const
list1
=
ref
([{
title
:
'完善信息'
...
...
@@ -275,13 +275,13 @@
function
hasValue
(
value
)
{
return
value
!==
undefined
&&
value
!==
null
&&
String
(
value
).
trim
()
!==
''
}
function
lockOcrField
(
field
,
value
)
{
if
(
value
!==
undefined
&&
value
!==
null
&&
String
(
value
).
trim
()
!==
''
)
{
ocrLockedFields
.
value
[
field
]
=
true
}
}
function
lockOcrField
(
field
,
value
)
{
if
(
value
!==
undefined
&&
value
!==
null
&&
String
(
value
).
trim
()
!==
''
)
{
ocrLockedFields
.
value
[
field
]
=
true
}
}
function
unlockOcrFields
()
{
ocrLockedFields
.
value
=
{}
}
...
...
@@ -297,17 +297,17 @@
ocrLockedFields
.
value
.
parentId
=
true
}
}
onLoad
(
option
=>
{
if
(
app
.
globalData
.
isLogin
)
{
init
()
}
else
{
app
.
firstLoadCallback
=
()
=>
{
init
()
};
}
});
onLoad
(
option
=>
{
if
(
app
.
globalData
.
isLogin
)
{
init
()
}
else
{
app
.
firstLoadCallback
=
()
=>
{
init
()
};
}
});
async
function
init
()
{
await
Promise
.
all
([
getRegionsList
(),
...
...
@@ -316,24 +316,24 @@
await
getForm
()
await
canUseDiscountApi
()
await
getZtxDiscountPolicyApi
()
handelGetMyRecent
()
}
async
function
getMyMemberCertUnitFeeApi
()
{
const
res
=
await
api
.
getMyMemberCertUnitFee
()
memberFee
.
value
=
res
.
data
}
async
function
canUseDiscountApi
()
{
const
res
=
await
api
.
canUseDiscount
()
preferentialPolicy
.
value
=
res
.
data
}
async
function
getZtxDiscountPolicyApi
()
{
const
res
=
await
api
.
getZtxDiscountPolicy
()
preferentialData
.
value
=
res
.
data
}
handelGetMyRecent
()
}
async
function
getMyMemberCertUnitFeeApi
()
{
const
res
=
await
api
.
getMyMemberCertUnitFee
()
memberFee
.
value
=
res
.
data
}
async
function
canUseDiscountApi
()
{
const
res
=
await
api
.
canUseDiscount
()
preferentialPolicy
.
value
=
res
.
data
}
async
function
getZtxDiscountPolicyApi
()
{
const
res
=
await
api
.
getZtxDiscountPolicy
()
preferentialData
.
value
=
res
.
data
}
async
function
getForm
()
{
const
res
=
await
api
.
getMyOwnMemberInfo
()
if
(
!
res
.
data
.
memberInfo
)
res
.
data
.
memberInfo
=
{}
...
...
@@ -341,38 +341,38 @@
newResult
.
value
=
res
.
data
.
newResult
result
.
value
=
res
.
data
.
result
authenticationStatusa
.
value
=
res
.
data
.
authenticationStatus
showDirectly
.
value
=
!
res
.
data
.
memberInfo
.
associateId
activeStatus
.
value
=
res
.
data
.
memberInfo
.
activeStatus
directUnderFlag
.
value
=
res
.
data
.
memberInfo
.
directUnderFlag
showDirectly
.
value
=
!
res
.
data
.
memberInfo
.
associateId
activeStatus
.
value
=
res
.
data
.
memberInfo
.
activeStatus
directUnderFlag
.
value
=
res
.
data
.
memberInfo
.
directUnderFlag
if
(
authenticationStatusa
.
value
==
1
||
authenticationStatusa
.
value
==
2
||
authenticationStatusa
.
value
==
5
)
{
type
.
value
=
true
}
else
{
type
.
value
=
false
}
btn
.
value
=
authenticationStatusa
.
value
==
1
if
(
authenticationStatusa
.
value
!=
0
)
{
flag
.
value
=
newResult
.
value
}
if
(
authenticationStatusa
.
value
!=
0
)
{
flag
.
value
=
newResult
.
value
}
form
.
value
=
{
...
res
.
data
.
dept
,
...
res
.
data
.
memberInfo
}
form
.
value
.
deptType
=
res
.
data
.
dept
.
deptType
form
.
value
.
parentId
=
form
.
value
.
parentId
??
''
// creditCode.value = form.value.creditCode
// form.value.companyName = res.data.memberInfo.companyName
// belongProvinceId.value = form.value.belongProvinceId
// parentId.value = form.value.parentId
// creditCode.value = form.value.creditCode
// form.value.companyName = res.data.memberInfo.companyName
// belongProvinceId.value = form.value.belongProvinceId
// parentId.value = form.value.parentId
coordinates1
.
value
=
[]
if
(
form
.
value
.
provinceId
)
coordinates1
.
value
.
push
(
form
.
value
.
provinceId
)
if
(
form
.
value
.
cityId
)
coordinates1
.
value
.
push
(
form
.
value
.
cityId
)
if
(
form
.
value
.
regionId
)
coordinates1
.
value
.
push
(
form
.
value
.
regionId
)
form
.
value
.
coordinates1
=
coordinates1
.
value
if
(
form
.
value
.
businessLicense
)
{
form
.
value
.
businessLicense
=
form
.
value
.
businessLicense
}
...
...
@@ -390,8 +390,8 @@
picArr
.
value
.
push
(
p
)
})
}
}
}
if
(
!
form
.
value
.
applyPoints
||
form
.
value
.
applyPoints
==
''
)
{
form
.
value
.
applyPoints
=
'0'
}
...
...
@@ -408,7 +408,7 @@
pictures
.
value
=
form
.
value
.
pictures
legalIdcPhoto
.
value
=
[
legalIdcPhoto1
.
value
,
legalIdcPhoto2
.
value
]
}
function
getTree
()
{
return
api
.
certifiedDeptTreeRegister
({
selfDeptId
:
-
1
,
...
...
@@ -429,7 +429,7 @@
regionsList
.
value
=
res
.
data
;
});
}
// 核心:修改submit方法,改用自定义弹窗
async
function
submit
()
{
if
(
btn
.
value
)
{
...
...
@@ -440,48 +440,48 @@
return
}
// 基础表单验证
if
(
!
form
.
value
.
businessLicense
)
{
uni
.
showToast
({
title
:
'请上传营业执照'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
companyName
==
''
)
{
uni
.
showToast
({
title
:
'请填写营业执照名称'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
creditCode
==
''
)
{
uni
.
showToast
({
title
:
'请填写社会信用代码'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
name
==
''
)
{
uni
.
showToast
({
title
:
'请填写机构名称'
,
icon
:
'none'
})
return
}
if
(
!
form
.
value
.
businessLicense
)
{
uni
.
showToast
({
title
:
'请上传营业执照'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
companyName
==
''
)
{
uni
.
showToast
({
title
:
'请填写营业执照名称'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
creditCode
==
''
)
{
uni
.
showToast
({
title
:
'请填写社会信用代码'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
name
==
''
)
{
uni
.
showToast
({
title
:
'请填写机构名称'
,
icon
:
'none'
})
return
}
if
(
!
coordinates1
.
value
.
length
)
{
uni
.
showToast
({
title
:
'请选择认证地址'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
adress
==
''
)
{
uni
.
showToast
({
title
:
'请填写认证详细地址'
,
icon
:
'none'
})
return
}
})
return
}
if
(
form
.
value
.
adress
==
''
)
{
uni
.
showToast
({
title
:
'请填写认证详细地址'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
parentId
==
-
1
||
form
.
value
.
parentId
==
0
)
{
uni
.
showToast
({
title
:
'请选择所属协会'
,
...
...
@@ -500,17 +500,17 @@
if
(
legalIdcPhoto1
.
value
==
''
||
legalIdcPhoto2
.
value
==
''
)
{
uni
.
showToast
({
title
:
'请上传法人身份证'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
legal
==
''
)
{
uni
.
showToast
({
title
:
'请填写法人姓名'
,
icon
:
'none'
})
return
}
icon
:
'none'
})
return
}
if
(
form
.
value
.
legal
==
''
)
{
uni
.
showToast
({
title
:
'请填写法人姓名'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
legalIdcCode
==
''
)
{
uni
.
showToast
({
title
:
'请填写法人证件号'
,
...
...
@@ -525,160 +525,160 @@
})
return
}
if
(
form
.
value
.
siteContact
==
''
)
{
uni
.
showToast
({
title
:
'请填写联系人'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
siteTel
==
''
)
{
uni
.
showToast
({
title
:
'请填写联系方式'
,
icon
:
'none'
})
return
}
if
(
picArr
.
value
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请上传机构照片'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
siteContact
==
''
)
{
uni
.
showToast
({
title
:
'请填写联系人'
,
icon
:
'none'
})
return
}
if
(
form
.
value
.
siteTel
==
''
)
{
uni
.
showToast
({
title
:
'请填写联系方式'
,
icon
:
'none'
})
return
}
if
(
picArr
.
value
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请上传机构照片'
,
icon
:
'none'
})
return
}
if
(
!
form
.
value
.
notice
)
{
uni
.
showToast
({
title
:
'请阅读并同意注册须知、入会须知、免责声明'
,
icon
:
'none'
})
uni
.
showToast
({
title
:
'请阅读并同意注册须知、入会须知、免责声明'
,
icon
:
'none'
})
return
}
const
creditCodeOk
=
await
onCreditCodeBlur
(
true
)
if
(
!
creditCodeOk
)
return
// 检查是否有未支付订单
try
{
await
handelGetMyRecent
()
}
catch
(
e
)
{
return
}
try
{
const
res
=
await
handelVerify
()
verifyResult
.
value
=
res
if
(
!
res
.
passFlag
)
{
// 打开自定义弹窗(替代原有showModal)
verifyPopup
.
value
.
open
()
return
}
submitData
()
}
catch
(
error
)
{
uni
.
showToast
({
title
:
error
.
message
||
'验证失败,请重试'
,
icon
:
'none'
})
}
}
// 新增:关闭验证弹窗
function
closeVerifyPopup
()
{
verifyPopup
.
value
.
close
()
}
// 新增:确认无误提交
function
confirmSubmit
()
{
verifyPopup
.
value
.
close
()
submitData
()
}
// 新增:关闭未支付订单弹窗
function
closeUnpaidPopup
()
{
unpaidPopup
.
value
.
close
()
handelCancelOrder
()
}
// 新增:去支付
function
goToPay
()
{
unpaidPopup
.
value
.
close
()
uni
.
navigateTo
({
url
:
`/myCenter/goPay?payName=
${
encodeURIComponent
(
form
.
value
.
name
||
''
)}
&orderId=
${
payForm
.
value
.
id
}
`
})
}
// 新增:获取最近认证记录,判断是否有未支付订单
function
handelGetMyRecent
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
const
res
=
await
api
.
getMyRecent
()
??
{}
payForm
.
value
=
res
.
data
?.
comOrder
??
{}
if
(
payForm
.
value
.
content
)
payForm
.
value
.
content
=
JSON
.
parse
(
payForm
.
value
.
content
)
if
(
payForm
.
value
.
payStatus
===
'0'
)
{
unpaidPopup
.
value
.
open
()
return
reject
(
res
)
}
else
{
return
resolve
(
true
)
}
})
}
// 新增:取消订单
async
function
handelCancelOrder
()
{
if
(
!
payForm
.
value
.
id
)
return
uni
.
showLoading
({
title
:
'取消中...'
})
try
{
await
api
.
cancelOrder
(
payForm
.
value
.
id
)
uni
.
showToast
({
title
:
'取消成功'
,
icon
:
'success'
})
await
init
()
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'取消失败'
,
icon
:
'none'
})
}
finally
{
uni
.
hideLoading
()
}
}
// 新增:打开考点申请弹窗(备用,如需调用可加触发逻辑)
function
openApplyPopup
()
{
applyPopup
.
value
.
open
()
}
// 新增:关闭考点申请弹窗
function
closeApplyPopup
()
{
applyPopup
.
value
.
close
()
}
// 新增:确认考点申请
function
confirmApply
()
{
applyPopup
.
value
.
close
()
// 此处添加考点申请逻辑
}
// 企业信息验证
try
{
await
handelGetMyRecent
()
}
catch
(
e
)
{
return
}
try
{
const
res
=
await
handelVerify
()
verifyResult
.
value
=
res
if
(
!
res
.
passFlag
)
{
// 打开自定义弹窗(替代原有showModal)
verifyPopup
.
value
.
open
()
return
}
submitData
()
}
catch
(
error
)
{
uni
.
showToast
({
title
:
error
.
message
||
'验证失败,请重试'
,
icon
:
'none'
})
}
}
// 新增:关闭验证弹窗
function
closeVerifyPopup
()
{
verifyPopup
.
value
.
close
()
}
// 新增:确认无误提交
function
confirmSubmit
()
{
verifyPopup
.
value
.
close
()
submitData
()
}
// 新增:关闭未支付订单弹窗
function
closeUnpaidPopup
()
{
unpaidPopup
.
value
.
close
()
handelCancelOrder
()
}
// 新增:去支付
function
goToPay
()
{
unpaidPopup
.
value
.
close
()
uni
.
navigateTo
({
url
:
`/myCenter/goPay?payName=
${
encodeURIComponent
(
form
.
value
.
name
||
''
)}
&orderId=
${
payForm
.
value
.
id
}
`
})
}
// 新增:获取最近认证记录,判断是否有未支付订单
function
handelGetMyRecent
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
const
res
=
await
api
.
getMyRecent
()
??
{}
payForm
.
value
=
res
.
data
?.
comOrder
??
{}
if
(
payForm
.
value
.
content
)
payForm
.
value
.
content
=
JSON
.
parse
(
payForm
.
value
.
content
)
if
(
payForm
.
value
.
payStatus
===
'0'
)
{
unpaidPopup
.
value
.
open
()
return
reject
(
res
)
}
else
{
return
resolve
(
true
)
}
})
}
// 新增:取消订单
async
function
handelCancelOrder
()
{
if
(
!
payForm
.
value
.
id
)
return
uni
.
showLoading
({
title
:
'取消中...'
})
try
{
await
api
.
cancelOrder
(
payForm
.
value
.
id
)
uni
.
showToast
({
title
:
'取消成功'
,
icon
:
'success'
})
await
init
()
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'取消失败'
,
icon
:
'none'
})
}
finally
{
uni
.
hideLoading
()
}
}
// 新增:打开考点申请弹窗(备用,如需调用可加触发逻辑)
function
openApplyPopup
()
{
applyPopup
.
value
.
open
()
}
// 新增:关闭考点申请弹窗
function
closeApplyPopup
()
{
applyPopup
.
value
.
close
()
}
// 新增:确认考点申请
function
confirmApply
()
{
applyPopup
.
value
.
close
()
// 此处添加考点申请逻辑
}
// 企业信息验证
function
handelVerify
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
if
(
!
form
.
value
.
legalIdcCode
||
!
form
.
value
.
legal
)
{
return
reject
(
new
Error
(
'请重新上传身份证并填写法人证件号'
))
}
if
(
!
form
.
value
.
companyName
||
!
form
.
value
.
creditCode
)
{
return
reject
(
new
Error
(
'请重新上传营业执照并填写营业执照名称'
))
}
try
{
const
res
=
await
api
.
checkBusinessLicense
({
creditCode
:
form
.
value
.
creditCode
,
companyName
:
form
.
value
.
companyName
,
legalIdcCode
:
form
.
value
.
legalIdcCode
,
legal
:
form
.
value
.
legal
})
if
(
res
.
code
==
200
)
{
resolve
(
res
.
data
)
}
else
{
reject
(
new
Error
(
res
.
msg
||
'企业信息验证失败'
))
}
}
catch
(
e
)
{
reject
(
new
Error
(
'验证接口调用失败,请检查网络'
))
}
if
(
!
form
.
value
.
legalIdcCode
||
!
form
.
value
.
legal
)
{
return
reject
(
new
Error
(
'请重新上传身份证并填写法人证件号'
))
}
if
(
!
form
.
value
.
companyName
||
!
form
.
value
.
creditCode
)
{
return
reject
(
new
Error
(
'请重新上传营业执照并填写营业执照名称'
))
}
try
{
const
res
=
await
api
.
checkBusinessLicense
({
creditCode
:
form
.
value
.
creditCode
,
companyName
:
form
.
value
.
companyName
,
legalIdcCode
:
form
.
value
.
legalIdcCode
,
legal
:
form
.
value
.
legal
})
if
(
res
.
code
==
200
)
{
resolve
(
res
.
data
)
}
else
{
reject
(
new
Error
(
res
.
msg
||
'企业信息验证失败'
))
}
}
catch
(
e
)
{
reject
(
new
Error
(
'验证接口调用失败,请检查网络'
))
}
})
}
...
...
@@ -731,11 +731,11 @@
// 数据提交核心逻辑
function
submitData
()
{
const
dataInfo
=
{
parentId
:
form
.
value
.
parentId
,
creditCode
:
form
.
value
.
creditCode
,
legal
:
form
.
value
.
legal
,
businessLicense
:
form
.
value
.
businessLicense
,
pictures
:
picArr
.
value
.
toString
(),
parentId
:
form
.
value
.
parentId
,
creditCode
:
form
.
value
.
creditCode
,
legal
:
form
.
value
.
legal
,
businessLicense
:
form
.
value
.
businessLicense
,
pictures
:
picArr
.
value
.
toString
(),
memId
:
form
.
value
.
memId
,
id
:
form
.
value
.
deptId
,
name
:
form
.
value
.
name
,
...
...
@@ -743,71 +743,71 @@
cityId
:
form
.
value
.
cityId
,
provinceId
:
form
.
value
.
provinceId
,
adress
:
form
.
value
.
adress
,
belongProvinceId
:
form
.
value
.
belongProvinceId
,
deptType
:
form
.
value
.
deptType
,
legalIdcPhoto
:
[
legalIdcPhoto1
.
value
,
legalIdcPhoto2
.
value
]?.
join
(
','
),
legalIdcCode
:
form
.
value
.
legalIdcCode
,
companyName
:
form
.
value
.
companyName
,
applyPoints
:
form
.
value
.
applyPoints
,
siteContact
:
form
.
value
.
siteContact
,
siteTel
:
form
.
value
.
siteTel
}
if
(
activeStatus
.
value
==
0
)
{
api
.
active
(
dataInfo
).
then
(
res
=>
{
uni
.
showModal
({
content
:
'激活成功,返回首页'
,
success
:
function
(
resp
)
{
if
(
resp
.
confirm
)
{
reLaunchHomeByRole
()
}
else
{
uni
.
navigateBack
()
}
}
})
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'激活失败,请重试'
,
icon
:
'none'
})
})
}
else
{
api
.
editMyMemberCertifiedInfo
(
dataInfo
).
then
(
res
=>
{
// 使用完整的协会路径名称
uni
.
navigateTo
({
url
:
`/myCenter/goPay?payName=
${
encodeURIComponent
(
form
.
value
.
name
||
''
)}
&assoName=
${
encodeURIComponent
(
assoFullName
.
value
)}
`
})
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'提交失败,请重试'
,
icon
:
'none'
})
})
}
}
// 根据协会ID获取协会名称
function
getAssoName
(
parentId
)
{
if
(
!
parentId
||
!
tree
.
value
||
tree
.
value
.
length
===
0
)
{
return
''
}
belongProvinceId
:
form
.
value
.
belongProvinceId
,
deptType
:
form
.
value
.
deptType
,
legalIdcPhoto
:
[
legalIdcPhoto1
.
value
,
legalIdcPhoto2
.
value
]?.
join
(
','
),
legalIdcCode
:
form
.
value
.
legalIdcCode
,
companyName
:
form
.
value
.
companyName
,
applyPoints
:
form
.
value
.
applyPoints
,
siteContact
:
form
.
value
.
siteContact
,
siteTel
:
form
.
value
.
siteTel
}
if
(
activeStatus
.
value
==
0
)
{
api
.
active
(
dataInfo
).
then
(
res
=>
{
uni
.
showModal
({
content
:
'激活成功,返回首页'
,
success
:
function
(
resp
)
{
if
(
resp
.
confirm
)
{
reLaunchHomeByRole
()
}
else
{
uni
.
navigateBack
()
}
}
})
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'激活失败,请重试'
,
icon
:
'none'
})
})
}
else
{
api
.
editMyMemberCertifiedInfo
(
dataInfo
).
then
(
res
=>
{
// 使用完整的协会路径名称
uni
.
navigateTo
({
url
:
`/myCenter/goPay?payName=
${
encodeURIComponent
(
form
.
value
.
name
||
''
)}
&assoName=
${
encodeURIComponent
(
assoFullName
.
value
)}
`
})
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'提交失败,请重试'
,
icon
:
'none'
})
})
}
}
// 根据协会ID获取协会名称
function
getAssoName
(
parentId
)
{
if
(
!
parentId
||
!
tree
.
value
||
tree
.
value
.
length
===
0
)
{
return
''
}
// 递归查找协会名称
function
findInTree
(
list
)
{
for
(
const
item
of
list
)
{
if
((
item
.
id
??
item
.
value
)?.
toString
()
===
parentId
?.
toString
())
{
return
item
.
label
||
''
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
const
found
=
findInTree
(
item
.
children
)
if
(
found
)
return
found
}
}
return
null
}
return
findInTree
(
tree
.
value
)
||
''
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
const
found
=
findInTree
(
item
.
children
)
if
(
found
)
return
found
}
}
return
null
}
return
findInTree
(
tree
.
value
)
||
''
}
// 协会选择 - 获取完整路径名称
function
changCase
(
e
)
{
if
(
isFieldDisabled
(
'parentId'
))
return
...
...
@@ -817,13 +817,13 @@
form
.
value
.
parentId
=
lastNode
?.
value
??
lastNode
?.
id
??
lastNode
??
''
;
console
.
log
(
'最终提交的parentId:'
,
form
.
value
.
parentId
);
assoFullName
.
value
=
getAssoFullName
(
valueArr
)
console
.
log
(
'协会完整路径:'
,
assoFullName
.
value
);
}
// 获取协会完整路径名称
console
.
log
(
'协会完整路径:'
,
assoFullName
.
value
);
}
// 获取协会完整路径名称
function
getAssoFullName
(
valueArr
)
{
if
(
!
valueArr
||
valueArr
.
length
===
0
)
return
''
// valueArr 是 {value: id} 数组
// valueArr 是 {value: id} 数组
const
names
=
[]
let
currentLevel
=
tree
.
value
for
(
const
item
of
valueArr
)
{
...
...
@@ -832,13 +832,13 @@
if
(
found
)
{
names
.
push
(
found
.
label
)
currentLevel
=
found
.
children
}
else
{
break
}
}
else
{
break
}
}
return
names
.
join
(
'/'
)
}
// 查找协会节点及其父路径
function
findAssoNodeWithPath
(
list
,
targetId
,
currentPath
)
{
for
(
const
item
of
list
)
{
...
...
@@ -846,10 +846,10 @@
if
((
item
.
value
||
item
.
id
)?.
toString
()
===
targetId
?.
toString
())
{
return
{
node
:
item
,
path
:
newPath
}
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
const
found
=
findAssoNodeWithPath
(
item
.
children
,
targetId
,
newPath
)
if
(
found
)
return
found
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
const
found
=
findAssoNodeWithPath
(
item
.
children
,
targetId
,
newPath
)
if
(
found
)
return
found
}
}
return
null
}
...
...
@@ -957,17 +957,17 @@
// 恢复协会完整路径名称
function
restoreAssoFullName
()
{
if
(
!
form
.
value
.
parentId
||
!
tree
.
value
||
tree
.
value
.
length
===
0
)
{
return
}
// 查找节点及其路径
const
result
=
findAssoNodeWithPath
(
tree
.
value
,
form
.
value
.
parentId
,
[])
if
(
result
)
{
// 使用路径数组重建完整名称
assoFullName
.
value
=
getAssoFullName
(
result
.
path
.
map
(
id
=>
({
value
:
id
})))
}
}
if
(
!
form
.
value
.
parentId
||
!
tree
.
value
||
tree
.
value
.
length
===
0
)
{
return
}
// 查找节点及其路径
const
result
=
findAssoNodeWithPath
(
tree
.
value
,
form
.
value
.
parentId
,
[])
if
(
result
)
{
// 使用路径数组重建完整名称
assoFullName
.
value
=
getAssoFullName
(
result
.
path
.
map
(
id
=>
({
value
:
id
})))
}
}
function
changeCoordinates1
(
e
)
{
if
(
isFieldDisabled
(
'address'
))
return
const
selectedValue
=
e
?.
detail
?.
value
||
e
||
[]
...
...
@@ -1009,10 +1009,10 @@
uni
.
hideLoading
()
}).
catch
(
err
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
})
}
...
...
@@ -1132,40 +1132,40 @@
}
form
.
value
.
businessLicense
=
JSON
.
stringify
([
selectFileValue
])
uni
.
hideLoading
()
}
catch
(
err
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
}
}
}
catch
(
err
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
}
}
function
delSupplementFile
()
{
clearBusinessLicenseUpload
()
unlockOcrFields
()
lockParentIdField
()
}
function
getBusinessLicenseOcr
(
filePath
)
{
if
(
!
filePath
)
return
Promise
.
resolve
(
null
)
return
new
Promise
((
resolve
)
=>
{
uni
.
uploadFile
({
url
:
config
.
baseUrl_api
+
'/member/info/getBusinessLicense'
,
filePath
,
name
:
'pic'
,
header
:
{
'Authorization'
:
uni
.
getStorageSync
(
'token'
)
},
success
:
(
res
)
=>
{
try
{
const
data
=
JSON
.
parse
(
res
.
data
||
'{}'
)
resolve
(
data
.
code
===
200
?
data
.
data
:
null
)
}
catch
(
e
)
{
resolve
(
null
)
}
},
fail
:
()
=>
resolve
(
null
)
url
:
config
.
baseUrl_api
+
'/member/info/getBusinessLicense'
,
filePath
,
name
:
'pic'
,
header
:
{
'Authorization'
:
uni
.
getStorageSync
(
'token'
)
},
success
:
(
res
)
=>
{
try
{
const
data
=
JSON
.
parse
(
res
.
data
||
'{}'
)
resolve
(
data
.
code
===
200
?
data
.
data
:
null
)
}
catch
(
e
)
{
resolve
(
null
)
}
},
fail
:
()
=>
resolve
(
null
)
})
})
}
...
...
@@ -1207,22 +1207,22 @@
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
if
(
!
imgUrl
)
return
uni
.
showLoading
({
title
:
'上传中'
})
uni
.
showLoading
({
title
:
'上传中'
})
Promise
.
all
(
tempFilePaths
.
slice
(
0
,
3
).
map
(
path
=>
uploadMinioImage
(
path
))).
then
(
urls
=>
{
picArr
.
value
=
urls
.
filter
(
Boolean
)
form
.
value
.
pictures
=
picArr
.
value
.
join
(
','
)
uni
.
hideLoading
()
}).
catch
(
err
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
})
}
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败'
,
icon
:
'none'
})
})
}
function
delpicArr
()
{
picArr
.
value
=
[]
form
.
value
.
pictures
=
''
...
...
@@ -1258,94 +1258,94 @@
if
(
typeof
data
===
'string'
)
return
data
return
data
?.
ms
||
data
?.
url
||
data
?.
fang
||
res
?.
msg
||
''
}
// 须知勾选
function
onNoticeChange
(
e
)
{
if
(
btn
.
value
)
return
const
values
=
e
.
detail
.
value
form
.
value
.
notice
=
values
.
includes
(
'1'
)
}
// 查看须知 - 跳转到须知页面
function
showNotice
(
type
)
{
const
pageMap
=
{
1
:
'/pages/index/notice-registration'
,
2
:
'/pages/index/notice-membership'
,
3
:
'/pages/index/notice-disclaimer'
}
const
url
=
pageMap
[
type
]
if
(
url
)
{
uni
.
navigateTo
({
url
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
(
.file-picker__progress
)
{
opacity
:
0
;
}
:deep
(
.input-value
)
{
padding
:
0
5
rpx
;
}
.picker-view
{
width
:
750
rpx
;
height
:
600
rpx
;
margin-top
:
20
rpx
;
}
.item
{
line-height
:
100
rpx
;
text-align
:
center
;
}
:deep
(
.uni-data-tree
)
{
border
:
1px
solid
#dcdfe6
;
border-radius
:
4px
;
.selected-list
{
justify-content
:
start
;
}
}
:deep
(
.uni-select__input-placeholder
)
{
font-size
:
30
rpx
;
}
:deep
(
.uni-easyinput__content-input
)
{
font-size
:
30
rpx
;
}
:deep
(
.uni-easyinput__placeholder-class
)
{
font-size
:
30
rpx
;
color
:
grey
;
}
.wBox
{
width
:
700
rpx
;
padding
:
30
rpx
;
margin
:
20
rpx
auto
0
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
12
rpx
116
rpx
0
rpx
rgba
(
196
,
203
,
214
,
0.1
);
border-radius
:
15
rpx
;
}
.notice-box
{
padding
:
20
rpx
0
;
}
.notice-label
{
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
font-size
:
24
rpx
;
}
.notice-text
{
color
:
#666
;
}
// 查看须知 - 跳转到须知页面
function
showNotice
(
type
)
{
const
pageMap
=
{
1
:
'/pages/index/notice-registration'
,
2
:
'/pages/index/notice-membership'
,
3
:
'/pages/index/notice-disclaimer'
}
const
url
=
pageMap
[
type
]
if
(
url
)
{
uni
.
navigateTo
({
url
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
(
.file-picker__progress
)
{
opacity
:
0
;
}
:deep
(
.input-value
)
{
padding
:
0
5
rpx
;
}
.picker-view
{
width
:
750
rpx
;
height
:
600
rpx
;
margin-top
:
20
rpx
;
}
.item
{
line-height
:
100
rpx
;
text-align
:
center
;
}
:deep
(
.uni-data-tree
)
{
border
:
1px
solid
#dcdfe6
;
border-radius
:
4px
;
.selected-list
{
justify-content
:
start
;
}
}
:deep
(
.uni-select__input-placeholder
)
{
font-size
:
30
rpx
;
}
:deep
(
.uni-easyinput__content-input
)
{
font-size
:
30
rpx
;
}
:deep
(
.uni-easyinput__placeholder-class
)
{
font-size
:
30
rpx
;
color
:
grey
;
}
.wBox
{
width
:
700
rpx
;
padding
:
30
rpx
;
margin
:
20
rpx
auto
0
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
12
rpx
116
rpx
0
rpx
rgba
(
196
,
203
,
214
,
0.1
);
border-radius
:
15
rpx
;
}
.notice-box
{
padding
:
20
rpx
0
;
}
.notice-label
{
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
font-size
:
24
rpx
;
}
.notice-text
{
color
:
#666
;
}
.notice-link
{
color
:
#007AFF
;
}
...
...
@@ -1462,10 +1462,10 @@
.btn-red
{
background
:
linear-gradient
(
135deg
,
#AD181F
0%
,
#c42a2a
100%
);
color
:
#fff
;
border-radius
:
44
rpx
;
height
:
88
rpx
;
line-height
:
88
rpx
;
font-size
:
32
rpx
;
border-radius
:
44
rpx
;
height
:
88
rpx
;
line-height
:
88
rpx
;
font-size
:
32
rpx
;
width
:
100%
;
border
:
none
;
}
...
...
@@ -1476,98 +1476,98 @@
background
:
#c7c7c7
;
color
:
#fff
;
}
.fixedBottom
{
display
:
flex
;
justify-content
:
center
;
padding
:
30
rpx
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background
:
#fff
;
box-shadow
:
0
-2
rpx
10
rpx
rgba
(
0
,
0
,
0
,
0.05
);
z-index
:
99
;
}
.text-warning
{
font-size
:
28
rpx
;
margin-top
:
20
rpx
;
}
/* 新增:自定义弹窗样式(核心) */
.custom-modal
{
width
:
600
rpx
;
background
:
#fff
;
border-radius
:
20
rpx
;
padding
:
40
rpx
30
rpx
;
box-sizing
:
border-box
;
text-align
:
center
;
}
.modal-title
{
font-size
:
36
rpx
;
font-weight
:
600
;
color
:
#333
;
margin-bottom
:
30
rpx
;
}
.modal-content
{
font-size
:
30
rpx
;
color
:
#666
;
line-height
:
1.6
;
margin-bottom
:
20
rpx
;
text-align
:
left
;
}
.modal-tip
{
font-size
:
26
rpx
;
color
:
#F56C6C
;
margin-top
:
10
rpx
;
margin-bottom
:
30
rpx
;
}
.modal-btns
{
display
:
flex
;
justify-content
:
space-between
;
gap
:
20
rpx
;
}
.btn-cancel
{
flex
:
1
;
height
:
80
rpx
;
line-height
:
80
rpx
;
background
:
#f5f5f5
;
color
:
#666
;
border-radius
:
40
rpx
;
font-size
:
32
rpx
;
border
:
none
;
}
.btn-confirm
{
flex
:
1
;
height
:
80
rpx
;
line-height
:
80
rpx
;
background
:
#C4121B
;
/* 红色主色调,和图二一致 */
color
:
#fff
;
border-radius
:
40
rpx
;
font-size
:
32
rpx
;
border
:
none
;
}
/* 去掉按钮默认边框 */
.btn-cancel
::after
,
.btn-confirm
::after
{
border
:
none
;
}
/* 考点申请弹窗专属样式 */
.apply-modal
{
padding
:
40
rpx
30
rpx
20
rpx
;
}
.apply-btns
{
margin-bottom
:
20
rpx
;
}
</
style
>
.fixedBottom
{
display
:
flex
;
justify-content
:
center
;
padding
:
30
rpx
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background
:
#fff
;
box-shadow
:
0
-2
rpx
10
rpx
rgba
(
0
,
0
,
0
,
0.05
);
z-index
:
99
;
}
.text-warning
{
font-size
:
28
rpx
;
margin-top
:
20
rpx
;
}
/* 新增:自定义弹窗样式(核心) */
.custom-modal
{
width
:
600
rpx
;
background
:
#fff
;
border-radius
:
20
rpx
;
padding
:
40
rpx
30
rpx
;
box-sizing
:
border-box
;
text-align
:
center
;
}
.modal-title
{
font-size
:
36
rpx
;
font-weight
:
600
;
color
:
#333
;
margin-bottom
:
30
rpx
;
}
.modal-content
{
font-size
:
30
rpx
;
color
:
#666
;
line-height
:
1.6
;
margin-bottom
:
20
rpx
;
text-align
:
left
;
}
.modal-tip
{
font-size
:
26
rpx
;
color
:
#F56C6C
;
margin-top
:
10
rpx
;
margin-bottom
:
30
rpx
;
}
.modal-btns
{
display
:
flex
;
justify-content
:
space-between
;
gap
:
20
rpx
;
}
.btn-cancel
{
flex
:
1
;
height
:
80
rpx
;
line-height
:
80
rpx
;
background
:
#f5f5f5
;
color
:
#666
;
border-radius
:
40
rpx
;
font-size
:
32
rpx
;
border
:
none
;
}
.btn-confirm
{
flex
:
1
;
height
:
80
rpx
;
line-height
:
80
rpx
;
background
:
#C4121B
;
/* 红色主色调,和图二一致 */
color
:
#fff
;
border-radius
:
40
rpx
;
font-size
:
32
rpx
;
border
:
none
;
}
/* 去掉按钮默认边框 */
.btn-cancel
::after
,
.btn-confirm
::after
{
border
:
none
;
}
/* 考点申请弹窗专属样式 */
.apply-modal
{
padding
:
40
rpx
30
rpx
20
rpx
;
}
.apply-btns
{
margin-bottom
:
20
rpx
;
}
</
style
>
...
...
pages/index/perfect.vue
View file @
67e1a42
...
...
@@ -100,7 +100,7 @@
<view
v-else
class=
"license-preview"
>
<image
:src=
"getImageUrl(getBusinessLicenseUrl())"
class=
"license-img"
@
click=
"previewImage(getImageUrl(getBusinessLicenseUrl()))"
></image>
<view
v-if=
"
editIng
"
class=
"delete-btn"
@
click=
"removeBusinessLicense"
>
×
</view>
<view
v-if=
"
canEditCertField('businessLicense')
"
class=
"delete-btn"
@
click=
"removeBusinessLicense"
>
×
</view>
</view>
</view>
</uni-forms-item>
...
...
@@ -131,6 +131,7 @@
class=
"custom-picker"
popup-title=
"请选择所在地区"
@
change=
"changeAddress"
:readonly=
"true"
></uni-data-picker>
</view>
</uni-forms-item>
...
...
@@ -142,7 +143,9 @@
<view
class=
"picker-wrapper"
>
<uni-data-picker
v-model=
"form.parentId"
:disabled=
"isFieldDisabled('parentId')"
:disabled=
"true"
:readonly=
"true"
:clear-icon=
"false"
:level=
"3"
:localdata=
"assoList"
class=
"custom-picker"
...
...
@@ -160,7 +163,7 @@
<view
v-else
class=
"idcard-preview"
>
<image
:src=
"getImageUrl(form.legalIdcPhoto1)"
class=
"idcard-img"
@
click=
"previewImage(getImageUrl(form.legalIdcPhoto1))"
></image>
<view
v-if=
"
editIng
"
class=
"delete-btn"
@
click=
"removeIdCardFront"
>
×
</view>
<view
v-if=
"
canEditCertField('legalIdcPhoto1')
"
class=
"delete-btn"
@
click=
"removeIdCardFront"
>
×
</view>
</view>
</view>
</view>
...
...
@@ -172,7 +175,7 @@
<view
v-else
class=
"idcard-preview"
>
<image
:src=
"getImageUrl(form.legalIdcPhoto2)"
class=
"idcard-img"
@
click=
"previewImage(getImageUrl(form.legalIdcPhoto2))"
></image>
<view
v-if=
"
editIng
"
class=
"delete-btn"
@
click=
"removeIdCardBack"
>
×
</view>
<view
v-if=
"
canEditCertField('legalIdcPhoto2')
"
class=
"delete-btn"
@
click=
"removeIdCardBack"
>
×
</view>
</view>
</view>
</view>
...
...
@@ -186,11 +189,11 @@
placeholder=
"请输入法人证件号"
/>
</uni-forms-item>
<uni-forms-item
label=
"联系人"
required
>
<uni-easyinput
v-model=
"form.siteContact"
:disabled=
"!
editIng
"
class=
"input-with-border"
<uni-easyinput
v-model=
"form.siteContact"
:disabled=
"!
canEditCertField('siteContact')
"
class=
"input-with-border"
placeholder=
"请输入联系人"
/>
</uni-forms-item>
<uni-forms-item
label=
"联系方式"
required
>
<uni-easyinput
v-model=
"form.siteTel"
:disabled=
"!
editIng
"
class=
"input-with-border"
<uni-easyinput
v-model=
"form.siteTel"
:disabled=
"!
canEditCertField('siteTel')
"
class=
"input-with-border"
placeholder=
"请输入联系方式"
/>
</uni-forms-item>
<uni-forms-item
label=
"上传机构照片"
required
>
...
...
@@ -201,7 +204,7 @@
<view
v-else
class=
"pictures-preview"
>
<image
:src=
"getImageUrl(form.pictures.split(',')[0])"
class=
"picture-img"
@
click=
"previewImage(form.pictures.split(',').map(url => getImageUrl(url)))"
></image>
<view
v-if=
"
editIng
"
class=
"delete-btn"
@
click=
"removePictures"
>
×
</view>
<view
v-if=
"
canEditCertField('pictures')
"
class=
"delete-btn"
@
click=
"removePictures"
>
×
</view>
</view>
</view>
</uni-forms-item>
...
...
@@ -209,7 +212,7 @@
<view
class=
"notice-box"
>
<checkbox-group
@
change=
"onNoticeChange"
>
<label
class=
"notice-label"
>
<checkbox
:checked=
"form.notice"
:disabled=
"!
editIng
"
color=
"#AD181F"
value=
"1"
/>
<checkbox
:checked=
"form.notice"
:disabled=
"!
canEditCertField('notice')
"
color=
"#AD181F"
value=
"1"
/>
<text
class=
"notice-text"
>
我已阅读并同意
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(1)"
>
《注册须知》
</text>
<text
class=
"notice-link"
@
click
.
stop=
"showNotice(2)"
>
《入会须知》
</text>
...
...
@@ -426,7 +429,19 @@ const creditCodeValid = ref(true)
const
ocrLockedFields
=
ref
({})
function
isFieldDisabled
(
field
)
{
return
!
editIng
.
value
||
!!
ocrLockedFields
.
value
[
field
]
if
(
!
canEditCertField
(
field
))
return
true
if
(
isRejectLimitedMode
()
&&
canEditCertField
(
field
))
return
false
return
!!
ocrLockedFields
.
value
[
field
]
}
function
isRejectLimitedMode
()
{
return
String
(
authenticationStatus
.
value
)
===
'3'
}
function
canEditCertField
(
field
)
{
if
(
!
editIng
.
value
)
return
false
if
(
!
isRejectLimitedMode
())
return
true
return
[
'siteContact'
,
'siteTel'
,
'pictures'
,
'notice'
].
includes
(
field
)
}
function
lockOcrField
(
field
,
value
)
{
...
...
@@ -441,7 +456,7 @@ function unlockOcrFields() {
// 须知勾选
function
onNoticeChange
(
e
)
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'notice'
)
)
return
const
values
=
e
.
detail
.
value
form
.
value
.
notice
=
values
.
includes
(
'1'
)
}
...
...
@@ -886,12 +901,8 @@ function findAssoNodeWithPath(list, targetId, currentPath) {
// 协会选择(修复:100%对齐PC端el-cascader emitPath: false逻辑,只取最后一级ID)
function
changCase
(
e
)
{
if
(
isFieldDisabled
(
'parentId'
))
return
const
valueArr
=
e
.
detail
?.
value
||
e
;
// 取最后一级的value(纯ID)
const
lastNode
=
valueArr
[
valueArr
.
length
-
1
];
form
.
value
.
parentId
=
lastNode
?.
value
||
''
;
assoFullName
.
value
=
getAssoFullName
(
valueArr
)
// 所属协会只展示,不允许在注册引导页手动修改。
return
}
// 地址选择(核心修复:从对象中提取纯value,对齐PC端格式)
...
...
@@ -1144,7 +1155,7 @@ function submitCertification() {
// 营业执照上传
function
onBusinessLicenseSelect
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'businessLicense'
)
)
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -1173,7 +1184,6 @@ function onBusinessLicenseSelect() {
const
ocrData
=
data
.
data
form
.
value
.
creditCode
=
ocrData
.
creditCode
||
form
.
value
.
creditCode
form
.
value
.
companyName
=
ocrData
.
companyName
||
form
.
value
.
companyName
form
.
value
.
legal
=
ocrData
.
legalPerson
||
form
.
value
.
legal
lockOcrField
(
'creditCode'
,
form
.
value
.
creditCode
)
lockOcrField
(
'companyName'
,
form
.
value
.
companyName
)
lockOcrField
(
'legal'
,
form
.
value
.
legal
)
...
...
@@ -1204,7 +1214,7 @@ function onBusinessLicenseSelect() {
}
function
removeBusinessLicense
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'businessLicense'
)
)
return
form
.
value
.
businessLicense
=
''
form
.
value
.
businessLicenseName
=
''
unlockOcrFields
()
...
...
@@ -1326,19 +1336,19 @@ function applyBusinessAddress(address) {
// 删除身份证正面
function
removeIdCardFront
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'legalIdcPhoto1'
)
)
return
form
.
value
.
legalIdcPhoto1
=
''
}
// 删除身份证反面
function
removeIdCardBack
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'legalIdcPhoto2'
)
)
return
form
.
value
.
legalIdcPhoto2
=
''
}
// 身份证上传
function
onIdCardFrontSelect
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'legalIdcPhoto1'
)
)
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -1359,7 +1369,7 @@ function onIdCardFrontSelect() {
}
function
onIdCardBackSelect
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'legalIdcPhoto2'
)
)
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -1405,7 +1415,7 @@ function extractIdCardInfo(tempPath) {
// 机构照片上传
function
onPicturesSelect
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'pictures'
)
)
return
uni
.
chooseImage
({
count
:
3
,
sizeType
:
[
'compressed'
],
...
...
@@ -1444,7 +1454,7 @@ function previewImage(url) {
// 删除机构照片
function
removePictures
()
{
if
(
!
editIng
.
value
)
return
if
(
!
canEditCertField
(
'pictures'
)
)
return
form
.
value
.
pictures
=
''
}
...
...
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