Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-register-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-register-show-h5
Commits
2cf5d451
提交
2cf5d451
authored
6月 08, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
进入报名页面 不直接跳转登录,展示页先显示,到表单填写在跳转登录
上级
1c366fa3
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
109 行增加
和
73 行删除
+109
-73
api.js
src/modules/home/api.js
+5
-0
ImgShow.vue
src/modules/home/components/ImgShow.vue
+17
-7
SignForm.vue
src/modules/home/components/SignForm.vue
+2
-0
Index.vue
src/modules/home/views/Index.vue
+76
-63
SignMainPage.vue
src/modules/home/views/SignMainPage.vue
+4
-3
axios.js
src/utils/axios.js
+5
-0
没有找到文件。
src/modules/home/api.js
浏览文件 @
2cf5d451
...
@@ -49,3 +49,8 @@ export function importPeople(data) {
...
@@ -49,3 +49,8 @@ export function importPeople(data) {
export
function
getOpenid
(
data
)
{
export
function
getOpenid
(
data
)
{
return
httpRequest
.
post
(
'/api/usercenter/v2/frontend/wechat/get-openid'
,
data
)
return
httpRequest
.
post
(
'/api/usercenter/v2/frontend/wechat/get-openid'
,
data
)
}
}
// 获取openid
export
function
updateUserInfo
(
data
)
{
return
httpRequest
.
post
(
'/api/usercenter/v2/frontend/user/update-user'
,
data
)
}
src/modules/home/components/ImgShow.vue
浏览文件 @
2cf5d451
...
@@ -44,11 +44,21 @@ export default {
...
@@ -44,11 +44,21 @@ export default {
handlePrev
()
{
handlePrev
()
{
this
.
$emit
(
'prev'
)
this
.
$emit
(
'prev'
)
},
},
handleSubmit
()
{
async
handleSubmit
()
{
if
(
this
.
stepList
[
this
.
stepList
.
length
-
1
].
num
===
this
.
data
.
num
)
{
const
isLogin
=
this
.
$store
.
state
.
user
.
id
||
(
await
this
.
$store
.
dispatch
(
'checkLogin'
))
this
.
$router
.
push
({
path
:
'/'
})
if
(
!
isLogin
)
{
const
datas
=
this
.
stepList
.
filter
(
item
=>
item
.
type
===
1
)
if
(
datas
[
datas
.
length
-
1
].
num
===
this
.
data
.
num
)
{
window
.
location
.
href
=
`https://login.ezijing.com/auth/login/index?rd=
${
window
.
location
.
origin
}
/SignMainPage?id=
${
this
.
$route
.
query
.
id
}
`
}
else
{
this
.
$emit
(
'next'
)
}
}
else
{
}
else
{
this
.
$emit
(
'next'
)
if
(
this
.
stepList
[
this
.
stepList
.
length
-
1
].
num
===
this
.
data
.
num
)
{
this
.
$router
.
push
({
path
:
'/'
})
}
else
{
this
.
$emit
(
'next'
)
}
}
}
}
}
}
}
...
@@ -65,9 +75,9 @@ export default {
...
@@ -65,9 +75,9 @@ export default {
margin
:
0
.84rem
auto
;
margin
:
0
.84rem
auto
;
.show_content_img
{
.show_content_img
{
// width: 6.9rem;
// width: 6.9rem;
::v-deep
{
::v-deep
{
p
{
p
{
font-size
:
.24rem
;
font-size
:
0
.24rem
;
}
}
}
}
}
}
...
...
src/modules/home/components/SignForm.vue
浏览文件 @
2cf5d451
...
@@ -132,6 +132,7 @@ import { Toast } from 'vant'
...
@@ -132,6 +132,7 @@ import { Toast } from 'vant'
import
BatchImport
from
'../components/BatchImport.vue'
import
BatchImport
from
'../components/BatchImport.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
{
saveStepInfo
,
getOpenid
}
from
'../api'
import
{
saveStepInfo
,
getOpenid
}
from
'../api'
// updateUserInfo
import
allFormList
from
'@/utils/formList'
import
allFormList
from
'@/utils/formList'
export
default
{
export
default
{
components
:
{
Commonheader
,
BatchImport
},
components
:
{
Commonheader
,
BatchImport
},
...
@@ -152,6 +153,7 @@ export default {
...
@@ -152,6 +153,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
JSON
.
parse
(
window
.
localStorage
.
userInfo
).
mobile
,
'phone'
)
if
(
this
.
isPc
())
{
if
(
this
.
isPc
())
{
document
.
getElementById
(
'main_footer'
).
style
.
width
=
'400px'
document
.
getElementById
(
'main_footer'
).
style
.
width
=
'400px'
}
}
...
...
src/modules/home/views/Index.vue
浏览文件 @
2cf5d451
...
@@ -4,17 +4,13 @@
...
@@ -4,17 +4,13 @@
<commonheader
:title=
"title"
/>
<commonheader
:title=
"title"
/>
<div
class=
"main_content"
>
<div
class=
"main_content"
>
<!-- banner卡片 -->
<!-- banner卡片 -->
<img
<img
class=
"main_content_banner"
src=
"https://webapp-pub.ezijing.com/highway/h5/banner-0420.png"
alt=
""
/>
class=
"main_content_banner"
src=
"https://webapp-pub.ezijing.com/highway/h5/banner-0420.png"
alt=
""
/>
<!-- 动态 -->
<!-- 动态 -->
<div
class=
"main_content_dt"
>
<div
class=
"main_content_dt"
>
<div
class=
"main_content_dt_tit"
>
中国公路建设行业协会
</div>
<div
class=
"main_content_dt_tit"
>
中国公路建设行业协会
</div>
<ul
class=
"main-content"
>
<ul
class=
"main-content"
>
<li
v-for=
"(item, index) in navList"
:key=
"index"
@
click=
"handleNav(item)"
>
<li
v-for=
"(item, index) in navList"
:key=
"index"
@
click=
"handleNav(item)"
>
<img
:src=
"item.icon"
>
<img
:src=
"item.icon"
/
>
<div
class=
"text"
>
{{
item
.
text
}}
</div>
<div
class=
"text"
>
{{
item
.
text
}}
</div>
</li>
</li>
</ul>
</ul>
...
@@ -151,12 +147,20 @@ export default {
...
@@ -151,12 +147,20 @@ export default {
// 报名
// 报名
async
handleSignCheck
(
item
)
{
async
handleSignCheck
(
item
)
{
// 未登录
// 未登录
const
isLogin
=
this
.
$store
.
state
.
user
.
id
||
(
await
this
.
$store
.
dispatch
(
'checkLogin'
))
this
.
getActivityDetail
(
item
)
if
(
!
isLogin
)
{
// const isLogin = this.$store.state.user.id || (await this.$store.dispatch('checkLogin'))
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
// if (!isLogin) {
}
else
{
// this.$router.push({
this
.
getActivityDetail
(
item
)
// path: '/SignMainPage',
}
// query: {
// stepIndex: 0,
// isLogin: true,
// loginId: item.id
// }
// })
// } else {
// this.getActivityDetail(item)
// }
},
},
// 获取活动详情
// 获取活动详情
getActivityDetail
(
item
)
{
getActivityDetail
(
item
)
{
...
@@ -172,51 +176,22 @@ export default {
...
@@ -172,51 +176,22 @@ export default {
const
startTime
=
new
Date
(
item
.
start_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
const
startTime
=
new
Date
(
item
.
start_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
const
endTime
=
new
Date
(
item
.
end_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
const
endTime
=
new
Date
(
item
.
end_time
.
replace
(
/-/g
,
'/'
)).
getTime
()
if
(
time
>=
startTime
&&
time
<
endTime
)
{
if
(
time
>=
startTime
&&
time
<
endTime
)
{
if
(
this
.
detailList
.
other_fill_in
.
need_fill_in_status
)
{
if
(
this
.
detailList
.
self_fill_in
===
null
&&
this
.
detailList
.
other_fill_in
===
null
)
{
// 有需要填写的步骤
this
.
$router
.
push
({
Dialog
.
confirm
({
path
:
'/SignMainPage'
,
title
:
'提示'
,
query
:
{
message
:
'还有报名流程未交费'
,
id
:
item
.
id
confirmButtonText
:
'继续报名'
,
cancelButtonText
:
this
.
detailList
.
self_fill_in
.
need_fill_in_status
===
false
?
(
canJump
?
'开始学习'
:
''
)
:
''
,
closeOnClickOverlay
:
true
,
beforeClose
:
(
action
,
done
)
=>
{
if
(
action
===
'overlay'
)
{
window
.
location
.
href
=
window
.
location
.
origin
}
else
{
done
(
true
)
}
}
}
})
})
.
then
(()
=>
{
}
else
{
this
.
$router
.
push
({
if
(
this
.
detailList
.
other_fill_in
?.
need_fill_in_status
)
{
path
:
'/SignMainPage'
,
// 有需要填写的步骤
query
:
{
id
:
item
.
id
}
})
})
.
catch
(()
=>
{
if
(
canJump
)
{
window
.
location
.
href
=
canJump
.
jump_url
}
})
// 没有需要填写的步骤
}
else
if
(
!
this
.
detailList
.
other_fill_in
.
need_fill_in_status
)
{
if
(
this
.
detailList
.
self_fill_in
.
need_fill_in_status
)
{
this
.
$router
.
push
({
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
}
else
{
Dialog
.
confirm
({
Dialog
.
confirm
({
title
:
'提示'
,
title
:
'提示'
,
message
:
''
,
message
:
'还有报名流程未交费'
,
confirmButtonText
:
'重新报名'
,
confirmButtonText
:
'继续报名'
,
cancelButtonText
:
canJump
?
'开始学习'
:
''
,
cancelButtonText
:
this
.
detailList
.
self_fill_in
.
need_fill_in_status
===
false
?
(
canJump
?
'开始学习'
:
''
)
:
''
,
closeOnClickOverlay
:
true
,
closeOnClickOverlay
:
true
,
beforeClose
:
(
action
,
done
)
=>
{
beforeClose
:
(
action
,
done
)
=>
{
if
(
action
===
'overlay'
)
{
if
(
action
===
'overlay'
)
{
...
@@ -239,6 +214,44 @@ export default {
...
@@ -239,6 +214,44 @@ export default {
window
.
location
.
href
=
canJump
.
jump_url
window
.
location
.
href
=
canJump
.
jump_url
}
}
})
})
// 没有需要填写的步骤
}
else
if
(
!
this
.
detailList
.
other_fill_in
?.
need_fill_in_status
)
{
if
(
this
.
detailList
.
self_fill_in
?.
need_fill_in_status
)
{
this
.
$router
.
push
({
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
}
else
{
Dialog
.
confirm
({
title
:
'提示'
,
message
:
''
,
confirmButtonText
:
'重新报名'
,
cancelButtonText
:
canJump
?
'开始学习'
:
''
,
closeOnClickOverlay
:
true
,
beforeClose
:
(
action
,
done
)
=>
{
if
(
action
===
'overlay'
)
{
window
.
location
.
href
=
window
.
location
.
origin
}
else
{
done
(
true
)
}
}
})
.
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
})
.
catch
(()
=>
{
if
(
canJump
)
{
window
.
location
.
href
=
canJump
.
jump_url
}
})
}
}
}
}
}
}
else
if
(
time
>=
endTime
)
{
}
else
if
(
time
>=
endTime
)
{
...
@@ -362,28 +375,28 @@ export default {
...
@@ -362,28 +375,28 @@ export default {
}
}
}
}
}
}
.main-content
{
.main-content
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
0
.2rem
;
padding
:
0
0
.2rem
;
padding-top
:
.25rem
;
padding-top
:
0
.25rem
;
li
{
li
{
img
{
img
{
width
:
1
.2rem
;
width
:
1
.2rem
;
display
:
block
;
display
:
block
;
}
}
.text
{
.text
{
font-size
:
.24rem
;
font-size
:
0
.24rem
;
line-height
:
100%
;
line-height
:
100%
;
color
:
#4
E4E4E
;
color
:
#4
e4e4e
;
text-align
:
center
;
text-align
:
center
;
}
}
}
}
}
}
.border-line
{
.border-line
{
width
:
6
.2rem
;
width
:
6
.2rem
;
margin
:
0
auto
0
.35rem
;
margin
:
0
auto
0
.35rem
;
border-bottom
:
.01rem
dashed
rgba
(
196
,
196
,
196
,
1
);
border-bottom
:
0
.01rem
dashed
rgba
(
196
,
196
,
196
,
1
);
}
}
::v-deep
.van-icon-arrow
{
::v-deep
.van-icon-arrow
{
margin-top
:
0
.05rem
;
margin-top
:
0
.05rem
;
...
...
src/modules/home/views/SignMainPage.vue
浏览文件 @
2cf5d451
...
@@ -66,6 +66,7 @@ export default {
...
@@ -66,6 +66,7 @@ export default {
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
getActivityDetail
()
this
.
getActivityDetail
()
}
else
{
}
else
{
console
.
log
(
JSON
.
parse
(
window
.
localStorage
.
orderStepDetails
),
'12322'
)
this
.
setData
(
JSON
.
parse
(
window
.
localStorage
.
orderStepDetails
))
this
.
setData
(
JSON
.
parse
(
window
.
localStorage
.
orderStepDetails
))
}
}
}
else
{
}
else
{
...
@@ -101,9 +102,9 @@ export default {
...
@@ -101,9 +102,9 @@ export default {
})
})
}
}
let
sliceData
=
[]
let
sliceData
=
[]
if
(
data
.
other_fill_in
.
need_fill_in_status
)
{
if
(
data
.
other_fill_in
?
.
need_fill_in_status
)
{
initInfo
(
'other_fill_in'
)
initInfo
(
'other_fill_in'
)
}
else
if
(
data
.
self_fill_in
.
need_fill_in_status
)
{
}
else
if
(
data
.
self_fill_in
?
.
need_fill_in_status
)
{
initInfo
(
'self_fill_in'
)
initInfo
(
'self_fill_in'
)
}
else
{
}
else
{
initInfo
()
initInfo
()
...
@@ -150,7 +151,7 @@ export default {
...
@@ -150,7 +151,7 @@ export default {
sliceData
.
map
(
item
=>
{
sliceData
.
map
(
item
=>
{
item
.
list
=
[]
item
.
list
=
[]
item
.
activityInfo
=
Object
.
assign
({},
data
.
activity
)
item
.
activityInfo
=
Object
.
assign
({},
data
.
activity
)
item
.
list
.
push
(
data
.
info
)
data
.
info
!==
null
&&
item
.
list
.
push
(
data
.
info
)
return
item
return
item
})
})
}
}
...
...
src/utils/axios.js
浏览文件 @
2cf5d451
...
@@ -40,6 +40,11 @@ httpRequest.interceptors.response.use(
...
@@ -40,6 +40,11 @@ httpRequest.interceptors.response.use(
if
(
data
.
code
===
4001
)
{
if
(
data
.
code
===
4001
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
`
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
`
}
}
// 未登录
if
(
data
.
code
===
1
)
{
// window.location.href = `${import.meta.env.VITE_LOGIN_URL}`
return
}
// 没有权限
// 没有权限
if
(
data
.
code
===
4008
||
data
.
code
===
5018
)
{
if
(
data
.
code
===
4008
||
data
.
code
===
5018
)
{
router
.
push
(
'/401'
)
router
.
push
(
'/401'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论