Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
regional-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d01d8ada
authored
Jun 25, 2026
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增招聘添加校验
1 parent
81bf4392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
packageWorkspace/pages/recruitManage/recruitInsert/recruitInsert.js
packageWorkspace/pages/recruitManage/recruitInsert/recruitInsert.js
View file @
d01d8ad
...
...
@@ -36,6 +36,10 @@ const VALIDATION_CONFIG = {
}
}
// 详细地址:仅支持大小写字母、数字、中文及 、,/[]【】(提交时校验)
const
ADDRESS_DETAIL_ALLOWED_REG
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5、,
\/\[\]
【】
]
*$/
const
ADDRESS_DETAIL_FORMAT_TIP
=
'详细地址仅支持大小写字母、数字、中文及、,/[]【】符号'
Page
({
data
:
{
IMG_URL
,
...
...
@@ -212,7 +216,7 @@ Page({
// 详细地址输入(未创建系统门店时)
onAddressDetailInput
(
e
)
{
const
value
=
e
.
detail
.
value
.
trim
().
substring
(
0
,
60
)
const
value
=
e
.
detail
.
value
.
substring
(
0
,
60
)
const
formList
=
this
.
data
.
formList
formList
[
FORM_FIELDS
.
ADDRESS_DETAIL
].
value
=
value
formList
[
FORM_FIELDS
.
ADDRESS_DETAIL
].
displayValue
=
value
...
...
@@ -595,13 +599,18 @@ Page({
},
// 表单验证
validateForm
()
{
const
{
formList
}
=
this
.
data
const
{
formList
,
bySystemMerchant
}
=
this
.
data
for
(
let
[
index
,
config
]
of
Object
.
entries
(
VALIDATION_CONFIG
))
{
if
(
config
.
required
&&
!
formList
[
index
].
value
)
{
wx
.
showToast
({
title
:
config
.
tip
,
icon
:
'none'
,
duration
:
2000
})
return
false
}
}
const
addressDetail
=
formList
[
FORM_FIELDS
.
ADDRESS_DETAIL
].
value
||
''
if
(
bySystemMerchant
&&
addressDetail
&&
!
ADDRESS_DETAIL_ALLOWED_REG
.
test
(
addressDetail
))
{
wx
.
showToast
({
title
:
ADDRESS_DETAIL_FORMAT_TIP
,
icon
:
'none'
,
duration
:
2000
})
return
false
}
return
true
},
...
...
Write
Preview
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