Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
campSite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨梦雪
campSite
Commits
00be5eb0
Commit
00be5eb0
authored
Apr 08, 2022
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
105c0cf6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
49 deletions
+72
-49
src/common/validator.js
src/common/validator.js
+2
-1
src/components/index/SignUp/referInfo.vue
src/components/index/SignUp/referInfo.vue
+18
-5
src/config/server.js
src/config/server.js
+6
-6
src/views/index/login/Login.vue
src/views/index/login/Login.vue
+29
-21
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+8
-8
src/views/index/login/Reset.vue
src/views/index/login/Reset.vue
+9
-8
No files found.
src/common/validator.js
View file @
00be5eb0
...
...
@@ -14,6 +14,7 @@ const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/
const
phoneReg
=
/^1
(
3|4|5|6|7|8|9
)\d{9}
$/
export
default
{
//手机号验证
validatePhone
:
function
(
rule
,
value
,
callback
)
{
if
(
!
phoneReg
.
test
(
value
)
||
value
.
length
!==
11
)
{
...
...
@@ -48,7 +49,7 @@ export default {
},
// 邮箱验证
validateEmail
:
function
(
rule
,
value
,
callback
)
{
console
.
log
(
value
,
'
ssss
'
)
console
.
log
(
value
,
'
ssss
'
)
if
(
!
emailReg
.
test
(
value
))
{
callback
(
new
Error
(
'
邮箱格式错误!
'
))
}
else
{
...
...
src/components/index/SignUp/referInfo.vue
View file @
00be5eb0
...
...
@@ -23,7 +23,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"性别"
prop=
"gender"
style=
"height: 73px
;
"
>
<el-form-item
label=
"性别"
prop=
"gender"
style=
"height: 73px"
>
<el-radio-group
v-model=
"referForm.gender"
ref=
"gender"
...
...
@@ -35,6 +35,17 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"年龄"
prop=
"age"
>
<el-input
ref=
"age"
v-model=
"referForm.age"
placeholder=
"填写年龄"
size=
"small"
clearable
/>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"12"
>
<el-form-item
label=
"身份证号"
prop=
"id_card"
>
<el-input
ref=
"id_card"
...
...
@@ -44,7 +55,7 @@
clearable
/>
</el-form-item>
</el-col>
</el-col>
-->
<!--
<el-col
:span=
"12"
>
<el-form-item
label=
"出生日期"
prop=
"birthday"
>
<el-row
:gutter=
"20"
>
...
...
@@ -666,6 +677,7 @@ export default {
referForm
:
{
name
:
null
,
gender
:
null
,
age
:
null
,
id_card
:
null
,
birthday
:
null
,
jiguan_code
:
null
,
...
...
@@ -691,6 +703,7 @@ export default {
gender
:
[
{
required
:
true
,
message
:
"
性别不能为空!
"
,
trigger
:
"
change
"
},
],
id_card
:
[
{
required
:
true
,
message
:
"
身份证号不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validator
.
validateid_card
,
trigger
:
"
blur
"
},
...
...
@@ -759,9 +772,9 @@ export default {
gender
:
[
{
required
:
true
,
message
:
"
性别不能为空!
"
,
trigger
:
"
change
"
},
],
id_card
:
[
{
required
:
true
,
message
:
"
身份证号
不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validator
.
validateid_card
,
trigger
:
"
blur
"
},
age
:
[
{
required
:
true
,
message
:
"
年龄
不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validator
.
validateNumber
,
trigger
:
"
blur
"
},
],
jiguan_code
:
[
...
...
src/config/server.js
View file @
00be5eb0
...
...
@@ -12,11 +12,11 @@
// export const SERVER_WS_URL = 'wss://api1.testgate.cn' // websocket
// 正式
//
export const SERVER_URL = "https://api.campcenter.cn/"; // 正式环境
//
export const DEVELOPMENT_SERVER_URL = "https://api.campcenter.cn/"; //开发环境
//
export const SERVER_WS_URL = "wss://api.campcenter.cn"; // websocket
export
const
SERVER_URL
=
"
https://api.campcenter.cn/
"
;
// 正式环境
export
const
DEVELOPMENT_SERVER_URL
=
"
https://api.campcenter.cn/
"
;
//开发环境
export
const
SERVER_WS_URL
=
"
wss://api.campcenter.cn
"
;
// websocket
// 测试
export
const
SERVER_URL
=
"
https://ying-test.campcenter.cn
"
;
// 正式环境
export
const
DEVELOPMENT_SERVER_URL
=
"
https://ying-test.campcenter.cn/
"
;
//开发环境
export
const
SERVER_WS_URL
=
"
wss://ying-test.campcenter.cn
"
;
// websocket
//
export const SERVER_URL = "https://ying-test.campcenter.cn"; // 正式环境
//
export const DEVELOPMENT_SERVER_URL = "https://ying-test.campcenter.cn/"; //开发环境
//
export const SERVER_WS_URL = "wss://ying-test.campcenter.cn"; // websocket
src/views/index/login/Login.vue
View file @
00be5eb0
<
template
>
<div
class=
"container"
>
<div
class=
"flex title_Login"
>
<div
class=
"title"
style=
"width: 30%"
@
click=
"toCodeLogin"
>
<div
:class=
"changeLogin == 2 ? 'change_login' : ''"
>
验证码登录
</div>
<div
class=
"title_Login"
>
<div
v-if=
"changeLogin == 1"
>
<div
class=
"title"
@
click=
"toCodeLogin"
>
<div
:class=
"changeLogin == 2 ? 'change_login' : ''"
>
验证码登录
</div>
</div>
<div
class=
"title"
@
click=
"toLogin"
>
<div
:class=
"changeLogin == 1 ? 'change_login' : ''"
>
账号密码登录
</div>
</div>
</div>
<div
class=
"title"
style=
"width: 35%"
@
click=
"toLogin"
>
<div
:class=
"changeLogin == 1 ? 'change_codelogin' : ''"
>
账号密码登录
<div
v-else-if=
"changeLogin == 2"
>
<div
class=
"title"
@
click=
"toLogin"
>
<div
:class=
"changeLogin == 1 ? 'change_login' : ''"
>
账号密码登录
</div>
</div>
<div
class=
"title"
@
click=
"toCodeLogin"
>
<div
:class=
"changeLogin == 2 ? 'change_login' : ''"
>
验证码登录
</div>
</div>
</div>
</div>
<div>
<el-form
...
...
@@ -84,7 +96,7 @@
<el-form-item>
<el-button
@
click=
"submitForm()"
>
登 录
</el-button>
</el-form-item>
<div
class=
"box"
>
<div
v-if=
"changeLogin == 1"
class=
"box"
>
<div>
<div
class=
"fr"
@
click=
"register()"
>
还没有账号?立即注册
</div>
<div
class=
"fl"
@
click=
"forgetPwd()"
>
忘记密码?
</div>
...
...
@@ -176,7 +188,7 @@ export default {
},
changeLogin
:
2
,
};
},
},
created
()
{
this
.
$emit
(
"
getStatus
"
,
false
);
const
code
=
this
.
$store
.
state
.
indexIdentity
;
...
...
@@ -310,26 +322,22 @@ export default {
margin-top
:
0
;
overflow
:
hidden
;
.title_Login
{
justify-content
:
space-between
;
position
:
relative
;
margin
:
19px
0
0
0
;
text-align
:
center
;
.title
{
height
:
20px
;
font-size
:
22
px
;
font-size
:
16
px
;
font-weight
:
500
;
color
:
var
(
--
color
);
line-height
:
20px
;
text-align
:
right
;
}
.change_login
{
width
:
100%
;
font-size
:
19px
;
margin-top
:
8px
;
border-bottom
:
2px
solid
var
(
--
color
);
}
.change_codelogin
{
width
:
100%
;
font-size
:
17px
;
margin-top
:
8px
;
border-bottom
:
2px
solid
var
(
--
color
);
font-size
:
22px
;
margin-top
:
32px
;
color
:
black
;
text-align
:
center
;
}
}
...
...
src/views/index/login/Register.vue
View file @
00be5eb0
...
...
@@ -333,8 +333,8 @@ export default {
overflow
:
hidden
;
.title
{
margin
:
19px
0
6px
0
;
width
:
132px
;
//
margin: 19px 0 6px 0;
//
width: 132px;
height
:
20px
;
font-size
:
22px
;
font-weight
:
500
;
...
...
@@ -342,12 +342,12 @@ export default {
line-height
:
20px
;
}
.line
{
width
:
103px
;
height
:
3px
;
background
:
var
(
--
color
);
border-radius
:
2px
;
}
//
.line {
//
width: 103px;
//
height: 3px;
//
background: var(--color);
//
border-radius: 2px;
//
}
::v-deep
.el-form
{
margin-top
:
60px
;
...
...
src/views/index/login/Reset.vue
View file @
00be5eb0
...
...
@@ -319,21 +319,22 @@ export default {
overflow
:
hidden
;
.title
{
margin
:
19px
0
6px
0
;
width
:
132px
;
//
margin: 19px 0 6px 0;
//
width: 132px;
height
:
20px
;
font-size
:
22px
;
font-weight
:
500
;
color
:
var
(
--
color
);
line-height
:
20px
;
text-align
:
center
;
}
.line
{
width
:
83px
;
height
:
3px
;
background
:
var
(
--
color
);
border-radius
:
2px
;
}
//
.line {
//
width: 83px;
//
height: 3px;
//
background: var(--color);
//
border-radius: 2px;
//
}
::v-deep
.el-form
{
margin-top
:
60px
;
...
...
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