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
b763e22a
提交
b763e22a
authored
3月 23, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:代码提交
上级
7798190a
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
330 行增加
和
174 行删除
+330
-174
.env.test
.env.test
+1
-1
Commonheader.vue
src/modules/home/components/Commonheader.vue
+6
-1
ImgShow.vue
src/modules/home/components/ImgShow.vue
+1
-3
SignForm.vue
src/modules/home/components/SignForm.vue
+102
-40
Index.vue
src/modules/home/views/Index.vue
+13
-36
MyOrder.vue
src/modules/home/views/MyOrder.vue
+11
-4
OrderConfirm.vue
src/modules/home/views/OrderConfirm.vue
+54
-37
PayDetail.vue
src/modules/home/views/PayDetail.vue
+58
-26
SignMainPage.vue
src/modules/home/views/SignMainPage.vue
+77
-10
index.js
src/store/index.js
+2
-13
formList.js
src/utils/formList.js
+3
-2
vite.config.js
vite.config.js
+2
-1
没有找到文件。
.env.test
浏览文件 @
b763e22a
VITE_LOGIN_URL
=
https
://
login
2
.
ezijing
.
com
/
auth
/
login
/
index
VITE_LOGIN_URL
=
https
://
login
.
ezijing
.
com
/
auth
/
login
/
index
VITE_SHARE_URL
=
https
://
accounts
.
ezijing
.
com
src/modules/home/components/Commonheader.vue
浏览文件 @
b763e22a
...
...
@@ -2,7 +2,7 @@
<div
class=
"main_header"
>
<van-nav-bar
fixed
:title=
"title"
left-arrow
@
click-left=
"onClickLeft"
>
<template
#
right
>
<van-icon
name=
"contact"
size=
"28"
@
click=
"onClickRight"
/>
<van-icon
v-if=
"pathName === '/'"
name=
"contact"
size=
"28"
@
click=
"onClickRight"
/>
</
template
>
</van-nav-bar>
</div>
...
...
@@ -20,6 +20,11 @@ export default {
default
:
false
}
},
computed
:
{
pathName
()
{
return
window
.
location
.
pathname
}
},
methods
:
{
// 首页返回按钮
onClickLeft
()
{
...
...
src/modules/home/components/ImgShow.vue
浏览文件 @
b763e22a
...
...
@@ -2,7 +2,7 @@
<div
class=
"main"
>
<!-- 展示页面 -->
<div
class=
"show_content"
>
<
img
class=
"show_content_img"
:src=
"data.desc"
/
>
<
div
class=
"show_content_img"
v-html=
"data.desc"
></div
>
<div
class=
"show_content_btn"
@
click=
"handleSubmit"
>
{{
data
.
title
}}
</div>
</div>
</div>
...
...
@@ -41,8 +41,6 @@ export default {
.show_content_img
{
margin-top
:
0
.84rem
;
width
:
6
.9rem
;
height
:
10
.1rem
;
border
:
1px
solid
#707070
;
}
.show_content_btn
{
width
:
6
.42rem
;
...
...
src/modules/home/components/SignForm.vue
浏览文件 @
b763e22a
<
template
>
<div
class=
"main"
>
<div
class=
"main_content"
>
<
img
class=
"main_content_banner"
:src=
"data.desc"
alt=
""
/
>
<
div
class=
"main_content_banner"
v-html=
"data.desc"
></div
>
<div
class=
"main_content_form"
>
<van-form
@
submit=
"onSubmit"
>
<van-form>
<div
v-for=
"(listIt, formIndex) in formList"
:key=
"formIndex"
class=
"main_content_form_list"
>
<img
src=
"https://webapp-pub.ezijing.com/highway/h5/form_minus.png"
class=
"btn_minus"
@
click=
"handleMinus"
v-if=
"formList.length > 1"
@
click=
"handleMinus
(formIndex)
"
v-if=
"formList.length > 1
&& formIndex !== 0
"
/>
<div
class=
"formItemList_item"
v-for=
"(item, index) in listIt"
:key=
"index"
>
<!-- 输入框 -->
...
...
@@ -23,6 +23,7 @@
:rules=
"[
{ required: item.required, message: item.placeholder }]"
clearable
border
:disabled="formIndex === 0
&&
(item.key === 'mobile' || item.key === 'name')"
/>
</div>
<!-- 单选框 -->
...
...
@@ -88,7 +89,7 @@
</van-form>
</div>
<div
class=
"main_content_footer"
>
<
template
v-if=
"
isShowSkip !== '1'
"
>
<
template
v-if=
"
data.can_skip_pay === 1
"
>
<van-checkbox
v-model=
"checkedPay"
shape=
"square"
class=
"main_content_skipPay"
>
{{
data
.
skip_pay_title
}}
</van-checkbox
>
...
...
@@ -97,7 +98,7 @@
round
block
native-type=
"submit"
:class=
"[
isShowSkip === '1' ? 'main_content_btn1' : 'main_content_btn
']"
:class=
"[
data.can_skip_pay === 1 ? 'main_content_btn' : 'main_content_btn1
']"
@
click=
"onSubmit"
>
{{ data.title }}
</van-button
>
...
...
@@ -113,9 +114,15 @@ export default {
props
:
{
stepList
:
{
type
:
Array
},
data
:
{
type
:
Object
},
// eslint-disable-next-line vue/require-prop-type-constructor
stepIndex
:
0
,
isShowSkip
:
{
type
:
String
}
stepIndex
:
{
type
:
Number
},
isShowSkip
:
{
type
:
String
},
personalInfo
:
{
type
:
Object
},
detailList
:
{
type
:
Object
},
myInfoList
:
{
type
:
Array
}
},
data
()
{
return
{
...
...
@@ -131,22 +138,73 @@ export default {
}
},
mounted
()
{
window
.
localStorage
.
setItem
(
'stepIndex'
,
this
.
stepIndex
)
this
.
$store
.
commit
(
'saveStepIndex'
,
this
.
stepIndex
)
//
if
(
this
.
$store
.
state
.
stepForm
.
length
)
{
this
.
formList
=
this
.
$store
.
state
.
stepForm
const
orderInfoList
=
this
.
$route
.
query
.
activity_detail_list
// 点击我的订单也去支付,返回来拿到的表单数据
const
userFields
=
JSON
.
parse
(
this
.
stepList
[
this
.
stepIndex
].
user_fields
)
if
(
this
.
$route
.
query
.
activity_detail_id
)
{
if
(
!
orderInfoList
.
length
)
{
this
.
handleAdd
()
return
}
// eslint-disable-next-line vue/no-mutating-props
// 订单拿回的数据回显
this
.
formList
=
orderInfoList
.
sort
((
a
,
b
)
=>
{
return
a
.
num
-
b
.
num
})
.
reduce
((
a
,
b
)
=>
{
const
arr
=
[]
userFields
.
forEach
(
item
=>
{
const
find
=
Object
.
assign
(
{},
allFormList
.
find
(
d
=>
d
.
key
===
item
.
key
)
)
find
.
value
=
b
[
item
.
key
]
arr
.
push
(
find
)
})
a
.
push
(
arr
)
return
a
},
[])
}
else
{
// 详情拿回的数据回显
if
(
!
this
.
myInfoList
.
length
)
{
this
.
handleAdd
()
return
}
this
.
myInfoList
.
map
((
item
,
index
)
=>
{
if
(
item
.
mobile
===
this
.
detailList
.
info
.
mobile
)
{
item
.
num
=
0
}
else
{
item
.
num
=
index
+
1
}
return
item
})
// eslint-disable-next-line vue/no-mutating-props
this
.
formList
=
this
.
myInfoList
.
sort
((
a
,
b
)
=>
{
return
a
.
num
-
b
.
num
})
.
reduce
((
a
,
b
)
=>
{
const
arr
=
[]
userFields
.
forEach
(
item
=>
{
const
find
=
Object
.
assign
(
{},
allFormList
.
find
(
d
=>
d
.
key
===
item
.
key
)
)
find
.
value
=
b
[
item
.
key
]
arr
.
push
(
find
)
})
a
.
push
(
arr
)
return
a
},
[])
}
console
.
log
(
this
.
formList
,
'1111'
)
},
methods
:
{
// 提交
onSubmit
()
{
const
result
=
[]
window
.
localStorage
.
setItem
(
'stepForm'
,
JSON
.
stringify
(
this
.
formList
))
console
.
log
(
window
.
localStorage
.
getItem
(
'stepForm'
))
this
.
$store
.
commit
(
'setFormList'
,
this
.
formList
)
console
.
log
(
this
.
formList
,
'this.formList'
)
this
.
formList
.
forEach
(
item
=>
{
const
resultObj
=
{}
item
.
forEach
(
obj
=>
{
...
...
@@ -155,14 +213,10 @@ export default {
result
.
push
(
resultObj
)
})
if
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
))?.
other_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)
).
other_fill_in
.
list
[
0
].
pay_records
.
join_rand
}
else
if
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
))?.
self_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)
).
self_fill_in
.
list
[
0
].
pay_records
.
join_rand
if
(
this
.
detailList
.
other_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
this
.
detailList
.
self_fill_in
.
list
[
0
]?.
pay_records
[
0
].
join_rand
}
else
if
(
this
.
detailList
.
self_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
this
.
detailList
.
self_fill_in
.
list
[
0
]?.
pay_records
[
0
].
join_rand
}
else
{
this
.
join_rand
=
''
}
...
...
@@ -175,11 +229,12 @@ export default {
company_id
:
''
,
join_rand
:
this
.
join_rand
}
console
.
log
(
this
.
data
.
order
,
'this.data.order'
)
saveStepInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
stepOrderInfo
=
res
.
data
window
.
localStorage
.
setItem
(
'stepOrderInfo'
,
JSON
.
stringify
(
this
.
stepOrderInfo
)
)
this
.
$store
.
commit
(
'setStepOrderInfo'
,
this
.
stepOrderInfo
)
console
.
log
(
this
.
stepOrderInfo
)
window
.
localStorage
.
setItem
(
'stepOrderInfo'
,
JSON
.
stringify
(
this
.
stepOrderInfo
.
list
)
)
if
(
this
.
checkedPay
)
{
const
lastorder
=
this
.
stepList
[
this
.
stepList
.
length
-
1
].
order
if
(
lastorder
===
this
.
data
.
order
)
{
...
...
@@ -188,10 +243,17 @@ export default {
this
.
$emit
(
'next'
)
}
}
else
{
console
.
log
(
this
.
join_rand
,
'this.join_rand'
)
this
.
$router
.
push
({
path
:
'/OrderConfirm'
,
query
:
{
stepOrderInfo
:
this
.
stepOrderInfo
// stepOrderInfo: JSON.stringify(this.stepOrderInfo),
detailListName
:
JSON
.
stringify
(
this
.
detailList
.
activity
.
name
),
activityId
:
JSON
.
stringify
(
this
.
data
.
activity_id
),
join_rand
:
this
.
join_rand
,
stepIndex
:
JSON
.
stringify
(
this
.
stepIndex
),
activity_detail_id
:
this
.
data
.
id
,
pay_price
:
JSON
.
stringify
(
this
.
stepOrderInfo
.
pay_price
)
}
})
}
...
...
@@ -217,9 +279,9 @@ export default {
if
(
this
.
formList
.
length
===
1
)
{
this
.
formList
[
0
].
forEach
(
item
=>
{
if
(
item
.
key
===
'name'
)
{
return
(
item
.
value
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)).
i
nfo
.
name
)
return
(
item
.
value
=
this
.
personalI
nfo
.
name
)
}
else
if
(
item
.
key
===
'mobile'
)
{
return
(
item
.
value
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)).
i
nfo
.
mobile
)
return
(
item
.
value
=
this
.
personalI
nfo
.
mobile
)
}
})
}
...
...
@@ -266,9 +328,9 @@ export default {
.main_content_banner
{
margin-top
:
0
.84rem
;
width
:
6
.9rem
;
height
:
2
.97rem
;
border
:
1px
solid
#707070
;
border-radius
:
0
.2rem
;
//
height: 2.97rem;
//
border: 1px solid #707070;
//
border-radius: 0.2rem;
}
.main_content_form
{
width
:
6
.9rem
;
...
...
@@ -299,7 +361,6 @@ export default {
}
.main_content_footer
{
height
:
1
.81rem
;
// margin-top: 1.02rem;
position
:
fixed
;
bottom
:
0
.3rem
;
background
:
#fff
;
...
...
@@ -329,16 +390,17 @@ export default {
}
}
}
::v-deep
.van-icon
{
width
:
0
.2
4
rem
;
height
:
0
.2
4
rem
;
::v-deep
.van-
checkbox__icon
.van-
icon
{
width
:
0
.2
5
rem
;
height
:
0
.2
6
rem
;
text-align
:
center
;
margin-top
:
0
.06rem
;
}
::v-deep
.van-checkbox__icon
{
::v-deep
.van-checkbox__icon
.van-checkbox__icon
{
font-size
:
0
.16rem
;
}
::v-deep
.van-checkbox__label
{
::v-deep
.van-checkbox__
icon
.van-checkbox__
label
{
color
:
#999999
;
margin-top
:
0
.1
rem
;
margin-top
:
-0
.9
rem
;
}
</
style
>
src/modules/home/views/Index.vue
浏览文件 @
b763e22a
...
...
@@ -97,37 +97,7 @@ export default {
const
params
=
{
id
:
item
.
id
}
getActivityDetail
(
params
).
then
(
res
=>
{
this
.
detailList
=
res
.
data
window
.
localStorage
.
setItem
(
'detailList'
,
JSON
.
stringify
(
this
.
detailList
))
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
))
this
.
$store
.
commit
(
'setDetailList'
,
this
.
detailList
)
if
(
this
.
detailList
.
other_fill_in
.
need_fill_in_status
)
{
this
.
detailList
.
activity
.
details
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
detailList
.
other_fill_in
.
need_fill_in_id
)
{
const
details
=
this
.
detailList
.
activity
.
details
.
indexOf
(
item
)
if
(
details
===
0
)
{
const
stepList
=
this
.
detailList
.
activity
.
details
window
.
localStorage
.
setItem
(
'stepList'
,
JSON
.
stringify
(
stepList
))
}
else
if
(
details
>
0
)
{
const
stepList
=
this
.
detailList
.
activity
.
details
.
splice
(
0
,
details
+
1
)
window
.
localStorage
.
setItem
(
'stepList'
,
JSON
.
stringify
(
stepList
))
}
}
})
}
else
if
(
this
.
detailList
.
self_fill_in
.
need_fill_in_status
)
{
this
.
detailList
.
activity
.
details
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
detailList
.
self_fill_in
.
need_fill_in_id
)
{
const
details
=
this
.
detailList
.
activity
.
details
.
indexOf
(
item
)
if
(
details
===
0
)
{
const
stepList
=
this
.
detailList
.
activity
.
details
window
.
localStorage
.
setItem
(
'stepList'
,
JSON
.
stringify
(
stepList
))
}
else
if
(
details
>
0
)
{
const
stepList
=
this
.
detailList
.
activity
.
details
.
splice
(
0
,
details
+
1
)
window
.
localStorage
.
setItem
(
'stepList'
,
JSON
.
stringify
(
stepList
))
}
}
})
}
this
.
handleSign
(
item
)
})
},
...
...
@@ -147,17 +117,21 @@ export default {
})
.
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/SignMainPage'
})
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
.
catch
(()
=>
{
// on cancel
})
.
catch
(()
=>
{})
// 没有需要填写的步骤
}
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'
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
}
else
{
Dialog
.
confirm
({
...
...
@@ -169,7 +143,10 @@ export default {
})
.
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/SignMainPage'
path
:
'/SignMainPage'
,
query
:
{
id
:
item
.
id
}
})
})
.
catch
(()
=>
{})
...
...
src/modules/home/views/MyOrder.vue
浏览文件 @
b763e22a
...
...
@@ -6,9 +6,14 @@
<van-tabs
v-model=
"active"
animated
sticky
>
<van-tab
v-for=
"(it, index) in orderTab"
:key=
"index"
:title=
"it.title"
>
<div
v-if=
"getDataByType(it.type).length"
class=
"main_content_ticket"
>
<van-button
round
icon=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/highway/h5/ticket.png"
>
<a
href=
"https://accounts.ezijing.com/h5/payment"
>
<van-button
round
icon=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/highway/h5/ticket.png"
>
开发票
</van-button>
</a>
</div>
<!-- 订单列表 -->
<div
v-if=
"getDataByType(it.type).length"
class=
"main_content_orderList"
>
...
...
@@ -90,11 +95,13 @@ export default {
}
},
handlePay
(
item
)
{
console
.
log
(
item
.
list
,
'item'
)
console
.
log
(
item
,
'item'
)
this
.
$router
.
push
({
path
:
'
OrderConfirm
'
,
path
:
'
/signMainPage
'
,
query
:
{
orderList
:
item
activityId
:
item
.
list
[
0
].
activity_id
,
activity_detail_id
:
item
.
list
[
0
].
pay_record
.
activity_detail_id
,
activity_detail_list
:
item
.
list
}
})
}
...
...
src/modules/home/views/OrderConfirm.vue
浏览文件 @
b763e22a
...
...
@@ -4,12 +4,11 @@
<commonheader
@
back=
"handlePrev"
:callBack=
"true"
:title=
"title"
/>
<div
class=
"main_content"
>
<div
class=
"main_content_list"
>
<!--
{{
stepOrderInfo
}}
-->
<van-checkbox-group
v-model=
"selctOrderData"
ref=
"checkboxGroup"
@
change=
"checkItem"
>
<div
class=
"main_content_list_card"
v-for=
"(item, index) in stepOrderInfo
.list
"
:key=
"index"
>
<div
class=
"main_content_list_card"
v-for=
"(item, index) in stepOrderInfo"
:key=
"index"
>
<div
class=
"card_header"
>
<van-checkbox
:name=
"item"
:disabled=
"item.pay_record.pay_status === '1'"
></van-checkbox>
<span
class=
"card_header_title"
>
{{
stepName
}}
</span>
<span
class=
"card_header_title"
>
{{
JSON
.
parse
(
$route
.
query
.
detailListName
)
}}
</span>
</div>
<div
class=
"card_con"
>
<p>
{{
item
.
name
}}
{{
item
.
mobile
}}
</p>
...
...
@@ -17,15 +16,13 @@
<div
class=
"card_fotter"
>
<div
class=
"card_fotter_left"
>
<span
class=
"price"
>
¥
</span>
<span
class=
"price_num"
>
{{
stepOrderInfo
.
pay_p
rice
}}
<span
class=
"price_num"
></span></span>
<span
class=
"price_num"
>
{{
payP
rice
}}
<span
class=
"price_num"
></span></span>
</div>
<div
class=
"card_fotter_left card_fotter_right"
>
<span
class=
"price"
>
单位已优惠
</span>
<span
class=
"price"
>
¥
</span>
<span
class=
"price_num"
>
{{
(
Number
(
stepOrderInfo
.
pay_price
).
toFixed
(
2
)
-
Number
(
item
.
pay_record
.
pay_amount
).
toFixed
(
2
)).
toFixed
(
2
)
(
Number
(
payPrice
).
toFixed
(
2
)
-
Number
(
item
.
pay_record
.
pay_amount
).
toFixed
(
2
)).
toFixed
(
2
)
}}
</span>
</div>
</div>
...
...
@@ -40,7 +37,7 @@
<div
class=
"main_footer_total_top"
>
<div
class=
"total_text"
>
合计:
</div>
<div
class=
"total_sign"
>
¥
</div>
<div
class=
"price"
>
{{
totalPrice
}}
.00
</div>
<div
class=
"price"
>
{{
totalPrice
}}
</div>
</div>
<div
class=
"main_footer_total_bottom"
>
<div
class=
"company_yh"
>
单位已优惠
</div>
...
...
@@ -55,7 +52,7 @@
</
template
>
<
script
>
import
{
get
ActivityDetail
}
from
'../api'
import
{
get
PayInfo
}
from
'../api'
import
Commonheader
from
'../components/Commonheader.vue'
export
default
{
components
:
{
Commonheader
},
...
...
@@ -66,7 +63,8 @@ export default {
isAll
:
false
,
numVsible
:
true
,
payDetail
:
{},
selctOrderData
:
[]
// 选中的数据
selctOrderData
:
[],
// 选中的数据
stepOrderInfo
:
[]
}
},
...
...
@@ -74,44 +72,41 @@ export default {
totalPrice
()
{
return
this
.
selctOrderData
.
map
(
item
=>
Number
(
item
.
pay_record
.
pay_amount
)).
reduce
((
pre
,
nex
)
=>
(
pre
+=
nex
),
0
)
},
payPrice
()
{
return
JSON
.
parse
(
this
.
$route
.
query
.
pay_price
)
},
totalCompanyPrice
()
{
return
this
.
selctOrderData
.
map
(
item
=>
Number
(
this
.
stepOrderInfo
.
pay_p
rice
)
-
Number
(
item
.
pay_record
.
pay_amount
))
.
map
(
item
=>
Number
(
this
.
payP
rice
)
-
Number
(
item
.
pay_record
.
pay_amount
))
.
reduce
((
pre
,
nex
)
=>
(
pre
+=
nex
),
0
)
},
stepOrderInfo
()
{
return
this
.
$route
.
query
.
stepOrderInfo
||
this
.
$route
.
query
.
orderList
},
stepName
()
{
return
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)).
activity
.
name
stepIndex
()
{
return
JSON
.
parse
(
this
.
$route
.
query
.
stepIndex
)
}
// disabledList() {
// return this.stepOrderInfo.map(item => item.pay_record.pay_status === '1')
// }
},
mounted
()
{
console
.
log
(
this
.
$route
.
query
.
orderList
)
console
.
log
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'stepOrderInfo'
)))
// this.getActivityDetail()
this
.
stepOrderInfo
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'stepOrderInfo'
))
},
methods
:
{
// getActivityDetail() {
// const params = { id: this.$route.query.orderList.list[0].activity_id }
// getActivityDetail(params).then(res => {
// console.log(res)
// // this.stepOrderInfo = res.data
// })
// },
checkItem
()
{
if
(
this
.
selctOrderData
.
length
===
this
.
stepOrderInfo
.
l
ist
.
l
ength
)
{
if
(
this
.
selctOrderData
.
length
===
this
.
stepOrderInfo
.
length
)
{
this
.
isAll
=
true
}
else
{
this
.
isAll
=
false
}
},
handlePrev
()
{
console
.
log
(
this
.
stepIndex
,
'kkk'
)
this
.
$router
.
push
({
path
:
'/SignMainPage'
,
query
:
{
currentIndex
:
window
.
localStorage
.
getItem
(
'stepIndex'
),
isShowSkip
:
'1'
isShowSkip
:
'1'
,
activityId
:
JSON
.
parse
(
this
.
$route
.
query
.
activityId
),
stepIndex
:
this
.
stepIndex
}
})
},
...
...
@@ -119,20 +114,42 @@ export default {
this
.
$refs
.
checkboxGroup
.
toggleAll
(
this
.
isAll
)
},
onSubmit
()
{
console
.
log
(
this
.
selctOrderData
)
if
(
this
.
selctOrderData
.
lenth
&&
this
.
totalPrice
===
0
)
{
if
(
this
.
selctOrderData
.
length
&&
this
.
totalPrice
===
0
)
{
this
.
$router
.
push
(
'/'
)
}
else
{
this
.
getPayDetail
()
}
},
getPayDetail
()
{
console
.
log
(
this
.
stepOrderInfo
.
list
)
if
(
this
.
stepOrderInfo
.
length
)
{
this
.
stepOrderInfo
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
pay_record
.
pay_status
===
'1'
)
{
const
findIndex
=
this
.
selctOrderData
.
findIndex
(
id
=>
id
.
id
===
item
.
id
)
this
.
selctOrderData
.
splice
(
findIndex
,
1
)
}
})
}
const
params
=
{
pay_record_ids
:
this
.
selctOrderData
.
map
(
item
=>
item
.
pay_record
.
id
).
toString
(),
join_rand
:
this
.
$route
.
query
.
join_rand
}
console
.
log
(
this
.
$route
.
query
.
activity_detail_id
,
'selecer'
)
getPayInfo
(
params
).
then
(
res
=>
{
this
.
payDetail
=
res
.
data
this
.
payDetail
.
order_id
=
res
.
data
.
order_id
this
.
$router
.
push
({
path
:
'/PayDetail'
,
query
:
{
pay_record_ids
:
this
.
selctOrderData
.
map
(
item
=>
item
.
pay_record
.
id
).
toString
(),
join_rand
:
this
.
$route
.
query
.
orderList
.
join_rand
pay_record_ids
:
this
.
payDetail
.
order_id
,
payDetail
:
res
.
data
,
stepIndex
:
this
.
stepIndex
,
activityId
:
JSON
.
parse
(
this
.
$route
.
query
.
activityId
),
activity_detail_id
:
this
.
$route
.
query
.
activity_detail_id
}
})
})
}
},
onClickRight
()
{}
}
}
</
script
>
...
...
@@ -140,12 +157,12 @@ export default {
<
style
lang=
"scss"
scoped
>
.main
{
background-color
:
#f7f7f7
;
height
:
100vh
;
//
height: 100vh;
.main_content
{
padding
:
0
.51rem
0
.3rem
0
.3rem
0
.3rem
;
margin-top
:
0
.9rem
;
.main_content_list
{
padding-bottom
:
0
.6
rem
;
padding-bottom
:
1
.2
rem
;
.main_content_list_card
{
height
:
2
.16rem
;
background
:
#fff
;
...
...
src/modules/home/views/PayDetail.vue
浏览文件 @
b763e22a
...
...
@@ -22,6 +22,18 @@
>
复制链接在浏览器打开去支付
</div>
<div
class=
"main_btn"
>
<van-button
round
class=
"main_btn_order"
@
click=
"$router.push('/')"
v-if=
"parseInt(this.detailList.activity.details.slice(-1).id) === parseInt(this.activity_detail_id)"
>
首页
</van-button
>
<van-button
round
class=
"main_btn_home"
@
click=
"getActivityDetail"
v-else
>
继续报名
</van-button>
<van-button
round
class=
"main_btn_order"
@
click=
"$router.push('/MyOrder')"
>
我的订单
</van-button>
</div>
<div
id=
"value"
>
{{
payDetail
.
url
}}
</div>
</div>
</div>
...
...
@@ -31,7 +43,7 @@
import
QrcodeVue
from
'qrcode.vue'
import
Clipboard
from
'clipboard'
import
{
Toast
}
from
'vant'
import
{
get
PayInfo
,
getPayStatus
}
from
'../api'
import
{
get
ActivityDetail
,
getPayStatus
}
from
'../api'
import
commonheader
from
'../components/Commonheader.vue'
export
default
{
...
...
@@ -45,11 +57,15 @@ export default {
qrcodeUrl
:
''
,
clipboard
:
null
,
status
:
''
,
// 支付状态
payDetail
:
{},
join_rand
:
''
time
:
null
,
detailList
:
{},
activity_detail_id
:
''
}
},
computed
:
{
payDetail
()
{
return
this
.
$route
.
query
.
payDetail
},
pay_record_ids
()
{
return
this
.
$route
.
query
.
pay_record_ids
}
...
...
@@ -77,46 +93,51 @@ export default {
},
getPayStatus
()
{
const
params
=
{
order_id
:
this
.
pay
Detail
.
order_id
order_id
:
this
.
pay
_record_ids
}
getPayStatus
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
status
=
res
.
data
.
status
if
(
this
.
status
===
2
)
{
this
.
$route
.
push
(
'/'
)
if
(
res
.
data
.
status
===
1
)
{
clearInterval
(
this
.
time
)
if
(
this
.
$route
.
query
.
activityId
)
{
this
.
getActivityDetail
()
}
}
}
})
},
get
Pa
yDetail
()
{
if
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
))?.
other_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)
).
other_fill_in
.
list
[
0
].
pay_records
.
join_rand
}
else
if
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
))?.
self_fill_in
?.
list
.
length
)
{
this
.
join_rand
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList
'
)
).
self_fill_in
.
list
[
0
].
pay_records
.
join_rand
get
Activit
yDetail
()
{
this
.
activity_detail_id
=
this
.
$route
.
query
.
activity_detail_id
console
.
log
(
this
.
$route
.
query
.
activityId
,
'activityId'
)
const
params
=
{
id
:
this
.
$route
.
query
.
activityId
}
getActivityDetail
(
params
).
then
(
res
=>
{
this
.
detailList
=
res
.
data
if
(
parseInt
(
this
.
detailList
.
activity
.
details
.
slice
(
-
1
).
id
)
===
parseInt
(
this
.
activity_detail_id
))
{
console
.
log
(
'1111tohome
'
)
this
.
$router
.
push
(
'/'
)
}
else
{
this
.
join_rand
=
this
.
$route
.
query
.
join_rand
||
''
console
.
log
(
this
.
$route
.
query
.
activityId
,
'this.$route.query.activityId'
,
'来了'
)
this
.
$router
.
push
({
path
:
'SignMainPage'
,
query
:
{
activityId
:
this
.
$route
.
query
.
activityId
}
const
params
=
{
pay_record_ids
:
this
.
pay_record_ids
,
join_rand
:
this
.
join_rand
})
}
getPayInfo
(
params
).
then
(
res
=>
{
this
.
payDetail
=
res
.
data
setTimeout
(
this
.
getPayStatus
(),
1000
)
})
}
},
destroyed
()
{
clearInterval
(
this
.
time
)
},
mounted
()
{
this
.
getPayDetail
()
clearInterval
(
this
.
time
)
this
.
time
=
setInterval
(()
=>
{
this
.
getPayStatus
()
},
5000
)
this
.
getQrcodeUrl
()
this
.
initClipboard
()
if
(
this
.
payDetail
.
order_id
)
{
setTimeout
(
this
.
getPayStatus
(),
1000
)
}
}
}
</
script
>
...
...
@@ -156,6 +177,17 @@ export default {
}
}
}
.main_btn
{
display
:
flex
;
justify-content
:
center
;
.main_btn_home
{
background
:
#b80140
;
color
:
#fff
;
}
.main_btn_order
{
margin-left
:
0
.2rem
;
}
}
#value
{
font-size
:
0
.3rem
;
opacity
:
0
;
...
...
src/modules/home/views/SignMainPage.vue
浏览文件 @
b763e22a
...
...
@@ -2,9 +2,18 @@
<div
class=
"main"
>
<commonheader
@
back=
"handlePrev"
:callBack=
"true"
:title=
"title"
/>
<!-- 展示 -->
<img-show
:stepList=
"stepList"
:data=
"setpItem"
@
prev=
"handlePrev"
@
next=
"handleNext"
v-if=
"setpItem.type === 1"
/>
<template
v-if=
"Object.keys(stepList).length"
>
<img-show
:stepList=
"stepList"
:data=
"setpItem"
@
prev=
"handlePrev"
@
next=
"handleNext"
v-if=
"setpItem.type === 1"
/>
<!-- 表单 -->
<sign-form
:myInfoList=
"myInfoList"
:personalInfo=
"detailList.info"
:data=
"setpItem"
:stepList=
"stepList"
:stepIndex=
"stepIndex"
...
...
@@ -12,7 +21,9 @@
@
next=
"handleNext"
v-if=
"setpItem.type === 2"
:isShowSkip=
"isShowSkip"
:detailList=
"detailList"
/>
</
template
>
</div>
</template>
...
...
@@ -20,37 +31,93 @@
import
SignForm
from
'../components/SignForm.vue'
import
ImgShow
from
'../components/ImgShow.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
{
getActivityDetail
}
from
'../api'
export
default
{
components
:
{
SignForm
,
ImgShow
,
Commonheader
},
data
()
{
return
{
title
:
'报名主页面'
,
stepIndex
:
0
,
isShowSkip
:
''
isShowSkip
:
''
,
stepList
:
[],
detailList
:
{
info
:
{}
}
}
},
computed
:
{
stepItemid
()
{
return
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'detailList'
)).
other_fill_in
.
id
},
stepList
()
{
return
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'stepList'
))
},
setpItem
()
{
if
(
this
.
$route
.
query
.
stepIndex
)
{
return
this
.
stepList
[
this
.
$route
.
query
.
stepIndex
]
}
else
{
return
this
.
stepList
[
this
.
stepIndex
]
}
}
},
mounted
()
{
// this.stepIndex = window.localStorage.getItem('stepIndex')
this
.
activity_detail_id
=
this
.
$route
.
query
.
activity_detail_id
if
(
this
.
$route
.
query
.
isShowSkip
)
{
this
.
isShowSkip
=
this
.
$route
.
query
.
isShowSkip
}
else
{
this
.
isShowSkip
=
''
}
this
.
getActivityDetail
()
},
methods
:
{
// 获取活动详情
getActivityDetail
()
{
console
.
log
(
this
.
$route
.
query
.
activityId
)
const
params
=
{
id
:
this
.
$route
.
query
.
id
||
this
.
$route
.
query
.
activityId
}
getActivityDetail
(
params
).
then
(
res
=>
{
this
.
detailList
=
res
.
data
this
.
myInfoList
=
res
.
data
.
other_fill_in
.
list
console
.
log
(
this
.
detailList
.
activity
.
details
.
slice
(
-
1
),
'0000'
)
if
(
this
.
detailList
.
other_fill_in
.
need_fill_in_status
)
{
this
.
detailList
.
activity
.
details
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
detailList
.
other_fill_in
.
need_fill_in_id
)
{
const
details
=
this
.
detailList
.
activity
.
details
.
indexOf
(
item
)
if
(
details
===
0
)
{
this
.
stepList
=
res
.
data
.
activity
.
details
console
.
log
(
this
.
stepList
,
'1'
)
}
else
if
(
details
>
0
)
{
console
.
log
(
details
,
'details'
)
this
.
stepList
=
this
.
detailList
.
activity
.
details
.
splice
(
details
)
console
.
log
(
this
.
stepList
,
'2'
)
}
}
})
}
else
{
if
(
this
.
detailList
.
self_fill_in
.
need_fill_in_status
)
{
this
.
detailList
.
activity
.
details
.
forEach
(
item
=>
{
if
(
item
.
id
===
this
.
detailList
.
self_fill_in
.
need_fill_in_id
)
{
const
details
=
this
.
detailList
.
activity
.
details
.
indexOf
(
item
)
if
(
details
===
0
)
{
this
.
stepList
=
res
.
data
.
activity
.
details
console
.
log
(
this
.
stepList
,
'3'
)
}
else
if
(
details
>
0
)
{
console
.
log
(
details
,
'details1'
)
this
.
stepList
=
this
.
detailList
.
activity
.
details
.
splice
(
details
)
console
.
log
(
this
.
stepList
,
'4'
)
}
}
})
}
else
{
this
.
stepList
=
res
.
data
.
activity
.
details
console
.
log
(
this
.
stepList
,
'5'
)
}
}
const
newIndex
=
this
.
stepList
.
findIndex
(
item
=>
{
return
item
.
id
===
this
.
$route
.
query
.
activity_detail_id
})
if
(
this
.
$route
.
query
.
stepIndex
)
{
this
.
stepIndex
=
parseInt
(
this
.
$route
.
query
.
stepIndex
)
}
else
{
this
.
stepIndex
=
newIndex
<
0
?
0
:
newIndex
}
})
},
handlePrev
()
{
// this.stepIndex--
if
(
this
.
stepIndex
<=
0
)
{
this
.
$router
.
push
(
'/'
)
}
else
{
...
...
src/store/index.js
浏览文件 @
b763e22a
...
...
@@ -9,10 +9,7 @@ const store = new Vuex.Store({
user
:
{},
allSettings
:
{},
stepIndex
:
0
,
detailList
:
{},
stepResult
:
[],
stepForm
:
[],
stepOrderInfo
:
{}
stepResult
:
[]
},
mutations
:
{
setUser
(
state
,
user
)
{
...
...
@@ -24,17 +21,9 @@ const store = new Vuex.Store({
saveStepIndex
(
state
,
stepIndex
)
{
state
.
stepIndex
=
stepIndex
},
setDetailList
(
state
,
detailList
)
{
state
.
detailList
=
detailList
},
setStepResult
(
state
,
stepResult
)
{
state
.
stepResult
=
stepResult
},
setFormList
(
state
,
stepForm
)
{
state
.
stepForm
=
stepForm
},
setStepOrderInfo
(
state
,
stepOrderInfo
)
{
state
.
stepOrderInfo
=
stepOrderInfo
}
},
actions
:
{
...
...
src/utils/formList.js
浏览文件 @
b763e22a
...
...
@@ -14,7 +14,8 @@ const allFormList = [
name
:
'性别'
,
key
:
'gender'
,
required
:
true
,
optionlist
:
[
value
:
'0'
,
optionList
:
[
{
id
:
'0'
,
option
:
'未知'
},
{
id
:
'1'
,
option
:
'男'
},
{
id
:
'2'
,
option
:
'女'
}
...
...
@@ -136,7 +137,7 @@ const allFormList = [
name
:
'早餐'
,
key
:
'breakfast'
,
placeholder
:
'请选择早餐'
,
r
ue
:
''
,
val
ue
:
''
,
required
:
true
,
optionList
:
[
'有'
,
'无'
],
showPicker
:
false
...
...
vite.config.js
浏览文件 @
b763e22a
...
...
@@ -15,7 +15,8 @@ export default defineConfig({
},
proxy
:
{
'/api/highway'
:
{
target
:
'http://localhost-activity-frontend.ezijing.com'
,
// target: 'http://localhost-activity-frontend.ezijing.com',
target
:
'https://activity-frontend-api.ezijing.com'
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
highway/
,
''
)
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论