Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
contraceptives_app
Project
Project
Details
Activity
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
ynby
contraceptives_app
Commits
f8c6e46a
Commit
f8c6e46a
authored
Mar 15, 2023
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
d0a9f513
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
.env.dev
.env.dev
+1
-1
common.js
src/utils/common.js
+10
-4
vue.config.js
vue.config.js
+1
-1
No files found.
.env.dev
View file @
f8c6e46a
NODE_ENV=dev
NODE_ENV=dev
VUE_APP_BASE_URL1 = http://192.168.
3.9
:8889
VUE_APP_BASE_URL1 = http://192.168.
1.116
:8889
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com
VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com
src/utils/common.js
View file @
f8c6e46a
...
@@ -3,11 +3,13 @@ export function getQueryVariable(variable, urlInfo) {
...
@@ -3,11 +3,13 @@ export function getQueryVariable(variable, urlInfo) {
let
url
=
decodeURI
(
decodeURI
(
urlInfo
||
window
.
location
.
href
))
let
url
=
decodeURI
(
decodeURI
(
urlInfo
||
window
.
location
.
href
))
console
.
log
(
url
)
console
.
log
(
url
)
let
i
=
url
.
indexOf
(
'?'
)
let
i
=
url
.
indexOf
(
'?'
)
let
queryStr
=
url
.
substr
(
i
+
1
)
let
queryStr
=
url
.
substr
(
i
+
1
)
let
vars
=
queryStr
.
split
(
"&"
);
let
vars
=
queryStr
.
split
(
"&"
);
for
(
let
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
let
pair
=
vars
[
i
].
split
(
"="
);
let
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
if
(
pair
[
0
]
==
variable
)
{
return
pair
[
1
];
}
}
}
return
''
;
return
''
;
}
}
...
@@ -99,6 +101,7 @@ export const womenIdCardReg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11
...
@@ -99,6 +101,7 @@ export const womenIdCardReg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11
export
const
idCardValidator
=
(
value
)
=>
{
export
const
idCardValidator
=
(
value
)
=>
{
const
reg
=
[
idCardReg
,
menIdCardReg
,
womenIdCardReg
][
0
];
const
reg
=
[
idCardReg
,
menIdCardReg
,
womenIdCardReg
][
0
];
if
(
value
)
{
const
val
=
value
.
trim
();
const
val
=
value
.
trim
();
const
flag
=
validateIdCard
(
value
);
const
flag
=
validateIdCard
(
value
);
if
((
!
flag
||
!
reg
.
test
(
value
))
&&
val
)
{
if
((
!
flag
||
!
reg
.
test
(
value
))
&&
val
)
{
...
@@ -106,6 +109,7 @@ export const idCardValidator = (value) => {
...
@@ -106,6 +109,7 @@ export const idCardValidator = (value) => {
resolve
(
false
)
resolve
(
false
)
})
})
}
}
}
new
Promise
(
resolve
=>
{
new
Promise
(
resolve
=>
{
resolve
(
true
)
resolve
(
true
)
})
})
...
@@ -113,13 +117,15 @@ export const idCardValidator = (value) => {
...
@@ -113,13 +117,15 @@ export const idCardValidator = (value) => {
};
};
//身份证方法校验
//身份证方法校验
export
const
idCardV
=
(
value
,
type
=
0
)
=>
{
export
const
idCardV
=
(
value
,
type
=
0
)
=>
{
const
reg
=
[
idCardReg
,
menIdCardReg
,
womenIdCardReg
][
type
];
const
reg
=
[
idCardReg
,
menIdCardReg
,
womenIdCardReg
][
type
];
if
(
value
)
{
const
val
=
value
.
trim
();
const
val
=
value
.
trim
();
const
flag
=
validateIdCard
(
value
);
const
flag
=
validateIdCard
(
value
);
if
((
!
flag
||
!
reg
.
test
(
value
))
&&
val
)
{
if
((
!
flag
||
!
reg
.
test
(
value
))
&&
val
)
{
return
false
return
false
}
}
}
return
true
return
true
}
}
...
...
vue.config.js
View file @
f8c6e46a
const
IsProd
=
process
.
env
.
NODE_ENV
===
'prod'
;
const
IsProd
=
process
.
env
.
NODE_ENV
===
'prod'
;
const
date
=
new
Date
();
const
date
=
new
Date
();
const
Version
=
''
+
date
.
getFullYear
()
+
date
.
getMonth
()
+
date
.
getDate
()
+
date
.
getHours
();
const
Version
=
''
+
date
.
getFullYear
()
+
date
.
getMonth
()
+
date
.
getDate
()
+
date
.
getHours
()
+
date
.
getTime
()
;
module
.
exports
=
{
module
.
exports
=
{
runtimeCompiler
:
true
,
runtimeCompiler
:
true
,
indexPath
:
"index.html"
,
indexPath
:
"index.html"
,
...
...
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