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
2a9d7b5d
Commit
2a9d7b5d
authored
Oct 14, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0d845aa4
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
635 additions
and
526 deletions
+635
-526
src/components/index/SignUp/confirm.vue
src/components/index/SignUp/confirm.vue
+36
-22
src/request/index/login.js
src/request/index/login.js
+5
-0
src/request/index/register.js
src/request/index/register.js
+9
-2
src/request/index/signUp.js
src/request/index/signUp.js
+8
-0
src/router/index.js
src/router/index.js
+4
-4
src/router/index/camp.js
src/router/index/camp.js
+1
-1
src/views/index/camp/Index.vue
src/views/index/camp/Index.vue
+1
-1
src/views/index/camp/SignUp.vue
src/views/index/camp/SignUp.vue
+13
-7
src/views/index/login/Login.vue
src/views/index/login/Login.vue
+15
-16
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+325
-318
src/views/index/login/Reset.vue
src/views/index/login/Reset.vue
+216
-153
vue.config.js
vue.config.js
+2
-2
No files found.
src/components/index/SignUp/confirm.vue
View file @
2a9d7b5d
...
...
@@ -21,16 +21,30 @@
>
</div>
<div
class=
"btn"
>
<el-button
@
click=
"next()"
>
下一步
</el-button>
</div>
<el-button
:disabled=
'!checked'
@
click=
"next()"
>
下一步
</el-button>
</div>
</div>
</
template
>
<
script
>
/* eslint-disable */
export
default
{
name
:
"
Confirm
"
,
data
()
{
return
{
checked
:
false
};
},
methods
:{
next
(){
// if(!this.checked){
// return this.$message.console.error('请');
// }
console
.
log
(
this
.
checked
)
this
.
$router
.
push
(
"
/signUp/invitation
"
);
}
}
};
</
script
>
...
...
src/request/index/login.js
View file @
2a9d7b5d
...
...
@@ -3,8 +3,10 @@ import {
request
}
from
'
./network
'
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
// 登录
export
function
login
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/auth/login
'
,
...
...
@@ -15,6 +17,7 @@ export function login(data) {
// 退出
export
function
logout
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/auth/loginOut
'
,
...
...
@@ -24,6 +27,7 @@ export function logout(data) {
// 通过旧密码找回密码
export
function
changePassOld
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/auth/changePassOld
'
,
...
...
@@ -33,6 +37,7 @@ export function changePassOld(data) {
// 通过验证码找回密码
export
function
changePassCode
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/auth/changePassCode
'
,
...
...
src/request/index/register.js
View file @
2a9d7b5d
...
...
@@ -11,10 +11,17 @@ export function registerCode(data) {
return
request
({
method
:
'
post
'
,
url
:
'
/web/code/registerCode
'
,
data
params
:
data
})
}
export
function
passwordCode
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/code/passwordCode
'
,
params
:
data
})
}
// 填写注册信息
export
function
setAccountInfo
(
data
)
{
...
...
src/request/index/signUp.js
View file @
2a9d7b5d
...
...
@@ -3,8 +3,10 @@ import {
request
}
from
'
./network
'
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
// 报名初始化
export
function
signUpInit
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/signUpInit
'
,
...
...
@@ -14,6 +16,7 @@ export function signUpInit(data) {
// 确认报名须知
export
function
setSignShould
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/setSignShould
'
,
...
...
@@ -23,6 +26,7 @@ export function setSignShould(data) {
// 页面个人获取
export
function
getAccount
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/getAccount
'
,
...
...
@@ -32,6 +36,7 @@ export function getAccount(data) {
// 获取学习成绩证明材料上传图片
export
function
getAchievementOss
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/getAchievementOss
'
,
...
...
@@ -41,6 +46,7 @@ export function getAchievementOss(data) {
// 页面个人信息保存
export
function
setAccount
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/setAccount
'
,
...
...
@@ -50,6 +56,7 @@ export function setAccount(data) {
// 获取报名省份城市
export
function
getProAndCity
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/getProAndCity
'
,
...
...
@@ -59,6 +66,7 @@ export function getProAndCity(data) {
// 获取报名学校
export
function
getSchool
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/signUp/getSchool
'
,
...
...
src/router/index.js
View file @
2a9d7b5d
...
...
@@ -38,10 +38,10 @@ const routes = [{
}
]
//
const originalPush = VueRouter.prototype.push
//
VueRouter.prototype.push = function push (location) {
//
return originalPush.call(this, location).catch(err => err)
//
}
const
originalPush
=
VueRouter
.
prototype
.
push
VueRouter
.
prototype
.
push
=
function
push
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
}
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
...
...
src/router/index/camp.js
View file @
2a9d7b5d
export
default
[{
path
:
'
/signUp
'
,
path
:
'
/signUp
/:type
'
,
name
:
'
index-signUp
'
,
component
:
()
=>
import
(
/* webpackChunkName: "login" */
'
v/index/camp/SignUp.vue
'
),
meta
:
{
...
...
src/views/index/camp/Index.vue
View file @
2a9d7b5d
...
...
@@ -5,7 +5,7 @@
<div
class=
"cc flex"
>
<div
class=
"camp_left"
>
<ul
class=
"camp_left_box"
>
<li
@
click=
"ToSignUp"
:class=
"activeMenu == 0 ? 'active' : ''"
>
<li
@
click=
"ToSignUp"
>
<img
src=
"@/assets/img/signUp/icon-bm.png"
/>
营地报名
</li>
<li
@
click=
"ToHomework"
>
...
...
src/views/index/camp/SignUp.vue
View file @
2a9d7b5d
...
...
@@ -6,11 +6,11 @@
<Breadcrumb>
</Breadcrumb>
</div>
</div>
<Confirm>
</Confirm>
<
!--
<Invitation>
</Invitation>
--
>
<
!--
<ReferInfo>
</ReferInfo>
--
>
<
!--
<Pass>
</Pass>
--
>
<
!--
<Paying>
</Paying>
--
>
<Confirm
v-if=
"type == 'examInfo'"
>
</Confirm>
<
Invitation
v-else-if=
"type == 'invitation'"
>
</Invitation
>
<
ReferInfo
v-else-if=
"type == 'referInfo'"
>
</ReferInfo
>
<
Pass
v-else-if=
"type == 'check'"
>
</Pass
>
<
Paying
v-else-if=
"type == 'pay'"
>
</Paying
>
</div>
</
template
>
...
...
@@ -33,7 +33,13 @@ export default {
Paying
,
},
data
()
{
return
{};
return
{
type
:
"
examInfo
"
,
};
},
created
()
{
this
.
type
=
this
.
$route
.
params
.
type
;
console
.
log
(
this
.
$route
);
},
};
</
script
>
...
...
src/views/index/login/Login.vue
View file @
2a9d7b5d
...
...
@@ -108,17 +108,11 @@ export default {
methods
:
{
// 忘记账号/密码
forgetPwd
()
{
// window.localStorage.setItem("f_forgetpwd", 0);
this
.
$router
.
replace
({
name
:
"
index-reset
"
});
},
// 去注册
register
()
{
// this.dialogFormFu = {
// title: "提示",
// message: 1,
// };
// this.dialogVisibleFu = true;
this
.
$router
.
replace
({
name
:
"
index-register
"
});
},
// 改变密码显示状态
...
...
@@ -127,16 +121,21 @@ export default {
},
// 登录
submitForm
()
{
this
.
$refs
[
"
loginFormRef
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
return
;
login
({
phone
:
this
.
loginForm
.
phone
,
password
:
this
.
loginForm
.
password
,
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
!=
200
)
{
if
(
res
.
status
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
}
this
.
$router
.
replace
({
name
:
"
cerificateIndex
"
});
this
.
$message
.
success
(
"
登录成功
"
);
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$router
.
replace
({
path
:
"
/signUp/examInfo
"
});
});
});
},
},
...
...
src/views/index/login/Register.vue
View file @
2a9d7b5d
...
...
@@ -11,7 +11,7 @@
class=
"demo-registerForm"
>
<el-form-item
prop=
"phone"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/username.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/username.png"
alt=
""
/>
<el-input
v-model=
"registerForm.phone"
placeholder=
"请输入手机号"
...
...
@@ -20,7 +20,7 @@
></el-input>
</el-form-item>
<el-form-item
prop=
"code"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/code.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/code.png"
alt=
""
/>
<el-input
v-model=
"registerForm.code"
placeholder=
"请输入短信验证码"
...
...
@@ -29,12 +29,14 @@
></el-input>
<!-- 短信验证码 -->
<div
class=
"phoneCode"
>
<span
class=
"code"
v-show=
"show"
@
click=
"getCode"
>
获取验证码
</span>
<span
class=
"code"
v-show=
"show"
@
click=
"getCode"
>
获取验证码
</span
>
<span
v-show=
"!show"
class=
"count"
>
{{
count
}}
s
</span>
</div>
</el-form-item>
<el-form-item
prop=
"password"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<el-input
v-model=
"registerForm.password"
:type=
"isShowPwd ? 'password' : 'text'"
...
...
@@ -58,7 +60,7 @@
/>
</el-form-item>
<el-form-item
prop=
"rq_password"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<el-input
v-model=
"registerForm.rq_password"
placeholder=
"请再次输入登录密码"
...
...
@@ -80,16 +82,16 @@
</
template
>
<
script
>
/* eslint-disable */
// 请求接口
import
{
registerCode
,
setAccountInfo
}
from
"
r/index/register
"
;
import
{
mobileCheck
}
from
"
@/common/utils.js
"
;
/* eslint-disable */
// 请求接口
import
{
registerCode
,
setAccountInfo
}
from
"
r/index/register
"
;
import
{
mobileCheck
}
from
"
@/common/utils.js
"
;
export
default
{
export
default
{
name
:
"
index-register
"
,
data
()
{
const
pwdCheck
=
async
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
this
.
step
Form
.
password
)
{
if
(
value
!==
this
.
register
Form
.
password
)
{
callback
(
new
Error
(
"
两次输入的密码不一致
"
));
}
else
{
callback
();
...
...
@@ -111,7 +113,7 @@
registerRules
:
{
// 对手机号进行校验
phone
:
[
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
validator
:
function
(
rule
,
value
,
callback
)
{
if
(
mobileCheck
(
value
)
===
false
)
{
...
...
@@ -125,17 +127,17 @@
],
// 对验证码进行校验
code
:
[
{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的验证码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的验证码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
rq_password
:
[
{
required
:
true
,
message
:
"
请输入确认密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
pwdCheck
,
trigger
:
"
blur
"
,
...
...
@@ -150,7 +152,7 @@
methods
:
{
// 去注册
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
this
.
$router
.
replace
({
name
:
"
index-login
"
});
},
// 改变密码显示状态
changePwdStatus
()
{
...
...
@@ -158,8 +160,8 @@
},
// 获取手机验证短信
getCode
()
{
if
(
!
this
.
registerForm
.
phone
)
{
return
this
.
$message
.
error
(
'
请输入手机号
'
);
if
(
!
this
.
registerForm
.
phone
)
{
return
this
.
$message
.
error
(
"
请输入手机号
"
);
}
// 倒计时60s
const
TIME_COUNT
=
60
;
...
...
@@ -181,14 +183,17 @@
phone
:
this
.
registerForm
.
phone
,
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
})
this
.
$message
.
success
(
res
.
data
.
message
);
});
},
// 表单验证
submitForm
()
{
this
.
$refs
[
"
registerFormRef
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
return
;
setAccountInfo
({
phone
:
this
.
registerForm
.
phone
,
code
:
this
.
registerForm
.
code
,
...
...
@@ -199,17 +204,20 @@
if
(
res
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
}
// this.$router.replace({ name: "" });
this
.
$message
.
success
(
res
.
message
);
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$router
.
replace
({
name
:
"
index-signUp
"
});
});
});
}
},
};
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
// 内容区域
.box_content
{
// 内容区域
.box_content
{
.content
{
max-width
:
1150px
;
margin
:
40px
auto
;
...
...
@@ -309,10 +317,10 @@
}
}
}
}
}
// 注册输入
.container
{
// 注册输入
.container
{
width
:
440px
;
// height: 640px;
background
:
#ffffff
;
...
...
@@ -419,7 +427,6 @@
padding
:
0
;
margin
:
30px
0
0
0
;
}
}
}
...
...
@@ -443,23 +450,23 @@
}
}
}
}
}
@media
screen
and
(
max-width
:
1601px
)
{
@media
screen
and
(
max-width
:
1601px
)
{
.container
{
right
:
18%
;
}
}
}
@media
screen
and
(
max-width
:
1501px
)
{
@media
screen
and
(
max-width
:
1501px
)
{
.container
{
right
:
16%
;
}
}
}
@media
screen
and
(
max-width
:
1401px
)
{
@media
screen
and
(
max-width
:
1401px
)
{
.container
{
right
:
14%
;
}
}
}
</
style
>
src/views/index/login/Reset.vue
View file @
2a9d7b5d
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
2a9d7b5d
...
...
@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost',
// port: 8080, // 端口号
// https: true, // https:{type:Boolean}
open
:
true
,
// 配置自动启动浏览器
hotOnly
:
true
,
// 热更新
//
open: true, // 配置自动启动浏览器
//
hotOnly: true, // 热更新
// // proxy: {
// // "/api": {
// // target: "http://127.0.0.1:8080/",
...
...
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