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
b6573691
Commit
b6573691
authored
Oct 30, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
7f68da5d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
67 deletions
+78
-67
src/common/validator.js
src/common/validator.js
+1
-2
src/components/index/SignUp/pass.vue
src/components/index/SignUp/pass.vue
+14
-3
src/components/index/SignUp/referInfo.vue
src/components/index/SignUp/referInfo.vue
+18
-26
src/request/index/network.js
src/request/index/network.js
+0
-1
src/router/index.js
src/router/index.js
+10
-3
src/views/index/camp/Index.vue
src/views/index/camp/Index.vue
+12
-3
src/views/index/camp/SignUp.vue
src/views/index/camp/SignUp.vue
+22
-28
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+1
-1
No files found.
src/common/validator.js
View file @
b6573691
...
...
@@ -24,6 +24,7 @@ export default {
},
validateid_card
:
function
(
rule
,
value
,
callback
)
{
// console.log(value, 'sss')
if
(
!
value
)
{
return
callback
(
new
Error
(
"
身份证号不能为空
"
));
}
...
...
@@ -96,6 +97,4 @@ export default {
callback
()
}
},
}
src/components/index/SignUp/pass.vue
View file @
b6573691
<
template
>
<div
class=
"pass"
>
<div
class=
"pass"
>
<div
class=
"p_content"
>
<div>
<img
src=
"@/assets/img/signUp/icon-shenhe.png"
alt=
""
/>
...
...
@@ -10,7 +10,7 @@
</div>
<div
class=
"btn"
v-show=
"this.getExamine == 1 || this.getExamine == 2"
>
<el-button
@
click=
"paying()"
>
下一步
</el-button>
<el-button
@
click=
"paying()"
>
下一步
</el-button>
</div>
</div>
</div>
...
...
@@ -21,8 +21,19 @@
export
default
{
name
:
"
Pass
"
,
props
:
{
getExamine
:
String
,
getExamine
:
[
String
,
Number
],
next
:
""
,
},
created
()
{
console
.
log
(
this
.
getExamine
);
},
methods
:
{
paying
()
{
this
.
nextNum
=
1
;
this
.
$emit
(
'
isNext
'
,
this
.
nextNum
)
},
},
};
</
script
>
...
...
src/components/index/SignUp/referInfo.vue
View file @
b6573691
...
...
@@ -10,7 +10,7 @@
<div
class=
"cont_title"
>
个人信息
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"姓名"
prop=
"name"
class=
"is-error"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
ref=
"name"
v-model=
"referForm.name"
...
...
@@ -44,10 +44,10 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"出生日期"
prop=
"birthday"
>
<el-form-item
label=
"出生日期"
prop=
"birthday"
ref=
"birthday"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
<el-select
ref=
"bdYear"
v-model=
"bdYear"
placeholder=
"年"
>
<el-select
v-model=
"bdYear"
placeholder=
"年"
>
<el-option
v-for=
"(item, index) in yearArrs"
:key=
"index"
...
...
@@ -58,7 +58,7 @@
</el-select>
</el-col>
<el-col
:span=
"8"
>
<el-select
ref=
"bdMonth"
v-model=
"bdMonth"
placeholder=
"月"
>
<el-select
v-model=
"bdMonth"
placeholder=
"月"
>
<el-option
v-for=
"(item, index) in monthArrs"
:key=
"index"
...
...
@@ -69,12 +69,7 @@
</el-select>
</el-col>
<el-col
:span=
"8"
>
<el-select
ref=
"bdDay"
v-model=
"bdDay"
placeholder=
"日"
@
change=
"getTime()"
>
<el-select
v-model=
"bdDay"
placeholder=
"日"
@
change=
"getTime"
>
<el-option
v-for=
"(item, index) in dayArrs"
:key=
"index"
...
...
@@ -89,7 +84,7 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"籍贯"
prop=
"jiguan_code"
class=
"is-error"
>
<el-form-item
label=
"籍贯"
prop=
"jiguan_code"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-select
...
...
@@ -334,7 +329,7 @@
</el-form-item>
<el-form-item
class=
"btn"
>
<el-button
@
click=
"confirm"
>
提交资料
</el-button>
<el-button
@
click=
"confirm
()
"
>
提交资料
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -351,19 +346,13 @@ import {
getSchool
,
}
from
"
r/index/signUp
"
;
import
{
upload
}
from
"
r/index/network
"
;
import
{
validateid_card
,
validateEmail
,
validatePhone
,
}
from
"
common/validator
"
;
import
validator
from
"
common/validator
"
;
export
default
{
name
:
"
CheckForm
"
,
data
()
{
let
validateContent
=
(
rule
,
value
,
callback
)
=>
{
// console.log(rule, value, callback);
// console.log(this.referForm.birthday);
if
(
!
this
.
referForm
.
birthday
)
{
callback
(
new
Error
(
"
出生日期不能为空!
"
));
}
else
{
...
...
@@ -371,8 +360,6 @@ export default {
}
};
let
validateContents
=
(
rule
,
value
,
callback
)
=>
{
// console.log(rule, value, callback);
// console.log(this.referForm.jiguan_code);
if
(
!
this
.
referForm
.
jiguan_code
)
{
callback
(
new
Error
(
"
籍贯不能为空!
"
));
}
else
{
...
...
@@ -409,7 +396,7 @@ export default {
],
id_card
:
[
{
required
:
true
,
message
:
"
身份证号码不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validateid_card
,
trigger
:
"
blur
"
},
{
validator
:
validat
or
.
validat
eid_card
,
trigger
:
"
blur
"
},
],
birthday
:
[
{
...
...
@@ -436,7 +423,7 @@ export default {
],
email
:
[
{
required
:
true
,
message
:
"
邮箱不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validateEmail
,
trigger
:
"
blur
"
},
{
validator
:
validat
or
.
validat
eEmail
,
trigger
:
"
blur
"
},
],
school_province
:
[
{
...
...
@@ -460,7 +447,7 @@ export default {
],
school_phone
:
[
{
required
:
true
,
message
:
"
手机号不能为空!
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePhone
,
trigger
:
"
blur
"
},
{
validator
:
validat
or
.
validat
ePhone
,
trigger
:
"
blur
"
},
],
},
selectProvince
:
[],
//省份
...
...
@@ -818,6 +805,7 @@ export default {
},
// 滚动到固定地方
scrollView
(
object
)
{
console
.
log
(
object
,
"
object
"
);
console
.
log
(
object
,
"
object
"
);
for
(
let
i
in
object
)
{
if
(
!
i
)
{
...
...
@@ -849,21 +837,25 @@ export default {
}
},
confirm
()
{
console
.
log
(
111
);
console
.
log
(
this
.
$refs
[
"
birthday
"
]);
this
.
$refs
[
"
referRef
"
].
validate
((
valid
,
object
)
=>
{
console
.
log
(
object
,
"
object
"
);
console
.
log
(
"
11
"
,
valid
);
if
(
!
valid
)
{
console
.
log
(
"
2221
"
,
valid
);
this
.
scrollView
(
object
);
return
;
}
console
.
log
(
"
11
"
,
valid
);
// return;
console
.
log
(
2222
);
setAccount
(
this
.
referForm
).
then
((
res
)
=>
{
console
.
log
(
res
,
"
setAccount
"
);
if
(
res
.
data
.
code
!=
200
)
{
// window.scrollTo(0, 0)
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
console
.
log
(
3333
);
this
.
$emit
(
"
getstatus
"
,
res
.
data
.
status
);
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$router
.
push
(
"
/signUp/check
"
);
...
...
src/request/index/network.js
View file @
b6573691
...
...
@@ -26,7 +26,6 @@ const instance = axios.create({
instance
.
interceptors
.
request
.
use
(
(
config
)
=>
{
console
.
log
(
config
,
'
111
'
);
if
(
config
.
method
===
"
post
"
&&
!
config
.
notQs
)
{
config
.
data
=
qs
.
stringify
(
config
.
data
);
}
...
...
src/router/index.js
View file @
b6573691
...
...
@@ -113,12 +113,19 @@ router.beforeEach((to, from, next) => {
toLogin
=
"
/login
"
,
toRegister
=
"
/register
"
,
toReset
=
"
/reset
"
// toRrecruit = "/recruit"
let
token
=
localStorage
.
getItem
(
tokenKey
);
let
nextUrl
=
false
;
let
code
=
false
;
if
(
to
.
path
==
toLogin
||
to
.
path
==
toRegister
||
to
.
path
==
toReset
)
{
nextUrl
=
false
;
}
else
if
(
to
.
name
==
"
recruit
"
)
{
if
(
to
.
path
==
toLogin
||
to
.
path
==
toRegister
||
to
.
path
==
toReset
)
{
// nextUrl = false;
code
=
to
.
params
.
code
;
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
nextUrl
=
false
;
}
});
}
else
if
(
to
.
name
==
"
recruit
"
)
{
code
=
to
.
params
.
code
;
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
...
...
src/views/index/camp/Index.vue
View file @
b6573691
...
...
@@ -84,9 +84,9 @@ export default {
created
()
{
window
.
localStorage
.
setItem
(
"
campindex_type
"
,
0
);
this
.
campindex_type
=
window
.
localStorage
.
getItem
(
"
campindex_type
"
);
this
.
campindex_type
=
0
this
.
campindex_type
=
0
;
this
.
getStatus
();
this
.
ToSignUp
()
this
.
ToSignUp
()
;
},
mounted
()
{
window
.
addEventListener
(
"
scroll
"
,
this
.
handleScrollX
,
true
);
...
...
@@ -167,18 +167,24 @@ export default {
background-color
:
#f8f8f8
;
}
}
// .com-container {
// height: calc(100% - 100px);
// }
.index-container
{
padding
:
104px
0
70px
0
;
display
:
flex
;
flex-flow
:
row
;
.camp_left
{
// width: 100px;
height
:
100%
;
position
:
relative
;
width
:
22%
;
max-width
:
280px
;
min-width
:
200px
;
// width: calc(100% - 100px);
height
:
300px
;
background-color
:
#ffffff
;
border-radius
:
8px
;
padding
:
20px
0
;
...
...
@@ -226,6 +232,9 @@ export default {
.camp_right
{
flex
:
1
;
// width: calc(100% - 100px);
// height: 100%;
// overflow: auto;
border-radius
:
8px
;
background-color
:
#ffffff
;
}
...
...
src/views/index/camp/SignUp.vue
View file @
b6573691
...
...
@@ -15,6 +15,7 @@
<Pass
v-else-if=
"type == 'check'"
@
getstatus=
"statuss"
@
isNext=
"isNext"
:getExamine=
"getExamine"
></Pass>
<Paying
v-else-if=
"type == 'pay'"
@
getstatus=
"statuss"
></Paying>
...
...
@@ -50,10 +51,10 @@ export default {
status
:
""
,
//进度
doubt_code
:
window
.
localStorage
.
getItem
(
"
doubt_code
"
),
doubt_info
:
window
.
localStorage
.
getItem
(
"
doubt_info
"
),
doubt_check
:
window
.
localStorage
.
getItem
(
"
doubt_check
"
),
status_val
:
""
,
getExamine
:
""
,
isNext
:
""
,
};
},
created
()
{
...
...
@@ -66,7 +67,7 @@ export default {
watch
:
{
$route
:
{
handler
(
val
)
{
console
.
log
(
val
,
"
routeval
"
);
//
console.log(val, "routeval");
const
that
=
this
;
if
(
val
.
path
.
indexOf
(
"
signUp
"
)
!=
-
1
)
{
that
.
type
=
val
.
params
.
type
;
...
...
@@ -75,27 +76,18 @@ export default {
deep
:
true
,
},
status
(
val
)
{
console
.
log
(
val
,
"
status
"
);
// console.log(val, "status");
},
isNext
(
val
)
{
this
.
isNext
=
val
;
console
.
log
(
val
,
"
isNext
"
);
},
},
methods
:
{
// 点击下一步,触发父组件方法
statuss
(
val
)
{
console
.
log
(
val
,
"
statuss
"
);
//
console.log(val, "statuss");
this
.
status_val
=
val
;
// if (this.status_val == 1) {
// this.type = "invitation";
// this.status = 1;
// } else if (this.status_val == 2) {
// this.type = "referInfo";
// this.status = 3;
// } else if (this.status_val == 3) {
// this.type = "check";
// } else if (this.status_val == 4) {
// this.type = "pay";
// } else if (this.status_val == 5) {
// this.type = "success";
// }
this
.
signUpInit
(
this
.
status_val
);
},
...
...
@@ -148,17 +140,19 @@ export default {
this
.
status
=
3
;
}
}
else
if
(
this
.
status
==
4
)
{
if
(
res
.
data
.
examine_status
==
0
)
{
this
.
type
=
"
check
"
;
this
.
status
=
3
;
}
else
if
(
res
.
data
.
examine_status
==
1
)
{
// console.log(333);
this
.
type
=
"
pay
"
;
this
.
status
=
4
;
}
else
if
(
res
.
data
.
examine_status
==
2
)
{
this
.
type
=
"
referInfo
"
;
this
.
status
=
2
;
return
this
.
$message
.
error
(
res
.
data
.
examine_reason
);
this
.
type
=
"
check
"
;
this
.
status
=
3
;
if
(
this
.
isNext
!=
null
)
{
if
(
res
.
data
.
examine_status
==
1
)
{
console
.
log
(
333
);
this
.
type
=
"
pay
"
;
this
.
status
=
4
;
}
else
if
(
res
.
data
.
examine_status
==
2
)
{
this
.
type
=
"
referInfo
"
;
this
.
status
=
2
;
return
this
.
$message
.
error
(
res
.
data
.
examine_reason
);
}
}
}
else
if
(
this
.
status
==
5
)
{
this
.
type
=
"
pay
"
;
...
...
src/views/index/login/Register.vue
View file @
b6573691
...
...
@@ -200,7 +200,7 @@ export default {
const
timeLag
=
intervalTime
(
startTime
,
endTime
);
console
.
log
(
timeLag
);
if
(
!
this
.
timer
)
{
this
.
count
=
timeLag
-
1
;
//59
this
.
count
=
timeLag
;
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
timeLag
)
{
...
...
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