Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OKR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
OKR
Commits
8cb47d5d
Commit
8cb47d5d
authored
Nov 24, 2021
by
sixiaofeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮箱短号输入长度限制/邮箱验证
parent
721415f4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
6 deletions
+38
-6
.env.testpeople
.env.testpeople
+2
-1
c-cell.vue
src/components/common/c-cell.vue
+17
-1
add-member.vue
src/views/team/add-member.vue
+5
-2
apply-list.vue
src/views/team/apply-list.vue
+9
-1
join-team.vue
src/views/team/join-team/join-team.vue
+5
-1
No files found.
.env.testpeople
View file @
8cb47d5d
NODE_ENV=production
VUE_APP_QRCODE_URL=http://121.40.18.70:8889
VUE_APP_ENV=people
\ No newline at end of file
src/components/common/c-cell.vue
View file @
8cb47d5d
...
...
@@ -155,13 +155,29 @@ export default Vue.extend({
const
value
=
(
e
.
target
as
HTMLInputElement
).
value
this
.
length
=
value
.
length
if
(
this
.
limit
>
0
&&
this
.
length
>=
this
.
limit
)
{
(
e
.
target
as
HTMLInputElement
).
value
=
this
.
value
this
.
$emit
(
'input'
,
value
.
slice
(
0
,
this
.
limit
))
this
.
length
=
this
.
limit
;
(
e
.
target
as
HTMLInputElement
).
value
=
this
.
value
}
else
{
this
.
$emit
(
'input'
,
value
)
}
},
checkVal
(
val
:
string
)
{
if
(
this
.
required
&&
!
this
.
checkIfEmpty
(
val
))
{
this
.
isError
=
true
this
.
errorMessage
=
this
.
errorMsg
||
'值不能为空'
this
.
$emit
(
'input'
,
''
)
return
}
if
(
typeof
this
.
validator
===
'function'
&&
this
.
checkIfEmpty
(
val
))
{
this
.
validator
(
val
,
(
x
:
Error
)
=>
{
if
(
typeof
x
!==
'undefined'
)
{
this
.
isError
=
true
this
.
errorMessage
=
x
.
message
}
})
}
},
handleBlur
(
e
:
InputEvent
)
{
const
value
=
(
e
.
target
as
HTMLInputElement
).
value
if
(
this
.
required
&&
!
this
.
checkIfEmpty
(
value
))
{
...
...
src/views/team/add-member.vue
View file @
8cb47d5d
...
...
@@ -65,7 +65,7 @@
title=
"邮箱"
placeholder=
"请输入邮箱"
type=
"input"
:limit=
"
30
"
:limit=
"
23
"
:validator=
"checkMail"
/>
<c-cell
...
...
@@ -204,7 +204,10 @@ export default Vue.extend({
},
methods
:
{
validateParmas
():
boolean
{
const
{
phone
,
name
}
=
this
.
acceptJoin
const
{
phone
,
name
,
email
}
=
this
.
acceptJoin
if
(
typeof
email
!==
'undefined'
&&
email
!==
''
)
{
return
!
validateMail
(
email
)
}
return
!
validatePhone
(
phone
)
||
name
===
''
},
getStaff
(
id
:
string
)
{
...
...
src/views/team/apply-list.vue
View file @
8cb47d5d
...
...
@@ -60,7 +60,7 @@
<c-cell
v-model=
"detail.email"
title=
"邮箱"
:limit=
"
30
"
:limit=
"
23
"
placeholder=
"请输入邮箱"
type=
"input"
:validator=
"checkMail"
...
...
@@ -304,6 +304,14 @@ export default Vue.extend({
},
confirm
()
{
const
{
fromName
,
position
,
phone
,
shortPhone
,
email
}
=
this
.
detail
let
check
=
true
if
(
typeof
email
!==
'undefined'
&&
email
!==
''
)
{
check
=
validateMail
(
email
)
}
if
(
!
check
)
{
this
.
$toast
(
'请检查输入内容'
)
return
}
const
data
=
{
fromName
,
position
,
phone
,
shortPhone
,
email
,
joinTime
:
this
.
joinTime
,
...
...
src/views/team/join-team/join-team.vue
View file @
8cb47d5d
...
...
@@ -61,7 +61,7 @@
title=
"邮箱"
placeholder=
"请输入邮箱"
type=
"input"
:limit=
"
30
"
:limit=
"
23
"
:validator=
"checkMail"
/>
<input-cell
...
...
@@ -196,6 +196,10 @@ export default Vue.extend({
this
.
$toast
(
'请检查输入内容'
)
return
}
if
(
typeof
email
!==
'undefined'
&&
email
!==
''
&&
!
validateMail
(
email
))
{
this
.
$toast
(
'请检查输入内容'
)
return
}
const
data
=
{
entId
,
phone
,
reason
,
userName
,
shortPhone
,
email
,
types
:
1
}
...
...
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