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
b3b4562d
Commit
b3b4562d
authored
Oct 18, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
97d2bb9c
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
186 additions
and
245 deletions
+186
-245
src/components/breadcrumb.vue
src/components/breadcrumb.vue
+12
-12
src/components/index/SignUp/ConfirmSignUp.vue
src/components/index/SignUp/ConfirmSignUp.vue
+1
-1
src/components/index/SignUp/Header.vue
src/components/index/SignUp/Header.vue
+10
-9
src/components/index/SignUp/paying.vue
src/components/index/SignUp/paying.vue
+29
-7
src/components/index/SignUp/referInfo.vue
src/components/index/SignUp/referInfo.vue
+49
-33
src/request/index/network.js
src/request/index/network.js
+38
-28
src/request/index/pay.js
src/request/index/pay.js
+1
-1
src/request/index/signUp.js
src/request/index/signUp.js
+9
-0
src/views/index/camp/SignUp.vue
src/views/index/camp/SignUp.vue
+21
-10
src/views/index/login/Index.vue
src/views/index/login/Index.vue
+12
-127
src/views/index/login/Login.vue
src/views/index/login/Login.vue
+4
-17
No files found.
src/components/breadcrumb.vue
View file @
b3b4562d
...
...
@@ -2,11 +2,11 @@
<div
class=
"steps flex"
>
<!-- 1 -->
<div
class=
"step flex"
>
<div
:class=
"'cricle' + ' ' + (status >=
0
? 'speed-bg-color' : '')"
>
<div
:class=
"'cricle' + ' ' + (status >=
1
? 'speed-bg-color' : '')"
>
<span
class=
"num"
>
1
</span>
</div>
<div
:class=
"'step_title' + ' ' + (status >=
0
? 'speed-text-color' : '')"
:class=
"'step_title' + ' ' + (status >=
1
? 'speed-text-color' : '')"
>
确认报名须知
</div>
...
...
@@ -18,12 +18,12 @@
<div
class=
"step flex"
>
<div
class=
"cricle cc"
:class=
"'cricle' + ' ' + (status >=
1
? 'speed-bg-color' : '')"
:class=
"'cricle' + ' ' + (status >=
2
? 'speed-bg-color' : '')"
>
<span
class=
"num"
>
2
</span>
</div>
<div
:class=
"'step_title' + ' ' + (status >=
1
? 'speed-text-color' : '')"
:class=
"'step_title' + ' ' + (status >=
2
? 'speed-text-color' : '')"
>
填写邀请码
</div>
...
...
@@ -33,12 +33,12 @@
<div
class=
"step flex"
>
<div
class=
"cricle cc"
:class=
"'cricle' + ' ' + (status >=
2
? 'speed-bg-color' : '')"
:class=
"'cricle' + ' ' + (status >=
3
? 'speed-bg-color' : '')"
>
<span
class=
"num"
>
3
</span>
</div>
<div
:class=
"'step_title' + ' ' + (status >=
2
? 'speed-text-color' : '')"
:class=
"'step_title' + ' ' + (status >=
3
? 'speed-text-color' : '')"
>
填写报名资料
</div>
...
...
@@ -48,12 +48,12 @@
<div
class=
"step flex"
>
<div
class=
"cricle cc"
:class=
"'cricle' + ' ' + (status >=
3
? 'speed-bg-color' : '')"
:class=
"'cricle' + ' ' + (status >=
4
? 'speed-bg-color' : '')"
>
<span
class=
"num"
>
4
</span>
</div>
<div
:class=
"'step_title' + ' ' + (status >=
3
? 'speed-text-color' : '')"
:class=
"'step_title' + ' ' + (status >=
4
? 'speed-text-color' : '')"
>
报名资料审核
</div>
...
...
@@ -63,12 +63,12 @@
<div
class=
"step flex"
>
<div
class=
"cricle cc"
:class=
"'cricle' + ' ' + (status >=
4
? 'speed-bg-color' : '')"
:class=
"'cricle' + ' ' + (status >=
5
? 'speed-bg-color' : '')"
>
<span
class=
"num"
>
5
</span>
</div>
<div
:class=
"'step_title' + ' ' + (status >=
4
? 'speed-text-color' : '')"
:class=
"'step_title' + ' ' + (status >=
5
? 'speed-text-color' : '')"
>
缴费
</div>
...
...
@@ -80,7 +80,7 @@
/* eslint-disable */
export
default
{
name
:
"
breadcrumb
"
,
props
:
{
statusNum
:
[
String
,
Number
]
},
//进度参数
props
:
{
statusNum
:
[
String
,
Number
]
},
//进度参数
data
()
{
return
{
status
:
this
.
statusNum
,
...
...
@@ -109,6 +109,7 @@ export default {
}
.steps
{
.step
{
align-items
:
center
;
}
.num
{
color
:
#ffff
;
...
...
@@ -135,7 +136,6 @@ export default {
height
:
20px
;
font-weight
:
600
;
color
:
#d0ced0
;
line-height
:
34px
;
}
}
</
style
>
\ No newline at end of file
src/components/index/SignUp/ConfirmSignUp.vue
View file @
b3b4562d
...
...
@@ -34,7 +34,7 @@
<
script
>
/* eslint-disable */
import
{
getWxConfig
}
from
"
r/index/pay
.js
"
;
import
{
getWxConfig
}
from
"
r/index/pay
"
;
import
{
SERVER_WS_URL
}
from
"
config/server
"
;
import
QRCode
from
"
qrcodejs2
"
;
export
default
{
...
...
src/components/index/SignUp/Header.vue
View file @
b3b4562d
...
...
@@ -7,11 +7,16 @@
</div>
<div
class=
"right"
>
<el-dropdown
@
command=
"handleCommand"
>
<span
class=
"el-dropdown-link"
>
<div
class=
"el-dropdown-link flex"
>
<div>
<img
src=
"@/assets/img/default.svg"
class=
"img_user"
/>
</div>
<div
style=
"line-height: 64px"
>
<span
class=
"phone"
>
{{
phone
}}
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"1"
>
退出
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -72,10 +77,6 @@ export default {
.cc
{
width
:
100%
;
justify-content
:
space-around
;
align-items
:
center
;
div
{
flex-direction
:
column
;
}
}
}
...
...
src/components/index/SignUp/paying.vue
View file @
b3b4562d
...
...
@@ -3,15 +3,17 @@
<div>
<span
class=
"pay_titile"
>
报名信息
</span>
<div
class=
"pay_top"
>
<div>
营地名称:
2021年南开大学历史学科暑假营
</div>
<div>
真实姓名:
林柒月
</div>
<div>
身份证号:
340828199612053920
</div>
<div>
缴费时间:
2021-8-19 10:00 - 2021-8-31 24:00
</div>
<div>
报名费用:
1500
元
</div>
<div>
营地名称:
{{
camp_name
}}
</div>
<div>
真实姓名:
{{
personalInfo
.
name
}}
</div>
<div>
身份证号:
{{
personalInfo
.
id_card
}}
</div>
<div>
缴费时间:
{{
personalInfo
.
create_time
}}
</div>
<div>
报名费用:
{{
has_amount
}}
元
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"pay-money flex"
>
<div>
报名费用 :
<span>
¥1500
</span></div>
<div>
报名费用 :
<span>
¥
{{
has_amount
}}
</span>
</div>
<div
class=
"btn"
>
<el-button
@
click=
"paying()"
>
立即支付
</el-button>
</div>
...
...
@@ -62,6 +64,7 @@
<
script
>
/* eslint-disable */
import
ConfirmSignUp
from
"
c/index/SignUp/ConfirmSignUp
"
;
import
{
getAccount
}
from
"
r/index/signUp
"
;
export
default
{
name
:
"
Paying
"
,
components
:
{
...
...
@@ -70,8 +73,16 @@ export default {
data
()
{
return
{
confirmSignUpDialogFu
:
false
,
// 控制确认报名弹框的显示与隐藏
personalInfo
:
{},
camp_name
:
""
,
//营地名称
has_amount
:
""
,
//支付金额
};
},
created
()
{
this
.
camp_name
=
window
.
localStorage
.
getItem
(
"
camp_name
"
);
this
.
has_amount
=
window
.
localStorage
.
getItem
(
"
has_amount
"
);
this
.
getAccount
();
},
methods
:
{
// 子组件触发,关闭确认报名弹框
closeCFSUDialog
(
val
,
type
)
{
...
...
@@ -80,7 +91,18 @@ export default {
clearInterval
(
this
.
timer
);
}
},
paying
()
{},
paying
()
{
this
.
confirmSignUpDialogFu
=
true
;
},
getAccount
()
{
getAccount
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
getAccount
"
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
personalInfo
=
res
.
data
.
info
;
});
},
},
};
</
script
>
...
...
src/components/index/SignUp/referInfo.vue
View file @
b3b4562d
...
...
@@ -262,8 +262,7 @@
:disabled=
"isUploading"
action=
"#"
accept=
".jpg,.jpeg,.png"
:limit=
"1"
:headers=
"header"
:limit=
"10"
:file-list=
"fileList"
:before-upload=
"beforeAvatarUpload"
:on-progress=
"handleUploadProgress"
...
...
@@ -272,16 +271,17 @@
>
<i
style=
"font-size: 44px"
class=
"el-icon-circle-plus"
>
</i>
<!--
<div
class=
"text"
>
上传材料
</div>
-->
<div
slot=
"file"
slot-scope=
"
{ file }">
<!--
<div
slot=
"file"
slot-scope=
"
{ file }" v-for="(item,idx) in fileList" :key="idx"> -->
<div
v-for=
"(item,idx) in fileList"
:key=
"idx"
>
<img
class=
"el-upload-list__item-thumbnail"
:src=
"
file
.url"
:src=
"
item
.url"
alt=
""
/>
<span
class=
"el-upload-list__item-actions"
>
<span
class=
"el-upload-list__item-preview"
@
click=
"handlePictureCardPreview(
file
)"
@
click=
"handlePictureCardPreview(
item
)"
>
<i
class=
"el-icon-zoom-in"
></i>
</span>
...
...
@@ -291,14 +291,14 @@
@
click=
"handleDownload(file)"
>
<i
class=
"el-icon-download"
></i>
</span>
</span>
-->
<span
v-if=
"!disabled"
class=
"el-upload-list__item-delete"
@
click=
"handleRemove(
file
)"
@
click=
"handleRemove(
item
)"
>
<i
class=
"el-icon-delete"
></i>
</span>
-->
</span>
</span>
</div>
</el-upload>
...
...
@@ -322,6 +322,7 @@
import
{
getAccount
,
getAchievementOss
,
delPic
,
setAccount
,
getProAndCity
,
getSchool
,
...
...
@@ -369,7 +370,7 @@ export default {
school
:
""
,
school_contacts
:
""
,
school_phone
:
""
,
achievement
P
ath
:
""
,
achievement
_p
ath
:
""
,
},
schoolName
:
[],
referInfoRules
:
{
...
...
@@ -495,13 +496,7 @@ export default {
],
bdYear
:
""
,
//选择的生日年份
bdMonth
:
""
,
//选择的生日月份
bdDay
:
""
,
//选择的生日日期
// 图片上传接口
imgUrlAction
:
process
.
env
.
VUE_APP_BASE_API
+
"
getAchievementOss
"
,
headers
:
{
Authorization
:
"
Bearer
"
+
getToken
(),
},
bdDay
:
""
,
//选择的生日日期F
// 上传的图片
dialogImageUrl
:
""
,
dialogVisible
:
false
,
...
...
@@ -513,6 +508,11 @@ export default {
};
},
created
()
{
let
signUpFile
=
window
.
localStorage
.
getItem
(
'
sign_up_file_
'
+
window
.
localStorage
.
getItem
(
'
phone
'
));
console
.
log
(
JSON
.
parse
(
signUpFile
))
if
(
signUpFile
&&
JSON
.
parse
(
signUpFile
).
length
>
0
){
this
.
fileList
=
JSON
.
parse
(
signUpFile
);
}
this
.
getAccount
();
this
.
getProAndCity
();
this
.
getSchool
();
...
...
@@ -548,9 +548,9 @@ export default {
val
.
jiguan_code
!==
"
00
"
)
{
//籍贯
console
.
log
(
val
.
jiguan_code
,
"
val.jiguan_code+++++
"
);
//
console.log(val.jiguan_code, "val.jiguan_code+++++");
this
.
jgProvinceCode
=
Number
(
val
.
jiguan_code
.
slice
(
0
,
2
));
//前2位取省份
console
.
log
(
this
.
jgProvinceCode
,
"
val.jiguan_code+++++
"
);
//
console.log(this.jgProvinceCode, "val.jiguan_code+++++");
this
.
selectJgProvince
(
this
.
jgProvinceCode
,
"
1
"
);
this
.
jgCityCode
=
Number
(
val
.
jiguan_code
.
slice
(
2
,
6
));
//后4位取城市
console
.
log
(
this
.
jgCityCode
,
"
val.jiguan_code+++++
"
);
...
...
@@ -562,14 +562,14 @@ export default {
getTenYear
()
{
let
nowDate
=
new
Date
();
let
currentYear
=
nowDate
.
getFullYear
();
console
.
log
(
nowDate
,
currentYear
);
//
console.log(nowDate, currentYear);
let
yearArr
=
[];
let
rxYearArr
=
[];
for
(
let
i
=
0
;
i
<
22
;
i
++
)
{
let
year
=
currentYear
-
i
;
yearArr
.
push
(
year
);
}
console
.
log
(
yearArr
,
"
yearArr
"
);
//
console.log(yearArr, "yearArr");
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
let
year
=
currentYear
-
i
;
rxYearArr
.
push
(
year
);
...
...
@@ -580,7 +580,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
);
}
...
...
@@ -601,7 +601,7 @@ export default {
// 获取省份城市
getProAndCity
()
{
getProAndCity
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
getProAndCity
"
);
//
console.log(res, "getProAndCity");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
@@ -610,7 +610,7 @@ export default {
});
},
changeProvince
(
type
,
value
)
{
console
.
log
(
value
,
"
value
"
);
//
console.log(value, "value");
let
selectCity
=
[];
for
(
const
key
in
this
.
CityName
)
{
if
(
this
.
CityName
[
key
].
parent_id
==
value
)
{
...
...
@@ -627,7 +627,7 @@ export default {
// 获取学校
getSchool
()
{
getSchool
({}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
getSchool
"
);
//
console.log(res, "getSchool");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
@@ -662,7 +662,7 @@ export default {
this
.
isUploading
=
true
;
},
uploadSuccess
(
res
,
file
)
{
console
.
log
(
res
,
"
111
"
);
//
console.log(res, "111");
this
.
referForm
.
achievementPath
=
res
;
this
.
fileList
[
0
]
=
{
name
:
file
.
name
,
...
...
@@ -671,7 +671,7 @@ export default {
this
.
$refs
[
"
imgUrl
"
].
clearFiles
();
//上传成功之后清除历史记录
},
uploadPicture
(
params
)
{
console
.
log
(
"
已经准备好上传图片
"
,
params
);
//
console.log("已经准备好上传图片", params);
this
.
file
=
params
.
file
;
let
raw
=
params
.
file
;
let
image
=
{
...
...
@@ -682,12 +682,17 @@ export default {
this
.
getOssConfigs
(
image
,
params
.
file
);
},
async
getOssConfigs
(
image
,
file
)
{
let
obj
=
{
url
:
''
,
savefile
:
''
}
await
getAchievementOss
({
image
:
image
})
.
then
((
res
)
=>
{
console
.
log
(
res
,
"
开始上传图片
"
);
if
(
res
.
data
.
code
===
200
)
{
let
oss_url
=
res
.
data
.
config
.
host
;
let
filename
=
res
.
data
.
config
.
file
;
let
formData
=
new
FormData
();
formData
.
append
(
"
OSSAccessKeyId
"
,
res
.
data
.
config
.
accessid
);
formData
.
append
(
"
policy
"
,
res
.
data
.
config
.
policy
);
...
...
@@ -697,16 +702,22 @@ export default {
formData
.
append
(
"
callback
"
,
res
.
data
.
config
.
callback
);
formData
.
append
(
"
success_action_status
"
,
200
);
formData
.
append
(
"
file
"
,
file
);
console
.
log
(
"
已经上传上
"
);
// console.log(formData);
upload
(
oss_url
,
formData
)
.
then
((
ress
)
=>
{
// console.log(ress);
if
(
ress
.
data
.
code
==
200
)
{
console
.
log
(
ress
,
"
上传
照
返回数据
"
);
console
.
log
(
ress
,
"
上传返回数据
"
);
this
.
resultPicture
=
filename
+
"
?t=
"
+
Date
.
parse
(
new
Date
());
this
.
$forceUpdate
();
this
.
$message
.
success
(
"
上传成功
"
);
obj
=
{
url
:
ress
.
data
.
picture_path
,
savefile
:
res
.
data
.
config
.
savefile
}
this
.
fileList
.
push
(
obj
);
window
.
localStorage
.
setItem
(
'
sign_up_file_
'
+
window
.
localStorage
.
getItem
(
'
phone
'
),
JSON
.
stringify
(
this
.
fileList
));
}
else
{
this
.
$message
.
error
(
ress
.
data
.
message
);
}
...
...
@@ -727,20 +738,25 @@ export default {
this
.
resultPicture
=
this
.
addBanner
.
bannerUrl
;
this
.
dialogVisible
=
true
;
},
//删除图片
handleRemove
(
file
)
{
// console.log(file);
// let odject=savefile
// delPic({object:odject}).then((res)=>{
// })
},
confirm
()
{
console
.
log
(
1111
);
// console.log(2222)
// this.$refs["referRef"].validate((valid) => {
// console.log(2222)
// if (!valid) return;
setAccount
(
this
.
referForm
).
then
((
res
)
=>
{
console
.
log
(
res
,
"
setAccount
"
);
//
console.log(res, "setAccount");
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
$message
.
success
(
"
提交审核成功
"
);
// 跳转到报名
this
.
$router
.
push
(
"
/signUp/check
"
);
});
...
...
src/request/index/network.js
View file @
b3b4562d
...
...
@@ -20,11 +20,13 @@ const instance = axios.create({
headers
:
{
"
Content-Type
"
:
"
application/x-www-form-urlencoded
"
,
},
withCredentials
:
false
,
});
instance
.
interceptors
.
request
.
use
(
(
config
)
=>
{
console
.
log
(
config
);
console
.
log
(
config
,
'
111
'
);
if
(
config
.
method
===
"
post
"
&&
!
config
.
notQs
)
{
config
.
data
=
qs
.
stringify
(
config
.
data
);
}
...
...
@@ -35,7 +37,11 @@ instance.interceptors.request.use(
config
.
headers
[
"
Content-Type
"
]
=
"
application/x-www-form-urlencoded
"
;
}
// 调用接口请求添加token认证信息
let
token
=
localStorage
.
getItem
(
"
index-token
"
);
// let token = localStorage.getItem("index-token");
const
token
=
localStorage
.
getItem
(
'
index-token
'
)
//
config
.
headers
.
token
=
token
if
(
token
)
config
.
headers
.
authorization
=
token
;
return
config
;
},
...
...
@@ -43,14 +49,14 @@ instance.interceptors.request.use(
return
Promise
.
reject
(
error
);
}
);
instance
.
interceptors
.
response
.
use
(
(
response
)
=>
{
return
response
.
data
;
},
(
error
)
=>
{
return
Promise
.
reject
(
error
);
}
);
//
instance.interceptors.response.use(
//
(response) => {
//
return response.data;
//
},
//
(error) => {
//
return Promise.reject(error);
//
}
//
);
export
default
instance
;
...
...
@@ -224,24 +230,28 @@ export function request(config) {
return
instance
(
config
)
}
/**
/**
* axios:upload 文件上传方法
* @param url
* @param data
* @returns {Promise}
*/
export
function
upload
(
url
,
data
=
{})
{
export
function
upload
(
url
,
data
=
{})
{
// console.log(11111)
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
post
(
url
,
data
).
then
(
(
response
)
=>
{
console
.
log
(
url
)
// console.log(11111)
resolve
(
response
);
},
(
err
)
=>
{
console
.
log
(
11111
)
reject
(
err
);
}
);
});
}
}
// 合并多个请求
export
function
allRequest
(
arrRequest
)
{
return
axios
.
all
(
arrRequest
)
...
...
src/request/index/pay.js
View file @
b3b4562d
...
...
@@ -8,7 +8,7 @@ const identity = localStorage.getItem('index-identity')
export
function
getWxConfig
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
pos
t
'
,
method
:
'
ge
t
'
,
url
:
'
/web/pay/getWxPreselectionConfig
'
,
params
:
data
})
...
...
src/request/index/signUp.js
View file @
b3b4562d
...
...
@@ -53,7 +53,16 @@ export function getAchievementOss(data) {
data
})
}
//删除图片
export
function
delPic
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/auth/delPic
'
,
params
:
data
})
}
// 页面个人信息保存
export
function
setAccount
(
data
)
{
data
[
'
identity
'
]
=
identity
;
...
...
src/views/index/camp/SignUp.vue
View file @
b3b4562d
...
...
@@ -43,8 +43,6 @@ export default {
this
.
type
=
this
.
$route
.
params
.
type
;
// console.log(this.$route);
this
.
signUpInit
();
},
watch
:
{
$route
:
{
...
...
@@ -61,22 +59,35 @@ export default {
signUpInit
()
{
// console.log(111);
signUpInit
({}).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
,
"
signUpInit
"
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
status
=
res
.
data
.
status
;
if
(
this
.
status
==
0
)
{
if
(
this
.
status
==
1
)
{
this
.
type
=
"
examInfo
"
;
}
else
if
(
this
.
status
==
1
)
{
}
else
if
(
this
.
status
==
2
)
{
this
.
type
=
"
invitation
"
;
}
else
if
(
this
.
status
==
2
)
{
}
else
if
(
this
.
status
==
3
)
{
this
.
type
=
"
referInfo
"
;
}
else
if
(
this
.
status
==
3
)
{
}
else
if
(
this
.
status
==
4
)
{
// this.type = "check";
if
(
res
.
data
.
examine_status
==
0
)
{
this
.
type
=
"
check
"
;
}
else
if
(
this
.
status
==
4
)
{
}
else
if
(
res
.
data
.
examine_status
==
1
)
{
this
.
type
=
"
pay
"
;
}
else
if
(
res
.
data
.
examine_status
==
2
)
{
this
.
type
=
"
referInfo
"
;
// this.status == 3
return
this
.
$message
.
error
(
res
.
data
.
examine_reason
);
}
}
else
if
(
this
.
status
==
5
)
{
this
.
type
=
"
pay
"
;
}
//审核报名资料状态
//订单支付金额
window
.
localStorage
.
setItem
(
"
has_amount
"
,
res
.
data
.
has_amount
);
});
},
},
...
...
src/views/index/login/Index.vue
View file @
b3b4562d
...
...
@@ -7,147 +7,32 @@
</
template
>
<
script
>
/* eslint-disable */
import
{
login
}
from
'
r/index/login.js
'
// import DialogBox from "c/index/register/DialogBox";
export
default
{
name
:
'
loginIndex
'
,
data
()
{
return
{
isShowPwd
:
true
,
// 控制密码显示隐藏
loginForm
:
{
username
:
''
,
password
:
''
name
:
"
loginIndex
"
,
data
()
{
return
{};
},
// 表单验证规则对象
loginFormRules
:
{
// 对用户名进行校验
username
:
[
{
required
:
true
,
message
:
'
请输入用户名
'
,
trigger
:
'
blur
'
},
{
min
:
4
,
max
:
20
,
message
:
'
请输入正确的用户名
'
,
trigger
:
'
blur
'
}
],
// 对密码进行校验
password
:
[
{
required
:
true
,
message
:
'
请输入密码
'
,
trigger
:
'
blur
'
},
{
min
:
6
,
max
:
20
,
message
:
'
请输入正确的密码
'
,
trigger
:
'
blur
'
}
]
created
()
{
this
.
$emit
(
"
getStatus
"
,
false
);
},
dialogFormFu
:
{
title
:
''
,
message
:
''
},
dialogVisibleFu
:
false
}
},
created
()
{
this
.
$emit
(
'
getStatus
'
,
false
)
},
methods
:
{
// 忘记账号/密码
forgetPwd
()
{
window
.
localStorage
.
setItem
(
'
f_forgetpwd
'
,
0
)
this
.
$router
.
replace
({
name
:
'
foundback
'
})
},
// 子组件触发,关闭弹框
closeDialog
(
value
,
type
)
{
this
.
dialogVisibleFu
=
value
if
(
type
)
{
this
.
$router
.
replace
({
name
:
'
StepOne
'
})
}
},
// 去注册
register
()
{
this
.
dialogFormFu
=
{
title
:
'
提示
'
,
message
:
1
}
this
.
dialogVisibleFu
=
true
// this.$router.replace({ name: "StepOne" });
},
// 改变密码显示状态
changePwdStatus
()
{
this
.
isShowPwd
=
!
this
.
isShowPwd
},
// 表单验证
submitForm
()
{
this
.
$refs
.
loginFormRef
.
validate
(
async
(
valid
)
=>
{
// 验证用户名和密码是否符合规定
if
(
!
valid
)
return
// 发送请求的操作
const
{
data
:
res
}
=
await
login
(
this
.
loginForm
)
console
.
log
(
res
,
'
返回用户注册数据
'
)
// 根据返回的状态码做想关的判断
if
(
res
.
code
!==
200
)
{
return
this
.
$message
.
error
(
res
.
message
)
}
// 判断用户注册是否填写信息完整
const
applicationstatus
=
parseInt
(
res
.
applicationstatus
)
const
can_skip
=
parseInt
(
res
.
can_skip
)
window
.
localStorage
.
setItem
(
'
applicationstatus
'
,
res
.
applicationstatus
)
window
.
localStorage
.
setItem
(
'
can_skip
'
,
res
.
can_skip
)
window
.
localStorage
.
setItem
(
'
is_check_id_card
'
,
res
.
is_check_id_card
)
console
.
log
(
!
can_skip
)
if
(
!
can_skip
)
{
if
(
applicationstatus
==
0
)
{
window
.
localStorage
.
setItem
(
'
sfzNum
'
,
res
.
sfzNum
)
this
.
$router
.
replace
({
name
:
'
StepOne
'
,
query
:
{
applicationstatus
:
'
0
'
,
data
:
res
}
})
return
}
else
if
(
applicationstatus
==
3
||
applicationstatus
==
4
||
applicationstatus
==
5
||
applicationstatus
==
6
)
{
window
.
localStorage
.
setItem
(
'
index-token
'
,
res
.
token
)
this
.
$store
.
state
.
token
=
res
.
token
window
.
localStorage
.
setItem
(
'
student_id
'
,
res
.
student_id
)
window
.
localStorage
.
setItem
(
'
sfzNum
'
,
res
.
sfzNum
)
window
.
localStorage
.
setItem
(
'
username
'
,
res
.
username
)
if
(
res
.
is_check_id_card
!=
1
)
{
this
.
$router
.
replace
({
name
:
'
StepTwo
'
})
}
else
{
this
.
$router
.
replace
({
name
:
'
StepThree
'
})
}
return
}
}
this
.
$store
.
state
.
token
=
res
.
token
window
.
localStorage
.
setItem
(
'
index-token
'
,
res
.
token
)
window
.
localStorage
.
setItem
(
'
student_id
'
,
res
.
student_id
)
window
.
localStorage
.
setItem
(
'
sfzNum
'
,
res
.
sfzNum
)
window
.
localStorage
.
setItem
(
'
username
'
,
res
.
username
)
this
.
$router
.
replace
({
name
:
'
examlist
'
})
})
}
}
// components: {
// DialogBox,
// },
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.login-index
{
// height: 1080px;
background
:
#
F8F8F
8
;
background
:
#
f8f8f
8
;
.ConDivContent_bg
{
height
:
1080px
;
background
:
url("../../../assets/img/login/left@2x.png")
no-repeat
center
center
;
background
:
url("../../../assets/img/login/left@2x.png")
no-repeat
;
background-size
:
100%
100%
;
// position: relative;
width
:
30%
;
}
// @media screen and (m
in-width: 1601
px) {
// @media screen and (m
ax-width: 1600
px) {
// .ConDivContent_bg {
//
height: 65
0px;
// max-height: 650px;
//
max-height: 60
0px;
// }
// }
}
...
...
src/views/index/login/Login.vue
View file @
b3b4562d
...
...
@@ -104,6 +104,7 @@ export default {
},
created
()
{
this
.
$emit
(
"
getStatus
"
,
false
);
window
.
localStorage
.
setItem
(
"
index-identity
"
,
'
c59086fdb37848e7a10765812d1da349
'
);
},
methods
:
{
// 忘记账号/密码
...
...
@@ -127,7 +128,7 @@ export default {
phone
:
this
.
loginForm
.
phone
,
password
:
this
.
loginForm
.
password
,
}).
then
((
res
)
=>
{
//
console.log(res, "login");
console
.
log
(
res
,
"
login
"
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
...
...
@@ -135,22 +136,8 @@ export default {
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
data
.
token
);
window
.
localStorage
.
setItem
(
"
phone
"
,
res
.
data
.
phone
);
// 判断营地报名进度
// //是否填写个人资料
// window.localStorage.setItem(
// "fill_individual_information",
// res.data.cam.fill_individual_information
// );
// //是否填写邀请码
// window.localStorage.setItem(
// "fill_individual_Invitationcode",
// res.data.cam.fill_individual_Invitationcode
// );
// //是否审核个人资料
// window.localStorage.setItem(
// "audit_individual_information",
// res.data.cam.audit_individual_information
// );
// 报名信息
window
.
localStorage
.
setItem
(
"
camp_name
"
,
res
.
data
.
cam
.
name
);
// 跳转到报名
this
.
$router
.
push
({
path
:
"
/signUp/examInfo
"
});
});
...
...
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