Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
14224f92
authored
2025-07-07 11:54:13 +0800
by
华明祺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
购票状态的相关调整
1 parent
ec06da2a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
50 deletions
src/viewsPc/booking/ticket/confirmOrder.vue
src/viewsPc/booking/ticket/index.vue
vite.config.js
src/viewsPc/booking/ticket/confirmOrder.vue
View file @
14224f9
src/viewsPc/booking/ticket/index.vue
View file @
14224f9
...
...
@@ -74,12 +74,12 @@
:key=
"index"
:class=
"[
it.id == selectForm.latId ? 'tagActive' : 'tag',
it.
disabled
? 'forbid' : '',
it.ticketPackage==1&& tickArr?.length<=0
?'forbid':''
it.
overdueView=='0'
? 'forbid' : '',
(it.ticketPackage==1 && overdueView=='0')
?'forbid':''
]"
@
click=
"select(it)"
>
{{ it.ticketTypeName }}
{{ it.disabled }}
<span
v-if=
"it.ticketPackage==1"
class=
"tao"
>
{{
{{ it.ticketTypeName }}
<span
v-if=
"it.ticketPackage==1"
class=
"tao"
>
{{
language == 0 ? '套票' : 'Package ticket'
}}
</span>
</div>
...
...
@@ -153,17 +153,6 @@
<div
class=
"label"
>
{{ triggerLanguage(language, "票型", "Ticket Type") }} :
</div>
<div>
<!-- <span-->
<!-- v-if="currTick?.images"-->
<!-- style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px"-->
<!-- @click="showUrl=currTick.images;show=true"-->
<!-- > <span style="color: red;font-size: 18px">*</span>-->
<!-- {{-->
<!-- language == 0 ? '点击查看区域布局' : 'View Area Layout'-->
<!-- }}-->
<!-- </span>-->
</div>
</div>
<div
class=
"select_item_box"
>
<div
class=
"select_item"
>
...
...
@@ -221,22 +210,26 @@
</div>
<div
v-if=
"
endTime<=0||tickArr?.length<=0
"
class=
"btn"
v-if=
"
isOver
"
class=
"btn"
style=
"margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
@
click=
"toSelectClosed"
>
{{
triggerLanguage(language, "售票结束", "Sale closed")
}}
</div>
<
template
v-else
>
<div
v-if=
"leftCount
<
=0
&&
leftCount!=-999" class="btn" style="margin-left: 40px;margin-top: 10px">
{{
triggerLanguage
(
language
,
"票已售罄"
,
"Sale out"
)
}}
</div>
<div
v-else
class=
"btn"
style=
"margin-left: 40px;margin-top: 10px"
@
click=
"toSelectSeat()"
>
{{
triggerLanguage
(
language
,
"立即购票"
,
"Buy tickets now"
)
}}
</div>
</
template
>
</div>
</div>
</div>
...
...
@@ -273,8 +266,9 @@ import {
checkNonPayment
,
getStadiumList
,
getActivityTypeVoListByLatsId
,
getBaseInfoByActiveId
getBaseInfoByActiveId
,
getListByAtstId
}
from
'@/apiPc/booking'
import
_
from
'lodash'
import
{
dayjs
}
from
'element-plus'
...
...
@@ -314,7 +308,9 @@ const tickList = ref([])
const
currVenue
=
ref
(
null
)
const
currTick
=
ref
(
null
)
const
matchData
=
ref
({})
const
tickArr
=
ref
([])
const
overdueView
=
ref
(
'1'
)
const
isOver
=
ref
(
false
)
const
leftCount
=
ref
(
-
999
)
watch
(
show
,
(
val
)
=>
{
if
(
!
val
)
{
...
...
@@ -328,7 +324,7 @@ getDetail()
async
function
getDetail
()
{
const
res
=
await
getTicketInfoByActivityId
({
activityId
:
activeId
.
value
})
matchForm
.
value
=
res
.
data
console
.
log
(
res
)
//
console.log(res)
const
today
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
timeData
.
value
=
dayjs
(
res
.
data
.
ticketStart
).
diff
(
today
,
'millisecond'
)
endTime
.
value
=
dayjs
(
res
.
data
.
ticketEnd
).
diff
(
today
,
'millisecond'
)
...
...
@@ -344,24 +340,18 @@ async function getTicketList() {
activityId
:
activeId
.
value
,
status
:
1
})
tickClass
.
value
=
res
.
rows
if
(
tickClass
.
value
.
length
>
0
)
{
const
nowDay
=
dayjs
().
format
(
'YYYY-MM-DD'
)
tickArr
.
value
=
[]
for
(
const
val
of
tickClass
.
value
)
{
const
tickDay
=
dayjs
(
val
.
name
).
format
(
'YYYY-MM-DD'
)
if
(
tickDay
<
nowDay
)
{
val
.
disabled
=
true
}
else
{
val
.
disabled
=
false
if
(
val
.
ticketPackage
!=
1
)
{
tickArr
.
value
.
push
(
val
)
}
}
if
(
_
.
some
(
tickClass
.
value
,
(
item
)
=>
item
.
overdueView
==
'0'
)
)
{
overdueView
.
value
=
'0'
}
if
(
tickArr
.
value
.
length
>
0
)
{
selectForm
.
value
.
latId
=
tickArr
.
value
?.[
0
]?.
id
const
item
=
_
.
find
(
tickClass
.
value
,
(
item
)
=>
item
.
overdueView
==
'1'
)
if
(
item
)
{
selectForm
.
value
.
latId
=
item
.
id
await
getVenueList
()
}
}
else
{
isOver
.
value
=
true
}
}
...
...
@@ -380,14 +370,13 @@ async function getTicketListType() {
const
res
=
await
getActivityTypeVoListByLatsId
({
latsId
:
selectForm
.
value
.
latsId
})
tickList
.
value
=
res
.
data
selectForm
.
value
.
sessionType
=
Object
.
keys
(
res
.
data
)[
0
]
console
.
log
(
tickList
.
value
)
// currTick.value = tickList.value[selectForm.value.sessionType][0]
// selectForm.value.latstId = currTick.value?.id
// selectForm.value.price = currTick.value?.price
// selectForm.value.priceEn = currTick.value?.priceEn
}
function
select
(
v
)
{
if
(
v
.
id
==
selectForm
.
value
.
latId
)
{
return
}
selectForm
.
value
.
latId
=
v
.
id
selectForm
.
value
.
latsId
=
null
selectForm
.
value
.
sessionType
=
null
...
...
@@ -395,11 +384,16 @@ function select(v) {
selectForm
.
value
.
id
=
null
selectForm
.
value
.
price
=
'--'
selectForm
.
value
.
priceEn
=
'--'
currTick
.
value
=
null
getVenueList
()
}
function
selectVenue
(
v
)
{
if
(
v
.
id
==
selectForm
.
value
.
latsId
)
{
return
}
currVenue
.
value
=
v
selectForm
.
value
.
latsId
=
v
.
id
selectForm
.
value
.
sessionType
=
null
...
...
@@ -408,27 +402,51 @@ function selectVenue(v) {
selectForm
.
value
.
price
=
'--'
selectForm
.
value
.
priceEn
=
'--'
remarks
.
value
=
v
.
remarks
currTick
.
value
=
null
getTicketListType
()
}
function
selectSessionType
(
key
)
{
if
(
key
==
selectForm
.
value
.
sessionType
)
{
return
}
selectForm
.
value
.
sessionType
=
key
// currTick.value = tickList.value[selectForm.value.sessionType][0]
selectForm
.
value
.
latstId
=
currTick
.
value
?.
id
selectForm
.
value
.
price
=
currTick
.
value
?.
price
selectForm
.
value
.
priceEn
=
currTick
.
value
?.
priceEn
currTick
.
value
=
null
}
// 选择票型
function
selectTick
(
v
)
{
if
(
v
.
id
==
selectForm
.
value
.
latstId
)
{
return
}
currTick
.
value
=
v
selectForm
.
value
.
latstId
=
v
.
id
selectForm
.
value
.
price
=
v
.
price
selectForm
.
value
.
priceEn
=
v
.
priceEn
// console.log(v)
checkNonPayment
().
then
(
res
=>
{
if
(
res
.
data
)
{
getListByAtstId
({
atstId
:
selectForm
.
value
.
latstId
}).
then
(
res
=>
{
leftCount
.
value
=
res
.
data
if
(
leftCount
.
value
>
0
)
{
showUrl
.
value
=
v
.
images
show
.
value
=
true
}
})
}
else
{
leftCount
.
value
=
-
999
}
})
}
function
toSelectSeat
()
{
...
...
@@ -470,7 +488,7 @@ function toSelectClosed() {
async
function
getmatchData
()
{
const
res
=
await
getBaseInfoByActiveId
(
route
.
params
.
activeId
)
matchData
.
value
=
res
.
data
console
.
log
(
res
)
//
console.log(res)
}
function
handleImage
()
{
...
...
vite.config.js
View file @
14224f9
...
...
@@ -64,8 +64,8 @@ export default defineConfig(({ mode, command }) => {
proxy
:
{
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api/ztx-train'
:
{
//
target: 'http://192.168.1.118:1896/stage-api',
target
:
'https://jijin.wtwuxicenter.com/stage-api'
,
target
:
'http://192.168.1.118:1896/stage-api'
,
//
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-train/
,
''
)
},
...
...
@@ -77,15 +77,15 @@ export default defineConfig(({ mode, command }) => {
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-match/
,
''
)
},
'/dev-api/ztx-webSite'
:
{
//
target: 'http://192.168.1.118:8081',
target
:
'https://jijin.wtwuxicenter.com/stage-api'
,
target
:
'http://192.168.1.118:8081'
,
//
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-webSite/
,
''
)
},
'/dev-api'
:
{
// target: 'http://192.168.1.213:8081/',
//
target: 'http://192.168.1.118:8081',
target
:
'https://jijin.wtwuxicenter.com/stage-api'
,
target
:
'http://192.168.1.118:8081'
,
//
target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api/
,
''
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment