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
8a5a4ea6
authored
2024-08-08 14:24:22 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
票务
1 parent
3544a940
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
140 deletions
src/viewsPc/booking/pay.vue
src/viewsPc/booking/payOk.vue
src/viewsPc/booking/ticket/confirmOrder.vue
src/viewsPc/booking/ticket/index.vue
src/viewsPc/center/myCanKP.vue
vite.config.js
src/viewsPc/booking/pay.vue
View file @
8a5a4ea
...
...
@@ -647,8 +647,6 @@ async function getTicketOrderInfoFN() {
}
finally
{
}
console
.
log
(
form
.
value
)
}
...
...
@@ -705,6 +703,17 @@ function startforGetData() {
startforGetData
()
}
})
}
else
if
(
type
.
value
==
'ticket'
)
{
getTicketOrderInfoFN
().
then
(
res
=>
{
if
(
form
.
value
.
payDate
)
{
if
(
handle
)
{
clearTimeout
(
handle
)
handle
=
null
}
}
else
{
startforGetData
()
}
})
}
else
{
getData
().
then
(
res
=>
{
if
(
form
.
value
.
payDate
)
{
...
...
src/viewsPc/booking/payOk.vue
View file @
8a5a4ea
<
template
>
<div>
<div
class=
"box"
>
<el-card
class=
"mb60 mt30"
v-loading=
"loading
"
>
<el-card
v-loading=
"loading"
class=
"mb60 mt30
"
>
<div
class=
"text-center mt30"
>
<el-icon
color=
"#32B16C"
size=
"80"
>
<SuccessFilled/>
</el-icon>
<p
class=
"text-success mb20"
>
{{
language
==
0
?
'支付成功'
:
'successfully!'
}}
</p>
<el-button
type=
"primary"
class=
"btn-lineG mb60"
@
click=
"goBillDetail"
round
>
<el-button
class=
"btn-lineG mb60"
round
type=
"primary"
@
click=
"goBillDetail"
>
{{
language
==
0
?
'返回订单详情'
:
'Return order details'
}}
</el-button>
</div>
...
...
@@ -26,13 +26,13 @@ import {useStorage} from "@vueuse/core/index";
const
route
=
useRoute
()
const
router
=
useRouter
()
const
language
=
useStorage
(
'language'
,
0
)
const
language
=
useStorage
(
'language'
,
0
)
const
orderId
=
ref
(
route
.
query
.
orderId
)
const
type
=
ref
(
''
)
const
loading
=
ref
(
false
)
onMounted
(()
=>
{
var
code
=
decodeURIComponent
(
orderId
.
value
)
let
code
=
decodeURIComponent
(
orderId
.
value
)
console
.
log
(
code
)
loading
.
value
=
true
callbackPalPay
(
code
).
then
(
res
=>
{
...
...
@@ -52,6 +52,6 @@ function goBillDetail() {
}
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
</
style
>
...
...
src/viewsPc/booking/ticket/confirmOrder.vue
View file @
8a5a4ea
...
...
@@ -142,7 +142,7 @@ import {
listApi
,
getTicketListApi
,
getTicketInfoByActivityId
,
}
from
'@/apiPc/booking'
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
languageFormat
}
from
"@/viewsPc/seat/utils/language.js"
;
import
useUserStore
from
"/@/store/modules/user"
;
import
{
useStorage
}
from
"@vueuse/core/index"
;
...
...
@@ -208,110 +208,6 @@ const formRef = ref(null)
const
TickForm
=
ref
({})
let
timer
=
null
;
// const payment = reactive({
// showCodeDialog: false,
// btn_loading: false,
// form: {
// viewers: [],
// phone: "",
// },
// qrInfo: {},
// qrCodeData: "",
// paymentHandle() {
// if (payment.form.viewers.length != order.data?.seatInfo?.length)
// return ElMessage({
// type: "warning",
// message: languageFormat(
// language.value,
// "观看人与购买票数不符",
// "The number of viewers does not match the number of tickets purchased."
// ),
// });
// if (!payment.form.phone)
// return ElMessage({
// type: "warning",
// message: languageFormat(
// language.value,
// "请输入联系电话",
// "Please enter the contact phone number."
// ),
// });
// // if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(payment.form.phone)) {
// // return ElMessage({
// // type: "warning",
// // message: languageFormat(
// // language.value,
// // "联系电话格式不正确",
// // "The format of the contact phone is incorrect."
// // ),
// // });
// // }
// loading.value = true
// payOrder({
// contactPhone: payment.form.phone,
// customerIds: payment.form.viewers,
// orderToken: order.data?.orderToken,
// payType: language.value == 0 ? 1 : 2,
// paymentAmount: order.data?.paymentAmount,
// }).then((res) => {
// if (res.data.language == "zh-cn") {
// payment.qrInfo = res.data;
// qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
// if (url) {
// payment.qrCodeData = url;
// }
// });
// payment.showCodeDialog = true;
// startCheckSuccessListener(res.data.orderSn, props.activityId);
// } else {
// // TODO:这里是英文环境支付
// location.href = res.data.scanCodeUrl
// }
// }).finally(() => {
// loading.value = false
// });
// },
// handleCloce() {
// payment.showCodeDialog = false;
// payment.qrCodeData = "";
// clearInterval(timer);
// timer = null;
// router.replace({
// path: "/seat/order",
// });
// },
// });
// const order = reactive({
// data: null,
// fetchData() {
// confirmOrder({
// actId: props.activityId,
// openType: route.query.openType,
// sessionId: route.query.sessionId,
// sitePlace: route.query.sitePlace,
// ticketType: route.query.ticketType,
// seatIds: route.query.seatIds.split(","),
// }).then((res) => {
// this.data = res.data;
// });
// },
// });
// const audience = reactive({
// data: [],
// fetchData() {
// viewPeopleList().then((res) => {
// audience.data = res.data;
// });
// },
// });
// audience.fetchData();
// order.fetchData();
customerList
()
function
changeGroup
()
{
...
...
@@ -359,10 +255,27 @@ async function paymentHandle() {
}
await
formRef
.
value
.
validate
()
await
ElMessageBox
.
confirm
(
language
.
value
==
0
?
'确认提交订单吗?'
:
'Confirm to submit the order?'
,
{
confirmButtonText
:
language
.
value
==
0
?
'确定'
:
'Confirm'
,
cancelButtonText
:
language
.
value
==
0
?
'取消'
:
'Cancel'
,
type
:
'warning'
}).
then
(
async
()
=>
{
const
res
=
await
submitOrderTicket
(
orderForm
.
value
)
if
(
res
.
code
==
200
)
{
ElMessage
.
success
(
'提交成功'
)
}
if
(
res
.
code
==
200
&&
res
.
data
.
orderId
>
0
)
{
// 去付钱
router
.
push
({
name
:
'bookingPay'
,
query
:
{
orderId
:
res
.
data
.
orderId
,
money
:
res
.
data
.
total
,
type
:
'ticket'
}
})
}
else
{
ElMessage
.
warning
(
language
.
value
==
0
?
'下单失败,'
:
'Order failure'
)
}
})
}
async
function
getDetail
()
{
...
...
src/viewsPc/booking/ticket/index.vue
View file @
8a5a4ea
...
...
@@ -37,43 +37,46 @@
<div
class=
"address"
>
{{
triggerLanguage
(
language
,
"地址"
,
"Location"
)
}}
:
{{
matchForm
.
address
}}
</div>
<!-- 时间 -->
<div
class=
"select_item_box"
>
<div
class=
"label"
>
{{
triggerLanguage
(
language
,
"
票档"
,
"Tickets
"
)
}}
{{
triggerLanguage
(
language
,
"
时间"
,
"Event Date & Time
"
)
}}
</div>
<div
class=
"select_item"
>
<div
v-for=
"(it, index) in tick
Class
"
v-for=
"(it, index) in tick
List
"
:key=
"index"
:class=
"[
it.id == selectForm.latId ? 'tagActive' : 'tag',
it.id == selectForm.id ? 'tagActive' : 'tag',
it.isView==0?'forbid':''
]"
@
click=
"select(it)"
@
click=
"select
Tick
(it)"
>
{{
it
.
name
}}
{{
it
.
name
}}
<span
v-if=
"it.ticketType==1"
class=
"tao"
>
{{
language
==
0
?
'套票'
:
'Package ticket'
}}
</span>
</div>
</div>
</div>
<!--
时间
-->
<!--
票档
-->
<div
class=
"select_item_box"
>
<div
class=
"label"
>
{{
triggerLanguage
(
language
,
"
时间"
,
"Event Date & Time
"
)
}}
{{
triggerLanguage
(
language
,
"
票档"
,
"Tickets
"
)
}}
</div>
<div
class=
"select_item"
>
<div
v-for=
"(it, index) in tick
List
"
v-for=
"(it, index) in tick
Class
"
:key=
"index"
:class=
"[
it.id == selectForm.
i
d ? 'tagActive' : 'tag',
it.id == selectForm.
latI
d ? 'tagActive' : 'tag',
]"
@
click=
"select
Tick
(it)"
@
click=
"select(it)"
>
{{
it
.
name
}}
</div>
</div>
</div>
<!-- button -->
<div
class=
"btn forPc"
style=
"margin-left: 40px"
@
click=
"toSelectSeat()"
>
{{
triggerLanguage
(
language
,
"添加观影人"
,
"Add Moviegoers"
)
}}
...
...
@@ -106,6 +109,7 @@ const user = computed(() => useUserStore().user)
const
route
=
useRoute
();
const
router
=
useRouter
();
const
activeId
=
ref
(
route
.
params
.
activeId
)
const
flag
=
ref
(
false
)
const
props
=
defineProps
({
activityId
:
[
String
,
Number
],
});
...
...
@@ -140,6 +144,13 @@ async function getTicketList() {
async
function
getTicketListType
()
{
const
res
=
await
listApi
({
latId
:
selectForm
.
value
.
latId
})
tickList
.
value
=
res
.
rows
flag
.
value
=
tickList
.
value
.
some
((
item
)
=>
{
return
item
.
isView
==
0
})
tickList
.
value
.
forEach
(
v
=>
{
if
(
flag
.
value
&&
v
.
ticketType
==
1
)
v
.
isView
=
0
})
}
function
select
(
v
)
{
...
...
@@ -148,14 +159,14 @@ function select(v) {
}
function
selectTick
(
v
)
{
selectForm
.
value
.
id
=
v
.
id
if
(
v
.
isView
!=
0
)
selectForm
.
value
.
id
=
v
.
id
}
function
toSelectSeat
()
{
if
(
!
selectForm
.
value
.
latId
)
return
ElMessage
.
error
(
language
==
0
?
"请选择票档"
:
'Please select a ticket file'
)
if
(
!
selectForm
.
value
.
id
)
return
ElMessage
.
error
(
language
==
0
?
"请选择时间"
:
'Please select time'
)
if
(
!
user
.
value
)
{
useStore
()
.
setVisitor
()
useStore
.
setVisitor
()
return
}
router
.
push
({
...
...
@@ -242,6 +253,11 @@ function toSelectSeat() {
flex-shrink
:
0
;
}
.forbid
{
opacity
:
0.5
;
cursor
:
not-allowed
!important
;
}
.select_item
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
@@ -280,6 +296,13 @@ function toSelectSeat() {
cursor
:
pointer
;
}
.tao
{
border
:
1px
solid
#493ceb
;
font-size
:
14px
;
color
:
#493ceb
;
margin-left
:
10px
;
}
.tagDisabled
{
padding
:
12px
18px
;
background
:
#878787
;
...
...
src/viewsPc/center/myCanKP.vue
View file @
8a5a4ea
This diff is collapsed.
Click to expand it.
vite.config.js
View file @
8a5a4ea
import
{
defineConfig
,
loadEnv
}
from
'vite'
import
path
,
{
resolve
}
from
'path'
import
{
defineConfig
,
loadEnv
}
from
'vite'
import
path
,
{
resolve
}
from
'path'
import
createVitePlugins
from
'./vite/plugins'
import
inject
from
'@rollup/plugin-inject'
import
commonjs
from
'@rollup/plugin-commonjs'
// import legacy from '@vitejs/plugin-legacy'
// https://vitejs.dev/config/
export
default
defineConfig
(({
mode
,
command
})
=>
{
export
default
defineConfig
(({
mode
,
command
})
=>
{
const
env
=
loadEnv
(
mode
,
process
.
cwd
())
return
{
// 部署生产环境和开发环境下的URL。
...
...
@@ -70,30 +70,30 @@ export default defineConfig(({ mode, command }) => {
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-train/
,
''
)
},
'/dev-api/ztx-match'
:
{
//
target: 'http://192.168.1.118:8083',
target
:
'https://jijin.wtwuxicenter.com/stage-api'
,
target
:
'http://192.168.1.118:8083'
,
//
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-match/
,
''
)
},
'/dev-api/ztx-webSite'
:
{
target
:
'https://wdsfwuxicenter.com/stage-api/'
,
// target: 'https://dance.itechtop.cn/stage-api',
target
:
'http://192.168.1.118:8081/'
,
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api
\/
ztx-webSite/
,
''
)
},
'/dev-api'
:
{
//
target: 'http://192.168.1.118:8081/',
target
:
'http://192.168.1.118:8081/'
,
// target: 'http://192.168.1.131:8081/',
target
:
'https://jijin.wtwuxicenter.com/stage-api'
,
// target: 'http://124.70.181.90:1880/stage-api',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
dev-api/
,
''
)
},
'/ticket'
:
{
// target: 'http://192.168.1.131
:8098/',
target
:
'http://192.168.1.118
:8098/'
,
// target: 'http://192.168.1.131:8081/',
// target: 'http
://124.70.181.90:1880/h5/
',
target
:
'https://ticketh5.wdsfwuxicenter.com/h5/
'
,
// target: 'http
s://jijin.wtwuxicenter.com/ticket
',
// target: 'https://ticketh5.wdsfwuxicenter.com/ticket
',
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
ticket/
,
''
)
}
...
...
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