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
24aa37f5
Commit
24aa37f5
authored
Nov 03, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.thussat.com.cn/yangmengxue/campsite
parents
f070952e
10cbb1a8
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
75 additions
and
55 deletions
+75
-55
src/components/index/Header.vue
src/components/index/Header.vue
+4
-2
src/components/index/SignUp/ConfirmSignUp.vue
src/components/index/SignUp/ConfirmSignUp.vue
+2
-1
src/components/index/SignUp/Header.vue
src/components/index/SignUp/Header.vue
+5
-2
src/components/index/SignUp/confirm.vue
src/components/index/SignUp/confirm.vue
+2
-1
src/components/index/SignUp/referInfo.vue
src/components/index/SignUp/referInfo.vue
+2
-1
src/router/index.js
src/router/index.js
+28
-14
src/store/index.js
src/store/index.js
+1
-0
src/views/index/camp/Index.vue
src/views/index/camp/Index.vue
+5
-4
src/views/index/login/Index.vue
src/views/index/login/Index.vue
+7
-1
src/views/index/login/Login.vue
src/views/index/login/Login.vue
+6
-4
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+6
-3
src/views/index/login/Reset.vue
src/views/index/login/Reset.vue
+4
-2
src/views/index/recruit/Index.vue
src/views/index/recruit/Index.vue
+3
-20
No files found.
src/components/index/Header.vue
View file @
24aa37f5
...
...
@@ -24,10 +24,12 @@ export default {
created
()
{},
methods
:
{
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/login?code=
"
+
code
);
},
toRegister
()
{
this
.
$router
.
replace
({
name
:
"
index-register
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/register?code=
"
+
code
);
},
onMouserEnter
(
val
){
this
.
isHover
=
val
;
...
...
src/components/index/SignUp/ConfirmSignUp.vue
View file @
24aa37f5
...
...
@@ -235,7 +235,8 @@ export default {
this
.
$emit
(
"
closeCFSUDialog
"
,
this
.
dialogVisible
,
true
);
// status=6,跳转到报名成功页面
// this.$emit("getstatus", res.data.status.status);
this
.
$router
.
push
(
"
/signUp/success
"
);
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/signUp/success?code=
"
+
code
);
}
else
{
//收到服务器信息,心跳重置
this
.
reset
();
...
...
src/components/index/SignUp/Header.vue
View file @
24aa37f5
...
...
@@ -68,7 +68,9 @@ export default {
window
.
localStorage
.
removeItem
(
"
campindex_type
"
);
// this.$store.state.token = "";
// 使用编程式导航跳转到登录页面
this
.
$router
.
push
({
name
:
"
recruit
"
});
// this.$router.push({ name: "recruit" });
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
replace
(
"
/
"
+
code
);
},
// 点击图片跳转到招生简章页面
toRecruit
()
{
...
...
@@ -87,7 +89,8 @@ export default {
// window.localStorage.removeItem("order_no");
// window.localStorage.removeItem("campindex_type");
// this.$store.state.token = "";
this
.
$router
.
replace
({
name
:
"
recruit
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
replace
(
"
/
"
+
code
);
},
},
};
...
...
src/components/index/SignUp/confirm.vue
View file @
24aa37f5
...
...
@@ -52,7 +52,8 @@ export default {
if
(
res
.
data
.
code
!==
200
)
return
this
.
$message
.
error
(
res
.
data
.
message
);
this
.
$emit
(
"
getstatus
"
,
res
.
data
.
status
);
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$router
.
push
(
"
/signUp/invitation
"
);
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/signUp/invitation?code=
"
+
code
);
});
},
getCams
()
{
...
...
src/components/index/SignUp/referInfo.vue
View file @
24aa37f5
...
...
@@ -964,7 +964,8 @@ export default {
// console.log(3333);
this
.
$emit
(
"
getstatus
"
,
res
.
data
.
status
);
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$router
.
push
(
"
/signUp/check
"
);
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/signUp/check?code=
"
+
code
);
this
.
referForm
=
res
.
data
.
data
;
});
});
...
...
src/router/index.js
View file @
24aa37f5
...
...
@@ -9,7 +9,8 @@ import indexCamp from './index/camp'
import
{
getCam
}
from
"
r/index/login
"
;
import
{
Message
}
from
'
element-ui
'
;
Vue
.
prototype
.
$message
=
Message
;
Vue
.
use
(
VueRouter
)
...
...
@@ -76,9 +77,20 @@ router.onError((error) => {
})
function
checkCam
(
code
,
cb
)
{
if
(
!
code
){
Message
({
message
:
"
请访问正确的营地链接地址
"
,
type
:
'
waring
'
});
cb
&&
cb
(
false
);
return
false
;
}
getCam
(
code
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
!=
200
)
{
this
.
$store
.
$message
.
error
(
res
.
data
.
message
);
Message
({
message
:
"
请访问正确的营地链接地址
"
,
type
:
'
waring
'
});
cb
&&
cb
(
false
);
return
false
;
}
...
...
@@ -102,6 +114,7 @@ function checkCam(code, cb) {
"
doubt_check
"
,
res
.
data
.
audit_individual_information
);
//是否审核个人资料
store
.
state
.
info
=
res
.
data
;
cb
&&
cb
(
true
);
}).
catch
(()
=>
{
cb
&&
cb
(
false
);
...
...
@@ -113,37 +126,38 @@ router.beforeEach((to, from, next) => {
toLogin
=
"
/login
"
,
toRegister
=
"
/register
"
,
toReset
=
"
/reset
"
// toRecruit = "/:code"
let
token
=
localStorage
.
getItem
(
tokenKey
);
let
nextUrl
=
false
;
let
code
=
false
;
document
.
title
=
to
.
meta
.
title
;
if
(
to
.
path
==
toLogin
||
to
.
path
==
toRegister
||
to
.
path
==
toReset
)
{
// nextUrl = false;
code
=
to
.
params
.
code
;
code
=
to
.
params
.
code
?
to
.
params
.
code
:
to
.
query
.
code
;
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
nextUrl
=
false
;
return
next
()
;
}
});
}
else
if
(
to
.
name
==
"
recruit
"
)
{
code
=
to
.
params
.
code
;
console
.
log
(
code
,
'
code
'
)
to
.
path
==
"
/:code
"
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
nextUrl
=
false
;
return
next
()
;
}
});
}
else
{
if
(
!
token
)
{
nextUrl
=
toLogin
;
return
next
(
toLogin
)
;
}
else
{
nextUrl
=
false
;
code
=
to
.
params
.
code
?
to
.
params
.
code
:
to
.
query
.
code
;
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
return
next
();
}
});
}
}
document
.
title
=
to
.
meta
.
title
;
return
nextUrl
?
next
(
nextUrl
)
:
next
();
// return nextUrl ? next(nextUrl) : next();
})
// 页面跳转之后页面回滚到顶部
...
...
src/store/index.js
View file @
24aa37f5
...
...
@@ -15,6 +15,7 @@ let state = {
token
:
''
,
showDialog
:
false
,
dialogType
:
0
,
info
:{},
isLogin
:
localStorage
.
getItem
(
"
isLogin
"
)
||
"
0
"
,
// 只有1为已登录
};
...
...
src/views/index/camp/Index.vue
View file @
24aa37f5
...
...
@@ -49,7 +49,7 @@ export default {
},
data
()
{
return
{
isPosition
:
0
,
// 左侧box是否浮动
pageYOffset
:
0
,
// 左侧box浮动时,滚动的高度
scorllHeight
:
0
,
// 最大滚动高度
...
...
@@ -103,13 +103,14 @@ export default {
this
.
ToSignUp
();
},
ToSignUp
(
index
)
{
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
campindex_type
=
index
;
if
(
this
.
campindex_type
==
0
)
{
this
.
$router
.
push
(
"
/signUp/
"
+
this
.
index_status
);
this
.
$router
.
push
(
"
/signUp/
"
+
this
.
index_status
+
"
?code=
"
+
code
);
}
else
if
(
this
.
campindex_type
==
1
)
{
this
.
$router
.
push
(
"
/homework
"
);
this
.
$router
.
push
(
"
/homework
?code=
"
+
code
);
}
else
if
(
this
.
campindex_type
==
2
)
{
this
.
$router
.
push
(
"
/certificate
"
);
this
.
$router
.
push
(
"
/certificate
?code=
"
+
code
);
}
},
onResize
()
{
...
...
src/views/index/login/Index.vue
View file @
24aa37f5
<
template
>
<div
class=
"login-index"
>
<div
class=
"big-img"
>
<div
class=
"big-img"
@
click=
"toHome"
>
<img
:src=
"bigImg"
/>
</div>
<div
class=
"big-right"
>
...
...
@@ -27,6 +27,12 @@ export default {
this
.
$emit
(
"
getStatus
"
,
false
);
},
methods
:
{
toHome
()
{
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/
"
+
code
);
}
},
};
</
script
>
...
...
src/views/index/login/Login.vue
View file @
24aa37f5
...
...
@@ -134,12 +134,14 @@ export default {
methods
:
{
// 忘记账号/密码
forgetPwd
()
{
this
.
$router
.
replace
({
name
:
"
index-reset
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/reset?code=
"
+
code
);
},
// 去注册
register
()
{
this
.
$router
.
replace
({
name
:
"
index-register
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/register?code=
"
+
code
);
},
// 改变密码显示状态
changePwdStatus
()
{
...
...
@@ -169,8 +171,8 @@ export default {
res
.
data
.
cam
.
system_color
);
// 跳转到报名
this
.
$router
.
push
({
path
:
"
/signUp/examInfo
"
}
);
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/signUp/examInfo?code=
"
+
code
);
});
});
},
...
...
src/views/index/login/Register.vue
View file @
24aa37f5
...
...
@@ -188,7 +188,8 @@ export default {
methods
:
{
// 去注册
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/login?code=
"
+
code
);
},
// 改变密码显示状态
changePwdStatus
()
{
...
...
@@ -204,7 +205,7 @@ export default {
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
timeLag
)
{
this
.
count
--
;
}
else
{
this
.
show
=
true
;
...
...
@@ -269,7 +270,9 @@ export default {
);
// 跳转到报名
this
.
$router
.
push
({
path
:
"
/signUp/examInfo
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/signUp/examInfo?code=
"
+
code
);
});
});
},
...
...
src/views/index/login/Reset.vue
View file @
24aa37f5
...
...
@@ -189,7 +189,8 @@ export default {
methods
:
{
// 去注册
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/login?code=
"
+
code
);
},
// 改变密码显示状态
changePwdStatus
()
{
...
...
@@ -259,7 +260,8 @@ export default {
this
.
$message
.
success
(
res
.
data
.
message
);
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$router
.
replace
({
name
:
"
index-login
"
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/login?code=
"
+
code
);
});
});
},
...
...
src/views/index/recruit/Index.vue
View file @
24aa37f5
...
...
@@ -48,7 +48,6 @@
/* eslint-disable */
import
Header
from
"
@/components/index/Header.vue
"
;
import
Footer
from
"
@/components/index/Footer.vue
"
;
import
{
getCam
}
from
"
r/index/login
"
;
export
default
{
name
:
"
recruit
"
,
...
...
@@ -58,28 +57,12 @@ export default {
};
},
created
()
{
this
.
getCams
();
},
mounted
()
{
// 只刷新一次
if
(
location
.
href
.
indexOf
(
"
#reloaded
"
)
==
-
1
)
{
location
.
href
=
location
.
href
+
"
#reloaded
"
;
location
.
reload
();
}
this
.
info
=
this
.
$store
.
state
.
info
;
},
methods
:
{
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
},
getCams
()
{
getCam
(
false
).
then
((
res
)
=>
{
// console.log(res, "res");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
info
=
res
.
data
;
});
let
code
=
localStorage
.
getItem
(
"
index-identity
"
);
this
.
$router
.
push
(
"
/login?code=
"
+
code
);
},
},
components
:
{
...
...
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