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
61ae9d3c
Commit
61ae9d3c
authored
Nov 02, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
b6573691
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
316 additions
and
177 deletions
+316
-177
src/common/validator.js
src/common/validator.js
+3
-2
src/components/breadcrumb.vue
src/components/breadcrumb.vue
+2
-2
src/components/index/Footer.vue
src/components/index/Footer.vue
+1
-0
src/components/index/SignUp/ConfirmSignUp.vue
src/components/index/SignUp/ConfirmSignUp.vue
+7
-7
src/components/index/SignUp/Header.vue
src/components/index/SignUp/Header.vue
+14
-14
src/components/index/SignUp/confirm.vue
src/components/index/SignUp/confirm.vue
+20
-9
src/components/index/SignUp/invitation.vue
src/components/index/SignUp/invitation.vue
+1
-1
src/components/index/SignUp/pass.vue
src/components/index/SignUp/pass.vue
+9
-4
src/components/index/SignUp/paying.vue
src/components/index/SignUp/paying.vue
+1
-1
src/components/index/SignUp/referInfo.vue
src/components/index/SignUp/referInfo.vue
+199
-92
src/request/index/network.js
src/request/index/network.js
+20
-16
src/router/index.js
src/router/index.js
+6
-1
src/views/index/camp/Index.vue
src/views/index/camp/Index.vue
+2
-2
src/views/index/camp/SignUp.vue
src/views/index/camp/SignUp.vue
+19
-14
src/views/index/login/Index.vue
src/views/index/login/Index.vue
+11
-11
src/views/index/recruit/Index.vue
src/views/index/recruit/Index.vue
+1
-1
No files found.
src/common/validator.js
View file @
61ae9d3c
...
...
@@ -29,7 +29,7 @@ export default {
return
callback
(
new
Error
(
"
身份证号不能为空
"
));
}
if
(
!
/
(
^
\d{15}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
.
test
(
value
))
{
callback
(
new
Error
(
"
你输入的身份证长度或格式错误
"
));
return
callback
(
new
Error
(
"
你输入的身份证长度或格式错误
"
));
}
//身份证城市
var
aCity
=
{
...
...
@@ -70,8 +70,9 @@ export default {
91
:
"
国外
"
};
if
(
!
aCity
[
parseInt
(
value
.
substr
(
0
,
2
))])
{
callback
(
new
Error
(
"
你的身份证地区非法
"
));
return
callback
(
new
Error
(
"
你的身份证地区非法
"
));
}
return
callback
();
},
// 数字验证
validateNumber
:
function
(
rule
,
value
,
callback
)
{
...
...
src/components/breadcrumb.vue
View file @
61ae9d3c
...
...
@@ -65,7 +65,7 @@ export default {
},
];
let
arr
=
[];
console
.
log
(
newArr
,
"
newArr
"
);
//
console.log(newArr, "newArr");
for
(
let
i
=
0
;
i
<
newArr
.
length
;
i
++
)
{
const
item
=
newArr
[
i
];
if
(
...
...
@@ -81,7 +81,7 @@ export default {
},
watch
:
{
statusNum
(
val
)
{
console
.
log
(
val
,
"
statusNum
"
);
//
console.log(val, "statusNum");
this
.
status
=
val
;
},
},
...
...
src/components/index/Footer.vue
View file @
61ae9d3c
...
...
@@ -34,6 +34,7 @@
</
template
>
<
script
>
/* eslint-disable */
export
default
{
name
:
"
Footer
"
,
};
...
...
src/components/index/SignUp/ConfirmSignUp.vue
View file @
61ae9d3c
...
...
@@ -64,12 +64,12 @@ export default {
},
methods
:
{
async
confirm
()
{
console
.
log
(
SERVER_WS_URL
);
//
console.log(SERVER_WS_URL);
let
{
data
:
res
}
=
await
getWxConfig
({
// exam_uuid: this.examuuid,
pay_type
:
1
,
});
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
==
400801
)
{
return
this
.
cancelBtn
();
...
...
@@ -103,7 +103,7 @@ export default {
if
(
this
.
$refs
.
qrCodeUrl
)
{
// 获取 父 标签下的所有子节点
let
pObjs
=
this
.
$refs
.
qrCodeUrl
.
childNodes
;
console
.
log
(
pObjs
);
//
console.log(pObjs);
for
(
var
i
=
pObjs
.
length
-
1
;
i
>=
0
;
i
--
)
{
// 一定要倒序,正序是删不干净的,可自行尝试
this
.
$refs
.
qrCodeUrl
.
removeChild
(
pObjs
[
i
]);
...
...
@@ -208,7 +208,7 @@ export default {
// 连接成功建立的回调方法
websocketOnopen
()
{
this
.
websocketSend
();
console
.
log
(
"
连接成功建立的回调方法
"
);
//
console.log("连接成功建立的回调方法");
//开启心跳
this
.
start
();
},
...
...
@@ -223,10 +223,10 @@ export default {
},
// 接收到消息的回调方法
websocketOnmessage
(
event
)
{
console
.
log
(
event
,
"
event
"
);
//
console.log(event, "event");
if
(
event
.
data
!==
"
Opened
"
)
{
//const data = JSON.parse(event.data);
console
.
log
(
"
接收到消息的回调方法
"
,
event
.
data
);
//
console.log("接收到消息的回调方法", event.data);
if
(
event
.
data
==
1
)
{
this
.
lockReconnect
=
false
;
...
...
@@ -244,7 +244,7 @@ export default {
},
// 连接关闭的回调方法
websocketOnclose
()
{
console
.
log
(
"
连接关闭的回调方法
"
);
//
console.log("连接关闭的回调方法");
//重连
this
.
reconnect
();
},
...
...
src/components/index/SignUp/Header.vue
View file @
61ae9d3c
...
...
@@ -66,7 +66,7 @@ export default {
window
.
localStorage
.
removeItem
(
"
campsite_id
"
);
window
.
localStorage
.
removeItem
(
"
order_no
"
);
window
.
localStorage
.
removeItem
(
"
campindex_type
"
);
this
.
$store
.
state
.
token
=
""
;
//
this.$store.state.token = "";
// 使用编程式导航跳转到登录页面
this
.
$router
.
push
({
name
:
"
recruit
"
});
},
...
...
@@ -74,20 +74,20 @@ export default {
toRecruit
()
{
// 清除本地缓存除了大学logo
// window.localStorage.clear();
window
.
localStorage
.
removeItem
(
"
doubt_code
"
);
window
.
localStorage
.
removeItem
(
"
doubt_info
"
);
window
.
localStorage
.
removeItem
(
"
doubt_check
"
);
//
window.localStorage.removeItem("doubt_code");
//
window.localStorage.removeItem("doubt_info");
//
window.localStorage.removeItem("doubt_check");
// window.localStorage.removeItem("index-identity");
window
.
localStorage
.
removeItem
(
"
index-token
"
);
window
.
localStorage
.
removeItem
(
"
phone
"
);
window
.
localStorage
.
removeItem
(
"
camp_name
"
);
window
.
localStorage
.
removeItem
(
"
system_color
"
);
window
.
localStorage
.
removeItem
(
"
has_amount
"
);
window
.
localStorage
.
removeItem
(
"
campsite_id
"
);
window
.
localStorage
.
removeItem
(
"
order_no
"
);
window
.
localStorage
.
removeItem
(
"
campindex_type
"
);
this
.
$store
.
state
.
token
=
""
;
this
.
$router
.
push
({
name
:
"
recruit
"
});
//
window.localStorage.removeItem("index-token");
//
window.localStorage.removeItem("phone");
//
window.localStorage.removeItem("camp_name");
//
window.localStorage.removeItem("system_color");
//
window.localStorage.removeItem("has_amount");
//
window.localStorage.removeItem("campsite_id");
//
window.localStorage.removeItem("order_no");
//
window.localStorage.removeItem("campindex_type");
//
this.$store.state.token = "";
this
.
$router
.
replace
({
name
:
"
recruit
"
});
},
},
};
...
...
src/components/index/SignUp/confirm.vue
View file @
61ae9d3c
<
template
>
<!--底部-->
<div
class=
"confirm"
>
<div
class=
"title"
>
2021年南开大学历史学科暑假营报名须知
</div>
<p>
<div
class=
"title"
>
{{
info
.
name
}}
报名须知
</div>
<div
v-html=
"info.exam_instructions"
></div>
<!--
<p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
</p>
<p>
...
...
@@ -14,7 +16,7 @@
</p>
<div>
<img
src=
"../../../assets/img/signUp/computer.png"
alt=
""
/>
</div>
</div>
-->
<div
class=
"check"
>
<el-checkbox
v-model=
"checked"
>
我已阅读并了解《2021年南开大学历史学科暑假营报名须知》
</el-checkbox
...
...
@@ -29,28 +31,38 @@
<
script
>
/* eslint-disable */
import
{
setSignShould
}
from
"
r/index/signUp
"
;
import
{
getCam
}
from
"
r/index/login
"
;
export
default
{
name
:
"
Confirm
"
,
// props: { statusNum: [String, Number] }, //进度参数
data
()
{
return
{
checked
:
false
,
info
:
{},
};
},
created
()
{
this
.
getCams
();
},
methods
:
{
next
()
{
// console.log(this.checked);
setSignShould
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
setSignShould
"
);
//
console.log(res, "setSignShould");
if
(
res
.
data
.
code
!==
200
)
return
this
.
$message
.
error
(
res
.
data
.
message
);
this
.
$emit
(
"
getstatus
"
,
res
.
data
.
status
);
this
.
$emit
(
"
getstatus
"
,
res
.
data
.
status
);
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$router
.
push
(
"
/signUp/invitation
"
);
});
},
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
;
});
},
},
...
...
@@ -83,6 +95,5 @@ export default {
text-align
:
center
;
margin-top
:
42px
;
}
}
</
style
>
src/components/index/SignUp/invitation.vue
View file @
61ae9d3c
...
...
@@ -181,7 +181,7 @@ export default {
},
// 下一步
async
next
()
{
console
.
log
(
111
);
//
console.log(111);
let
code
;
if
(
this
.
invatation1
==
""
&&
...
...
src/components/index/SignUp/pass.vue
View file @
61ae9d3c
...
...
@@ -22,15 +22,20 @@ export default {
name
:
"
Pass
"
,
props
:
{
getExamine
:
[
String
,
Number
],
next
:
""
,
// isNext:''
},
created
()
{
console
.
log
(
this
.
getExamine
);
// console.log(this.getExamine);
},
watch
:{
// is_next(val){
// }
},
methods
:
{
paying
()
{
this
.
nextNum
=
1
;
this
.
$emit
(
'
isNext
'
,
this
.
nextNum
)
this
.
$emit
(
'
is_next
'
,
1
)
// console.log(is_next);
},
},
...
...
src/components/index/SignUp/paying.vue
View file @
61ae9d3c
...
...
@@ -97,7 +97,7 @@ export default {
},
getAccount
()
{
getAccount
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
getAccount
"
);
//
console.log(res, "getAccount");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
src/components/index/SignUp/referInfo.vue
View file @
61ae9d3c
This diff is collapsed.
Click to expand it.
src/request/index/network.js
View file @
61ae9d3c
...
...
@@ -21,7 +21,7 @@ const instance = axios.create({
"
Content-Type
"
:
"
application/x-www-form-urlencoded
"
,
},
withCredentials
:
false
,
});
instance
.
interceptors
.
request
.
use
(
...
...
@@ -30,7 +30,7 @@ instance.interceptors.request.use(
config
.
data
=
qs
.
stringify
(
config
.
data
);
}
if
(
config
.
url
.
indexOf
(
SERVER_URL
)
===
-
1
)
{
console
.
log
(
"
upload
"
);
//
console.log("upload");
config
.
headers
[
"
Content-Type
"
]
=
"
multipart/form-data
"
;
}
else
{
config
.
headers
[
"
Content-Type
"
]
=
"
application/x-www-form-urlencoded
"
;
...
...
@@ -110,7 +110,8 @@ export function request(config) {
const
passwordCode
=
'
/web/code/passwordCode
'
;
const
changePassCode
=
'
/web/auth/changePassCode
'
;
const
loginOut
=
'
/web/auth/loginOut
'
;
console
.
log
(
config
)
// console.log(config)
if
(
config
.
url
.
indexOf
(
loginUrl
)
!=
-
1
||
config
.
url
.
indexOf
(
setAccountInfo
)
!=
-
1
||
...
...
@@ -118,7 +119,7 @@ export function request(config) {
config
.
url
.
indexOf
(
getCam
)
!=
-
1
||
config
.
url
.
indexOf
(
registerCode
)
!=
-
1
||
config
.
url
.
indexOf
(
changePassCode
)
!=
-
1
||
config
.
url
.
indexOf
(
passwordCode
)
!=
-
1
||
config
.
url
.
indexOf
(
passwordCode
)
!=
-
1
||
config
.
url
.
indexOf
(
loginOut
)
!=
-
1
)
{
return
config
...
...
@@ -176,6 +177,7 @@ export function request(config) {
instance
.
interceptors
.
response
.
use
(
(
res
)
=>
{
// console.log(res)
if
(
res
.
data
.
code
==
400003
)
{
window
.
localStorage
.
clear
()
router
.
push
({
...
...
@@ -201,19 +203,21 @@ export function request(config) {
return
res
},
(
error
)
=>
{
// console.log(error.response.status)
Message
.
closeAll
()
// if (error.response.status === 401) {
// // 未登录
// Notification({
// message: "身份验证失败,请登录",
// duration: 1500,
// onClose() {
// console.log('error');
// router.push("/admin/login");
// },
// });
// return false;
// }
if
(
error
.
response
.
status
===
404
)
{
// return this.$message.error("营地报名已结束")
// 未登录
Notification
({
message
:
"
营地报名已关闭
"
,
duration
:
2000
,
// onClose() {
// console.log('error');
// router.push("/admin/login");
// },
});
return
false
;
}
if
(
axios
.
isCancel
(
error
))
{
console
.
log
(
error
.
message
)
}
else
{
...
...
src/router/index.js
View file @
61ae9d3c
...
...
@@ -113,7 +113,8 @@ router.beforeEach((to, from, next) => {
toLogin
=
"
/login
"
,
toRegister
=
"
/register
"
,
toReset
=
"
/reset
"
// toRrecruit = "/recruit"
// toRecruit = "/:code"
let
token
=
localStorage
.
getItem
(
tokenKey
);
let
nextUrl
=
false
;
let
code
=
false
;
...
...
@@ -127,6 +128,8 @@ router.beforeEach((to, from, next) => {
});
}
else
if
(
to
.
name
==
"
recruit
"
)
{
code
=
to
.
params
.
code
;
console
.
log
(
code
,
'
code
'
)
to
.
path
==
"
/:code
"
checkCam
(
code
,
(
res
)
=>
{
if
(
res
)
{
nextUrl
=
false
;
...
...
@@ -145,6 +148,8 @@ router.beforeEach((to, from, next) => {
// 页面跳转之后页面回滚到顶部
router
.
afterEach
((
to
,
from
,
next
)
=>
{
// console.log(to,'to')
window
.
scrollTo
(
0
,
0
)
});
export
default
router
src/views/index/camp/Index.vue
View file @
61ae9d3c
...
...
@@ -49,7 +49,7 @@ export default {
},
data
()
{
return
{
type
:
1
,
isPosition
:
0
,
// 左侧box是否浮动
pageYOffset
:
0
,
// 左侧box浮动时,滚动的高度
scorllHeight
:
0
,
// 最大滚动高度
...
...
@@ -98,7 +98,7 @@ export default {
},
methods
:
{
getStatus
(
val
)
{
console
.
log
(
val
,
"
index_type
"
);
//
console.log(val, "index_type");
this
.
index_status
=
val
;
this
.
ToSignUp
();
},
...
...
src/views/index/camp/SignUp.vue
View file @
61ae9d3c
...
...
@@ -14,8 +14,7 @@
<ReferInfo
v-else-if=
"type == 'referInfo'"
@
getstatus=
"statuss"
></ReferInfo>
<Pass
v-else-if=
"type == 'check'"
@
getstatus=
"statuss"
@
isNext=
"isNext"
@
is_next=
"is_nextevent"
:getExamine=
"getExamine"
></Pass>
<Paying
v-else-if=
"type == 'pay'"
@
getstatus=
"statuss"
></Paying>
...
...
@@ -54,14 +53,13 @@ export default {
doubt_check
:
window
.
localStorage
.
getItem
(
"
doubt_check
"
),
status_val
:
""
,
getExamine
:
""
,
isNext
:
""
,
isNext
s
:
""
,
};
},
created
()
{
this
.
type
=
this
.
$route
.
params
.
type
;
// console.log(this.$route, "router");
this
.
statuss
();
// this.signUpInit();
},
watch
:
{
...
...
@@ -78,12 +76,14 @@ export default {
status
(
val
)
{
// console.log(val, "status");
},
isNext
(
val
)
{
this
.
isNext
=
val
;
console
.
log
(
val
,
"
isNext
"
);
},
},
methods
:
{
is_nextevent
(
val
)
{
this
.
isNexts
=
val
;
console
.
log
(
val
,
"
isNexts
"
);
// this.signUpInit( this.isNexts );
this
.
signUpInit
(
this
.
status_val
);
},
// 点击下一步,触发父组件方法
statuss
(
val
)
{
// console.log(val, "statuss");
...
...
@@ -93,9 +93,11 @@ export default {
},
// status=4,跳到审核页面;status=3时,根据doubt_check做判断
signUpInit
(
status_val
)
{
console
.
log
(
status_val
,
"
11111
"
);
// console.log(status_val, "11111");
// console.log(isNexts, "2222");
signUpInit
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
signUpInit
"
);
//
console.log(res, "signUpInit");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
@@ -106,7 +108,7 @@ export default {
this
.
status
=
status_val
;
}
else
{
this
.
status
=
res
.
data
.
status
;
console
.
log
(
this
.
status
,
"
11111
"
);
//
console.log(this.status, "11111");
}
// doubt_code,doubt_info,doubt_check。0为不填写,1为填写
if
(
this
.
status
==
0
)
{
...
...
@@ -121,7 +123,7 @@ export default {
this
.
status
=
1
;
}
}
else
if
(
this
.
status
==
2
)
{
console
.
log
(
this
.
doubt_info
,
"
doubt_info
"
);
//
console.log(this.doubt_info, "doubt_info");
// 是否填写个人资料
if
(
this
.
doubt_info
==
0
)
{
this
.
type
=
"
check
"
;
...
...
@@ -142,8 +144,11 @@ export default {
}
else
if
(
this
.
status
==
4
)
{
this
.
type
=
"
check
"
;
this
.
status
=
3
;
console
.
log
(
this
.
status
,
"
this.status
"
);
// console.log(this.isNexts ,'this.isNexts ')
if
(
this
.
isNext
!=
null
)
{
if
(
this
.
isNexts
==
1
)
{
// console.log(11111);
if
(
res
.
data
.
examine_status
==
1
)
{
console
.
log
(
333
);
this
.
type
=
"
pay
"
;
...
...
@@ -161,7 +166,7 @@ export default {
}
this
.
$emit
(
"
getStatus
"
,
this
.
type
);
this
.
getExamine
=
res
.
data
.
examine_status
;
console
.
log
(
res
.
data
.
examine_status
,
"
res.data.examine_status
"
);
//
console.log(res.data.examine_status, "res.data.examine_status");
//审核报名资料状态
//订单支付金额
...
...
src/views/index/login/Index.vue
View file @
61ae9d3c
...
...
@@ -11,18 +11,17 @@
</div>
</
template
>
<
script
>
/* eslint-disable */
export
default
{
name
:
"
loginIndex
"
,
data
()
{
return
{
bigImg
:
window
.
localStorage
.
getItem
(
'
bk_pic
'
)
bigImg
:
window
.
localStorage
.
getItem
(
"
bk_pic
"
),
};
},
created
()
{
let
bk_pic
=
window
.
localStorage
.
getItem
(
'
bk_pic
'
);
if
(
bk_pic
)
{
let
bk_pic
=
window
.
localStorage
.
getItem
(
"
bk_pic
"
);
if
(
bk_pic
)
{
this
.
bigImg
=
bk_pic
;
}
...
...
@@ -38,19 +37,20 @@ export default {
background
:
#f8f8f8
;
display
:
flex
;
flex-flow
:
row
;
.big-img
{
width
:
(
500
/
1920
*
100%
);
min-height
:
100%
;
.big-img
{
width
:
(
500
/
1920
*
100%
);
min-width
:
350px
;
/*height: 100%;*/
img
{
min-height
:
100%
;
img
{
width
:
100%
;
/*height: 100%;*/
min-height
:
100%
;
}
}
.big-right
{
.big-right
{
flex
:
1
;
position
:
relative
;
.info-box
{
.info-box
{
width
:
520px
;
height
:
auto
;
position
:
absolute
;
...
...
src/views/index/recruit/Index.vue
View file @
61ae9d3c
...
...
@@ -73,7 +73,7 @@ export default {
},
getCams
()
{
getCam
(
false
).
then
((
res
)
=>
{
console
.
log
(
res
,
"
res
"
);
//
console.log(res, "res");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
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