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
355309ac
提交
355309ac
authored
3月 25, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
bf0833ac
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
72 行增加
和
44 行删除
+72
-44
Commonheader.vue
src/modules/home/components/Commonheader.vue
+9
-2
Index.vue
src/modules/home/views/Index.vue
+6
-6
MyOrder.vue
src/modules/home/views/MyOrder.vue
+7
-2
OrderConfirm.vue
src/modules/home/views/OrderConfirm.vue
+8
-3
PayDetail.vue
src/modules/home/views/PayDetail.vue
+3
-5
SignMainPage.vue
src/modules/home/views/SignMainPage.vue
+28
-3
index.js
src/store/index.js
+1
-12
axios.js
src/utils/axios.js
+2
-2
beforeEnter.js
src/utils/beforeEnter.js
+7
-7
vite.config.js
vite.config.js
+1
-2
没有找到文件。
src/modules/home/components/Commonheader.vue
浏览文件 @
355309ac
...
@@ -31,8 +31,15 @@ export default {
...
@@ -31,8 +31,15 @@ export default {
this
.
callBack
?
this
.
$emit
(
'back'
)
:
history
.
back
()
this
.
callBack
?
this
.
$emit
(
'back'
)
:
history
.
back
()
},
},
// 右侧按钮 个人中心
// 右侧按钮 个人中心
onClickRight
()
{
this
.
$router
.
push
(
'/PersonalCenter'
)
async
onClickRight
()
{
// 未登录
const
isLogin
=
this
.
$store
.
state
.
user
.
id
||
(
await
this
.
$store
.
dispatch
(
'checkLogin'
))
if
(
!
isLogin
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
}
else
{
this
.
$router
.
push
(
'/PersonalCenter'
)
}
}
}
}
}
}
}
...
...
src/modules/home/views/Index.vue
浏览文件 @
355309ac
...
@@ -98,7 +98,7 @@ export default {
...
@@ -98,7 +98,7 @@ export default {
getActivityList
()
{
getActivityList
()
{
const
params
=
{
const
params
=
{
page
:
this
.
currentPage
,
page
:
this
.
currentPage
,
'
per-page'
:
50
'
per-page'
:
'50'
}
}
getActivityList
(
params
).
then
(
res
=>
{
getActivityList
(
params
).
then
(
res
=>
{
this
.
activityList
=
res
.
data
.
list
this
.
activityList
=
res
.
data
.
list
...
@@ -106,13 +106,13 @@ export default {
...
@@ -106,13 +106,13 @@ export default {
})
})
},
},
// 报名
// 报名
handleSignCheck
(
item
)
{
async
handleSignCheck
(
item
)
{
// 未登录
// 未登录
if
(
!
this
.
$store
.
state
.
user
)
{
const
isLogin
=
this
.
$store
.
state
.
user
.
id
||
(
await
this
.
$store
.
dispatch
(
'checkLogin'
))
if
(
!
isLogin
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
}
else
{
}
else
{
this
.
getActivityDetail
(
item
)
this
.
getActivityDetail
(
item
)
//
}
}
},
},
// 获取活动详情
// 获取活动详情
...
@@ -176,9 +176,9 @@ export default {
...
@@ -176,9 +176,9 @@ export default {
}
}
}
}
}
else
if
(
time
>
endTime
)
{
}
else
if
(
time
>
endTime
)
{
Toast
(
'该活动已结束,无法报名'
)
Toast
(
`该活动已于
${
item
.
end_time
}
结束报名`
)
}
else
if
(
time
<
startTime
)
{
}
else
if
(
time
<
startTime
)
{
Toast
(
'该活动尚未开始,暂无法报名'
)
Toast
(
`该活动已于
${
item
.
start_time
}
开始报名`
)
}
}
}
}
},
},
...
...
src/modules/home/views/MyOrder.vue
浏览文件 @
355309ac
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
<div
class=
"orderList_con_left_tit"
>
{{
item
.
activity
.
name
}}
</div>
<div
class=
"orderList_con_left_tit"
>
{{
item
.
activity
.
name
}}
</div>
<div
class=
"orderList_con_left_num"
>
人数:
{{
item
.
count
}}
</div>
<div
class=
"orderList_con_left_num"
>
人数:
{{
item
.
count
}}
</div>
</div>
</div>
<div
class=
"orderList_con_price"
>
¥
{{
item
.
amount
.
toFixed
(
2
)
}}
</div>
<div
class=
"orderList_con_price"
v-html=
"getTotalPrice(item)"
>
</div>
</div>
</div>
<div
class=
"orderList_pay"
>
<div
class=
"orderList_pay"
>
<div
class=
"orderList_pay_tit"
>
需付款:
</div>
<div
class=
"orderList_pay_tit"
>
需付款:
</div>
<div
class=
"orderList_pay_price"
>
{{
item
.
amount
.
toFixed
(
2
)
}}
</div>
<div
class=
"orderList_pay_price"
v-html=
"getTotalPrice(item)"
>
</div>
</div>
</div>
<div
class=
"orderList_btn"
>
<div
class=
"orderList_btn"
>
<van-button
<van-button
...
@@ -76,6 +76,11 @@ export default {
...
@@ -76,6 +76,11 @@ export default {
},
},
methods
:
{
methods
:
{
getTotalPrice
(
item
)
{
const
splitPrice
=
item
.
amount
.
toFixed
(
2
).
split
(
'.'
)
// //2.重新赋值
return
`¥ <span style="font-size:0.34rem;">
${
splitPrice
[
0
]}
</span>.<span style="font-size:0.2rem;">
${
splitPrice
[
1
]}
</span>`
},
getOrderList
()
{
getOrderList
()
{
getOrderList
().
then
(
res
=>
{
getOrderList
().
then
(
res
=>
{
this
.
orderList
=
res
.
data
this
.
orderList
=
res
.
data
...
...
src/modules/home/views/OrderConfirm.vue
浏览文件 @
355309ac
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
import
{
getPayInfo
}
from
'../api'
import
{
getPayInfo
}
from
'../api'
import
PayDetail
from
'./PayDetail.vue'
import
PayDetail
from
'./PayDetail.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
Commonheader
from
'../components/Commonheader.vue'
import
{
Toast
}
from
'vant'
export
default
{
export
default
{
components
:
{
Commonheader
,
PayDetail
},
components
:
{
Commonheader
,
PayDetail
},
props
:
{
props
:
{
...
@@ -155,9 +156,13 @@ export default {
...
@@ -155,9 +156,13 @@ export default {
}
}
console
.
log
(
this
.
data
,
'selecer'
)
console
.
log
(
this
.
data
,
'selecer'
)
getPayInfo
(
params
).
then
(
res
=>
{
getPayInfo
(
params
).
then
(
res
=>
{
this
.
payDetail
=
Object
.
assign
({
qrData
:
res
.
data
},
this
.
data
)
if
(
res
.
code
===
0
)
{
this
.
payDetail
.
order_id
=
res
.
data
.
order_id
this
.
payDetail
=
Object
.
assign
({
qrData
:
res
.
data
},
this
.
data
)
this
.
isQrPageShow
=
true
this
.
payDetail
.
order_id
=
res
.
data
.
order_id
this
.
isQrPageShow
=
true
}
// 订单为0元时,判断该步骤后面是否有步骤,若有就去下一步骤,否则返回首页
res
.
code
===
100
&&
this
.
stepList
.
length
===
this
.
data
.
num
?
this
.
$router
.
push
(
'/'
)
:
this
.
$emit
(
'next'
)
})
})
}
}
}
}
...
...
src/modules/home/views/PayDetail.vue
浏览文件 @
355309ac
...
@@ -15,11 +15,7 @@
...
@@ -15,11 +15,7 @@
ref=
"copy"
ref=
"copy"
@
click=
"initClipboard"
@
click=
"initClipboard"
type=
"text"
type=
"text"
><img
><img
class=
"link_img"
src=
"https://webapp-pub.ezijing.com/highway/h5/ilink.png"
/>
支付链接
</el-button
class=
"link_img"
src=
"https://webapp-pub.oss-c1024
n-beijing.aliyuncs.com/highway/h5/ilink.png"
/>
支付链接
</el-button
>
>
复制链接在浏览器打开去支付
复制链接在浏览器打开去支付
</div>
</div>
...
@@ -160,6 +156,8 @@ export default {
...
@@ -160,6 +156,8 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
margin
:
1
.2rem
0
.3rem
0
.64rem
0
.3rem
;
margin
:
1
.2rem
0
.3rem
0
.64rem
0
.3rem
;
border-radius
:
0
.2rem
;
.main_content_desc
{
.main_content_desc
{
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
font-weight
:
400
;
font-weight
:
400
;
...
...
src/modules/home/views/SignMainPage.vue
浏览文件 @
355309ac
...
@@ -3,7 +3,13 @@
...
@@ -3,7 +3,13 @@
<!--
<commonheader
@
back=
"handlePrev"
:callBack=
"true"
/>
-->
<!--
<commonheader
@
back=
"handlePrev"
:callBack=
"true"
/>
-->
<!-- 展示 -->
<!-- 展示 -->
<template
v-if=
"Object.keys(stepList).length"
>
<template
v-if=
"Object.keys(stepList).length"
>
<img-show
:stepList=
"stepList"
:data=
"setpItem"
@
prev=
"handlePrev"
@
next=
"handleNext"
v-if=
"setpItem.type === 1"
/>
<img-show
:stepList=
"stepList"
:data=
"setpItem"
@
prev=
"handlePrev"
@
next=
"handleNext"
v-if=
"setpItem.type === 1"
/>
<!-- 表单 -->
<!-- 表单 -->
<sign-form
<sign-form
:data=
"setpItem"
:data=
"setpItem"
...
@@ -25,12 +31,12 @@
...
@@ -25,12 +31,12 @@
</template>
</template>
<
script
>
<
script
>
import
{
Dialog
}
from
'vant'
import
allFormList
from
'@/utils/formList'
import
allFormList
from
'@/utils/formList'
import
SignForm
from
'../components/SignForm.vue'
import
SignForm
from
'../components/SignForm.vue'
import
ImgShow
from
'../components/ImgShow.vue'
import
ImgShow
from
'../components/ImgShow.vue'
import
OrderConfirm
from
'./OrderConfirm.vue'
import
OrderConfirm
from
'./OrderConfirm.vue'
// import Commonheader from '../components/Commonheader.vue'
import
{
getActivityDetail
}
from
'../api'
import
{
getActivityDetail
}
from
'../api'
export
default
{
export
default
{
...
@@ -61,6 +67,25 @@ export default {
...
@@ -61,6 +67,25 @@ export default {
getActivityDetail
()
{
getActivityDetail
()
{
getActivityDetail
({
id
:
this
.
$route
.
query
.
id
}).
then
(
res
=>
{
getActivityDetail
({
id
:
this
.
$route
.
query
.
id
}).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
// 复制链接进入活动时,判断活动报名时间弹窗
const
time
=
new
Date
().
getTime
()
const
startTime
=
new
Date
(
data
.
activity
.
start_time
).
getTime
()
const
endTime
=
new
Date
(
data
.
activity
.
end_time
).
getTime
()
if
(
startTime
>
time
||
endTime
<
time
)
{
Dialog
.
alert
({
title
:
'提示'
,
message
:
`该活动已于
${
data
.
activity
.
start_time
}
开始报名`
}).
then
(()
=>
{
this
.
$router
.
push
(
'/'
)
})
}
else
if
(
endTime
<
time
)
{
Dialog
.
alert
({
title
:
'提示'
,
message
:
`该活动已于
${
data
.
activity
.
end_time
}
结束报名`
}).
then
(()
=>
{
this
.
$router
.
push
(
'/'
)
})
}
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'
)
...
...
src/store/index.js
浏览文件 @
355309ac
import
Vue
from
'vue'
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
Vuex
from
'vuex'
import
{
getUser
,
logout
,
getAllSetting
}
from
'@/api/base'
import
{
getUser
,
logout
}
from
'@/api/base'
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
const
store
=
new
Vuex
.
Store
({
const
store
=
new
Vuex
.
Store
({
state
:
{
state
:
{
user
:
{},
user
:
{},
allSettings
:
{},
stepIndex
:
0
,
stepIndex
:
0
,
stepResult
:
[]
stepResult
:
[]
},
},
...
@@ -15,9 +14,6 @@ const store = new Vuex.Store({
...
@@ -15,9 +14,6 @@ const store = new Vuex.Store({
setUser
(
state
,
user
)
{
setUser
(
state
,
user
)
{
state
.
user
=
user
state
.
user
=
user
},
},
setAllSettings
(
state
,
allSettings
)
{
state
.
allSettings
=
allSettings
},
saveStepIndex
(
state
,
stepIndex
)
{
saveStepIndex
(
state
,
stepIndex
)
{
state
.
stepIndex
=
stepIndex
state
.
stepIndex
=
stepIndex
},
},
...
@@ -56,14 +52,7 @@ const store = new Vuex.Store({
...
@@ -56,14 +52,7 @@ const store = new Vuex.Store({
return
false
return
false
})
})
return
isLogin
return
isLogin
},
// 获取所有项目列表
getAllSetting
({
commit
})
{
getAllSetting
().
then
(
res
=>
{
commit
(
'setAllSettings'
,
res
.
data
)
})
}
}
}
}
})
})
store
.
dispatch
(
'getAllSetting'
)
export
default
store
export
default
store
src/utils/axios.js
浏览文件 @
355309ac
...
@@ -50,7 +50,7 @@ httpRequest.interceptors.request.use(
...
@@ -50,7 +50,7 @@ httpRequest.interceptors.request.use(
httpRequest
.
interceptors
.
response
.
use
(
httpRequest
.
interceptors
.
response
.
use
(
function
(
response
)
{
function
(
response
)
{
const
{
data
}
=
response
const
{
data
}
=
response
if
(
data
.
code
)
{
if
(
data
.
code
&&
data
.
code
!==
100
)
{
// 未登录
// 未登录
if
(
data
.
code
===
4001
)
{
if
(
data
.
code
===
4001
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
...
@@ -64,7 +64,7 @@ httpRequest.interceptors.response.use(
...
@@ -64,7 +64,7 @@ httpRequest.interceptors.response.use(
Message
({
message
:
'没有操作权限'
,
type
:
'error'
})
Message
({
message
:
'没有操作权限'
,
type
:
'error'
})
return
data
return
data
}
}
Message
({
message
:
data
.
m
essage
,
type
:
'error'
})
Message
({
message
:
data
.
m
sg
,
type
:
'error'
})
return
Promise
.
reject
(
data
)
return
Promise
.
reject
(
data
)
}
}
return
data
return
data
...
...
src/utils/beforeEnter.js
浏览文件 @
355309ac
import
store
from
'@/store'
//
import store from '@/store'
export
default
async
function
(
to
,
from
,
next
)
{
export
default
async
function
(
to
,
from
,
next
)
{
// if (to.meta.requiredLogin) {
// if (to.meta.requiredLogin) {
// } else {
// } else {
// next()
// next()
// }
// }
const
isLogin
=
store
.
state
.
user
.
id
||
(
await
store
.
dispatch
(
'checkLogin'
))
//
const isLogin = store.state.user.id || (await store.dispatch('checkLogin'))
if
(
!
isLogin
)
{
//
if (!isLogin) {
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
//
window.location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(window.location.href)}`
}
else
{
//
} else {
next
()
next
()
}
//
}
}
}
vite.config.js
浏览文件 @
355309ac
...
@@ -15,10 +15,9 @@ export default defineConfig({
...
@@ -15,10 +15,9 @@ export default defineConfig({
},
},
proxy
:
{
proxy
:
{
'/api/register'
:
{
'/api/register'
:
{
// target: 'http://localhost-activity-frontend.ezijing.com',
target
:
'http://localhost-activity-frontend.ezijing.com'
,
target
:
'http://localhost-activity-frontend.ezijing.com'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
highway
/
,
''
)
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
register
/
,
''
)
},
},
'/api'
:
'https://app.ezijing.com'
'/api'
:
'https://app.ezijing.com'
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论