esoftplay-event 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/event/additional.tsx +1 -1
- package/event/additional_input.tsx +15 -0
- package/event/additional_new.tsx +565 -0
- package/event/artist.tsx +14 -34
- package/event/artist_detail.tsx +336 -239
- package/event/artist_detail_multi.tsx +266 -157
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +5 -13
- package/event/button.tsx +2 -2
- package/event/button_order_detail.tsx +20 -8
- package/event/capture.tsx +2 -0
- package/event/checkout.ts +135 -0
- package/event/countdown.tsx +13 -9
- package/event/countdown_base.tsx +88 -48
- package/event/countdown_event.tsx +3 -0
- package/event/countdown_timestamp.tsx +106 -0
- package/event/coupon.tsx +1 -1
- package/event/coupon_generate.tsx +35 -22
- package/event/detail.tsx +9 -15
- package/event/detail2.tsx +63 -61
- package/event/dialog_custom.tsx +67 -0
- package/event/exchange_ticket_list.tsx +23 -14
- package/event/exchange_ticket_result.tsx +1 -1
- package/event/firebase_socket.ts +14 -12
- package/event/htmltext.tsx +40 -28
- package/event/index.tsx +8 -2
- package/event/label_input.tsx +2 -2
- package/event/layout.tsx +312 -0
- package/event/loading_page.tsx +62 -82
- package/event/message.tsx +2 -2
- package/event/order_detail.tsx +408 -477
- package/event/order_detail_addons.tsx +60 -0
- package/event/order_detail_addons_booked.tsx +61 -0
- package/event/order_detail_coupon.tsx +66 -0
- package/event/order_detail_instruction.tsx +96 -0
- package/event/order_detail_payment.tsx +1 -1
- package/event/order_detail_reschedule.tsx +109 -0
- package/event/order_detail_return.tsx +231 -0
- package/event/order_detail_review.tsx +174 -0
- package/event/order_detail_share.tsx +304 -0
- package/event/order_detail_tnc.tsx +76 -0
- package/event/order_detail_upgrade.tsx +140 -90
- package/event/order_detail_upgrade_payment.tsx +120 -38
- package/event/order_detail_visitor.tsx +21 -10
- package/event/order_detail_waiting.tsx +3 -3
- package/event/order_history.tsx +1 -1
- package/event/order_item.tsx +1 -1
- package/event/order_lottery.tsx +1 -1
- package/event/order_reschedule.tsx +29 -16
- package/event/order_share_to.tsx +14 -0
- package/event/order_waiting.tsx +1 -1
- package/event/payment_subscribe.tsx +18 -0
- package/event/point_events.tsx +35 -0
- package/event/point_redemption.tsx +101 -0
- package/event/point_redemption_exchange.tsx +60 -0
- package/event/point_redemption_input.tsx +56 -0
- package/event/point_redemption_success.tsx +50 -0
- package/event/point_summary.tsx +48 -0
- package/event/popup.tsx +4 -4
- package/event/queue.tsx +111 -0
- package/event/queue_pricing.tsx +17 -6
- package/event/review_add.tsx +2 -2
- package/event/scan_item.tsx +1 -1
- package/event/schedule.tsx +33 -30
- package/event/schedule2.tsx +86 -0
- package/event/seat.tsx +135 -374
- package/event/seat_map.tsx +8 -8
- package/event/seat_map_new.tsx +211 -38
- package/event/step.tsx +1 -1
- package/event/test.tsx +8 -8
- package/event/ticket.tsx +326 -0
- package/event/ticket_list.tsx +316 -258
- package/event/ticket_list2.tsx +349 -224
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_add_result.tsx +10 -5
- package/event/tms_check_ticket_result.tsx +16 -7
- package/event/tms_dashboard.tsx +87 -12
- package/event/tms_gate.tsx +32 -15
- package/event/tms_home.tsx +178 -92
- package/event/tms_idcard.tsx +43 -26
- package/event/tms_in.tsx +2 -3
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall.tsx +4 -1
- package/event/tms_in_hall_failed.tsx +36 -16
- package/event/tms_in_log.tsx +9 -11
- package/event/tms_in_success.tsx +13 -8
- package/event/tms_log.tsx +16 -17
- package/event/tms_out_hall_failed.tsx +1 -1
- package/event/tms_out_temporary.tsx +3 -4
- package/event/token_order.tsx +103 -0
- package/event/token_payment.tsx +79 -0
- package/event/visitor_index.tsx +60 -49
- package/event/visitor_input.tsx +336 -54
- package/event/visitor_inputv2.tsx +173 -88
- package/event/voucher.tsx +1 -1
- package/id.json +76 -4
- package/package.json +1 -1
- package/event/secure_page.debug.tsx +0 -34
- package/event/secure_page.live.tsx +0 -35
package/event/queue.tsx
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
// noPage
|
|
3
|
+
|
|
4
|
+
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
5
|
+
import { EventCountdown_timestamp } from 'esoftplay/cache/event/countdown_timestamp/import';
|
|
6
|
+
import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
7
|
+
import { EventQueue_pricing, EventQueue_pricingProperty } from 'esoftplay/cache/event/queue_pricing/import';
|
|
8
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
9
|
+
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
10
|
+
import { UseCondition } from 'esoftplay/cache/use/condition/import';
|
|
11
|
+
import esp from 'esoftplay/esp';
|
|
12
|
+
import useGlobalState from 'esoftplay/global';
|
|
13
|
+
import { useEffect, useRef } from 'react';
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface EventQueueArgs {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export interface EventQueueProps {
|
|
23
|
+
event_id: number,
|
|
24
|
+
children: any,
|
|
25
|
+
allotment?: any,
|
|
26
|
+
onDoneQueue?: () => void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface EventQueueCountdownProps {
|
|
30
|
+
onExpired?: () => void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const valueState = useGlobalState<number>(0)
|
|
34
|
+
|
|
35
|
+
export function QueueCountdown(props: EventQueueCountdownProps) {
|
|
36
|
+
const [timer] = EventCountdownProperty.countdownTime.useState()
|
|
37
|
+
const [value] = valueState.useState()
|
|
38
|
+
|
|
39
|
+
if (value != 1) {
|
|
40
|
+
return null
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<View style={{ backgroundColor: LibStyle.colorGreen, margin: 16, borderRadius: 5, padding: 10, ...LibStyle.elevation(2) }} >
|
|
45
|
+
<LibTextstyle text={esp.lang("event/ticket_list", "select_ticket")} textStyle='caption1' style={{ color: 'white' }} />
|
|
46
|
+
<EventCountdown_timestamp
|
|
47
|
+
onExpired={() => {
|
|
48
|
+
props?.onExpired?.()
|
|
49
|
+
}}
|
|
50
|
+
expiredTimestamp={timer}
|
|
51
|
+
style={{ color: "#fff", fontWeight: 'bold' }} />
|
|
52
|
+
</View>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default function m(props: EventQueueProps): any {
|
|
57
|
+
const checkCounter = useRef<number>(0)
|
|
58
|
+
let refTimeout = useRef<any>(null)
|
|
59
|
+
const { event_id, allotment } = props
|
|
60
|
+
const { isInPricingQueueConfig, updateQueueExp } = EventFirebase_socket()
|
|
61
|
+
const [value, setValue] = valueState.useState()
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
EventFirebase_socketProperty.eventIdQueue.set(event_id)
|
|
65
|
+
getCheckCounter()
|
|
66
|
+
|
|
67
|
+
if (!!allotment) {
|
|
68
|
+
EventFirebase_socketProperty.userIdKeyReplacer.set({
|
|
69
|
+
t: Number(allotment.t),
|
|
70
|
+
s: Number(allotment.s),
|
|
71
|
+
priority: 1
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return () => {
|
|
76
|
+
clearTimeout(refTimeout.current)
|
|
77
|
+
valueState.reset()
|
|
78
|
+
EventCountdownProperty.releaseQueue.trigger()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}, [])
|
|
82
|
+
|
|
83
|
+
function getCheckCounter() {
|
|
84
|
+
clearTimeout(refTimeout.current)
|
|
85
|
+
const { pathQueue, event_id } = EventQueue_pricingProperty.state().get()
|
|
86
|
+
if (event_id && isInPricingQueueConfig(event_id)) {
|
|
87
|
+
updateQueueExp(pathQueue, event_id)
|
|
88
|
+
checkCounter.current++
|
|
89
|
+
refTimeout.current = setTimeout(() => {
|
|
90
|
+
getCheckCounter()
|
|
91
|
+
}, 6000);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<View style={{ flex: 1 }}>
|
|
97
|
+
<UseCondition if={isInPricingQueueConfig(String(event_id)) && value == 0} fallback={
|
|
98
|
+
props?.children && props?.children
|
|
99
|
+
}>
|
|
100
|
+
<EventQueue_pricing event_id={event_id} onDone={(v) => {
|
|
101
|
+
setValue(v)
|
|
102
|
+
if (!!v) {
|
|
103
|
+
const expTimestamp = Date.now() + (Number(esp.modProp("event/firebase_socket").eventQueueConfig.get(String(event_id)).time) * 1000);
|
|
104
|
+
EventCountdownProperty.countdownTime.set(expTimestamp)
|
|
105
|
+
}
|
|
106
|
+
props?.onDoneQueue?.()
|
|
107
|
+
}} />
|
|
108
|
+
</UseCondition>
|
|
109
|
+
</View>
|
|
110
|
+
)
|
|
111
|
+
}
|
package/event/queue_pricing.tsx
CHANGED
|
@@ -18,8 +18,7 @@ export interface EventQueueArgs {
|
|
|
18
18
|
}
|
|
19
19
|
export interface EventQueueProps {
|
|
20
20
|
event_id: number,
|
|
21
|
-
|
|
22
|
-
onDone?: () => void
|
|
21
|
+
onDone?: (value: number) => void
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
let timer: any;
|
|
@@ -78,7 +77,9 @@ export default function m(props: EventQueueProps): any {
|
|
|
78
77
|
queueNumberState.reset()
|
|
79
78
|
clearTimeout(timer)
|
|
80
79
|
clearTimeout(refTimeout.current)
|
|
81
|
-
|
|
80
|
+
if (LibNavigation.getResultKey(props)) {
|
|
81
|
+
LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
|
|
82
|
+
}
|
|
82
83
|
}
|
|
83
84
|
}, [])
|
|
84
85
|
|
|
@@ -99,7 +100,11 @@ export default function m(props: EventQueueProps): any {
|
|
|
99
100
|
getQueue(pathQueue, event_id, 60000, (idx, key) => {
|
|
100
101
|
counter.current++
|
|
101
102
|
if (limit == 0) {
|
|
102
|
-
|
|
103
|
+
if (LibNavigation.getResultKey(props)) {
|
|
104
|
+
LibNavigation.sendBackResult(1, LibNavigation.getResultKey(props))
|
|
105
|
+
} else {
|
|
106
|
+
props?.onDone?.(1)
|
|
107
|
+
}
|
|
103
108
|
} else
|
|
104
109
|
if (idx < limit) {
|
|
105
110
|
updateQueueExp(pathQueue, event_id)
|
|
@@ -108,9 +113,15 @@ export default function m(props: EventQueueProps): any {
|
|
|
108
113
|
clearTimeout(refTimeout.current)
|
|
109
114
|
clearTimeout(timer)
|
|
110
115
|
if (autoPass) {
|
|
111
|
-
doneQueue(pathQueue, event_id, key, () => {
|
|
116
|
+
doneQueue(pathQueue, event_id, key, () => {
|
|
117
|
+
props?.onDone?.(1)
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
if (LibNavigation.getResultKey(props)) {
|
|
121
|
+
LibNavigation.sendBackResult(1, LibNavigation.getResultKey(props))
|
|
122
|
+
} else {
|
|
123
|
+
props?.onDone?.(1)
|
|
112
124
|
}
|
|
113
|
-
LibNavigation.sendBackResult(1, LibNavigation.getResultKey(props))
|
|
114
125
|
} else {
|
|
115
126
|
setQueueStatus(2)
|
|
116
127
|
queueNumberState.set((idx + 1) - limit)
|
package/event/review_add.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
4
4
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
5
|
+
import { EventOrder_detailProperty } from 'esoftplay/cache/event/order_detail/import';
|
|
5
6
|
import { EventRating } from 'esoftplay/cache/event/rating/import';
|
|
6
7
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
7
8
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
@@ -12,7 +13,6 @@ import { LibNet_status } from 'esoftplay/cache/lib/net_status/import';
|
|
|
12
13
|
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
13
14
|
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
14
15
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
15
|
-
import { EventOrder_detailProperty } from 'esoftplay/cache/event/order_detail/import';
|
|
16
16
|
import esp from 'esoftplay/esp';
|
|
17
17
|
import useGlobalState, { useGlobalReturn } from 'esoftplay/global';
|
|
18
18
|
import useLazyState from 'esoftplay/lazy';
|
|
@@ -326,7 +326,7 @@ export default function m(props: EventReview_addProps): any {
|
|
|
326
326
|
defaultValue={inputReview}
|
|
327
327
|
base
|
|
328
328
|
multiline={true}
|
|
329
|
-
style={{ height: 100, borderColor: 'gray', borderWidth: 1, borderRadius: 8, padding: 10, textAlignVertical: 'top' }}
|
|
329
|
+
style={{ color: '#000', height: 100, borderColor: 'gray', borderWidth: 1, borderRadius: 8, padding: 10, textAlignVertical: 'top' }}
|
|
330
330
|
onChangeText={(t) => { inputReview = t }}
|
|
331
331
|
/>
|
|
332
332
|
</ScrollView>
|
package/event/scan_item.tsx
CHANGED
|
@@ -37,7 +37,7 @@ export default function m(props: EventScan_itemProps): any {
|
|
|
37
37
|
<View style={applyStyle({ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' })}>
|
|
38
38
|
<Text allowFontScaling={false} style={applyStyle({ color: props?.colorText ? props?.colorText : "#000", fontSize: 14 })}>{props.item.price_name}</Text>
|
|
39
39
|
{
|
|
40
|
-
props.item.hasOwnProperty('seat_name') &&
|
|
40
|
+
props.item.hasOwnProperty('seat_name') && props?.item?.seat_name != "" &&
|
|
41
41
|
<View style={applyStyle({ height: 35, width: 35, backgroundColor: "#fff", borderWidth: 1, borderColor: LibStyle.colorPrimary, borderRadius: 4, justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
|
|
42
42
|
<LibIcon name="seat" color={LibStyle.colorPrimary} size={15} />
|
|
43
43
|
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorPrimary })}>{props.item.seat_name}</Text>
|
package/event/schedule.tsx
CHANGED
|
@@ -21,8 +21,8 @@ export interface EventScheduleProps {
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
export default function m(props: EventScheduleProps): any {
|
|
24
|
-
const { schedule, dataBookingEvent, order_type, tax } = LibNavigation.getArgsAll(props)
|
|
25
|
-
const [qty, setQty] = useSafeState<number>(dataBookingEvent?.qty)
|
|
24
|
+
const { url, schedule, dataBookingEvent, order_type, tax, is_multiprice } = LibNavigation.getArgsAll(props)
|
|
25
|
+
const [qty, setQty] = useSafeState<number>(dataBookingEvent?.qty || 1)
|
|
26
26
|
|
|
27
27
|
function add(quota?: any, quota_used?: any): void {
|
|
28
28
|
if (qty != parseInt(dataBookingEvent?.selected_ticket?.qty_max)) {
|
|
@@ -71,22 +71,22 @@ export default function m(props: EventScheduleProps): any {
|
|
|
71
71
|
return (
|
|
72
72
|
<View key={i} style={styleId_26m88j}>
|
|
73
73
|
{
|
|
74
|
-
_item
|
|
75
|
-
<LibPicture source={{ uri: _item
|
|
74
|
+
Boolean(_item?.image) && _item?.image != "" &&
|
|
75
|
+
<LibPicture source={{ uri: _item?.image }} style={styleId_15Un4S} />
|
|
76
76
|
}
|
|
77
|
-
<Text allowFontScaling={false} style={styleId_XKKqU}>{_item
|
|
77
|
+
<Text allowFontScaling={false} style={styleId_XKKqU}>{_item?.name || ""}</Text>
|
|
78
78
|
<ScrollView>
|
|
79
79
|
{
|
|
80
|
-
_item
|
|
81
|
-
<LibWebview source={{ html: _item
|
|
80
|
+
Boolean(_item?.description) && _item?.description != "" &&
|
|
81
|
+
<LibWebview source={{ html: _item?.description }} onFinishLoad={() => { }} style={styleId_ZoKh7U} />
|
|
82
82
|
}
|
|
83
83
|
</ScrollView>
|
|
84
84
|
{
|
|
85
|
-
_item?.video != "" &&
|
|
85
|
+
Boolean(_item?.video) && _item?.video != "" &&
|
|
86
86
|
<>
|
|
87
87
|
<Text allowFontScaling={false} style={styleId_Z1RMsb6} >{esp.lang("event/schedule", "text_vide")}</Text>
|
|
88
|
-
<TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: _item
|
|
89
|
-
<LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(_item
|
|
88
|
+
<TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: _item?.video })} >
|
|
89
|
+
<LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(_item?.video) }} style={styleId_1g6pcd} />
|
|
90
90
|
</TouchableOpacity>
|
|
91
91
|
</>
|
|
92
92
|
}
|
|
@@ -98,32 +98,35 @@ export default function m(props: EventScheduleProps): any {
|
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
100
|
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
101
|
-
<EventHeader title={
|
|
101
|
+
<EventHeader title={dataBookingEvent?.event_title} />
|
|
102
102
|
<ScrollView>
|
|
103
103
|
{
|
|
104
|
-
schedule?.artist
|
|
104
|
+
schedule?.artist?.length > 0 && schedule?.artist?.map?.(renderArtist)
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
107
|
</ScrollView>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
|
|
109
|
+
{
|
|
110
|
+
is_multiprice == 0 &&
|
|
111
|
+
<View style={{ padding: 10 }} >
|
|
112
|
+
<View style={{ flexDirection: 'row', marginVertical: 10, alignContent: 'center', alignItems: 'center', alignSelf: 'center' }}>
|
|
113
|
+
<TouchableOpacity onPress={() => { min() }}>
|
|
114
|
+
<View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
|
|
115
|
+
<LibIcon name="minus" color="#e74c3c" />
|
|
116
|
+
</View>
|
|
117
|
+
</TouchableOpacity>
|
|
118
|
+
<Text style={{ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 15, marginRight: 15 }}>{qty}</Text>
|
|
119
|
+
<TouchableOpacity onPress={() => { add(item?.quota, item?.quota_used) }}>
|
|
120
|
+
<View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
|
|
121
|
+
<LibIcon name="plus" color="#16a085" />
|
|
122
|
+
</View>
|
|
123
|
+
</TouchableOpacity>
|
|
124
|
+
</View>
|
|
125
|
+
<EventButton label={esp.lang("event/schedule", "next")} onPress={() => {
|
|
126
|
+
doBooking()
|
|
127
|
+
}} style={{ backgroundColor: LibStyle.colorGreen }} />
|
|
122
128
|
</View>
|
|
123
|
-
|
|
124
|
-
doBooking()
|
|
125
|
-
}} style={{ backgroundColor: LibStyle.colorGreen }} />
|
|
126
|
-
</View>
|
|
129
|
+
}
|
|
127
130
|
</View>
|
|
128
131
|
)
|
|
129
132
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
3
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
4
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
5
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
6
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
7
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
8
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
9
|
+
import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
|
|
10
|
+
import { LibWebview } from 'esoftplay/cache/lib/webview/import';
|
|
11
|
+
import esp from 'esoftplay/esp';
|
|
12
|
+
import useSafeState from 'esoftplay/state';
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface EventSchedule2Args {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export interface EventSchedule2Props {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
function m(props: EventSchedule2Props): any {
|
|
26
|
+
const { url } = LibNavigation.getArgsAll(props)
|
|
27
|
+
|
|
28
|
+
const [result, setResult] = useSafeState()
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
loadData()
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
function loadData() {
|
|
35
|
+
new LibCurl(url, null, (res, msg) => {
|
|
36
|
+
setResult(res)
|
|
37
|
+
}, (err) => {
|
|
38
|
+
LibToastProperty.show(err?.message)
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!result) {
|
|
43
|
+
return <LibLoading />
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function renderArtist(item: any, i: number) {
|
|
47
|
+
return (
|
|
48
|
+
<View key={i} style={{ margin: 15 }}>
|
|
49
|
+
{
|
|
50
|
+
item?.image != "" &&
|
|
51
|
+
<LibPicture source={{ uri: item?.image }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width, marginTop: -15, marginLeft: -15, resizeMode: 'cover' }} />
|
|
52
|
+
}
|
|
53
|
+
<Text allowFontScaling={false} style={{ marginTop: 10, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, marginBottom: 7 }}>{item?.name || ""}</Text>
|
|
54
|
+
<View style={{ borderRadius: 10, overflow: 'hidden' }}>
|
|
55
|
+
{
|
|
56
|
+
item?.description != "" &&
|
|
57
|
+
<LibWebview source={{ html: item?.description }} onFinishLoad={() => { }} style={{ marginLeft: -20 }} />
|
|
58
|
+
}
|
|
59
|
+
</View>
|
|
60
|
+
{
|
|
61
|
+
item?.video != "" &&
|
|
62
|
+
<>
|
|
63
|
+
<Text allowFontScaling={false} style={{ marginLeft: 0, marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/schedule", "text_vide")}</Text>
|
|
64
|
+
<TouchableOpacity style={{ borderRadius: 10, overflow: 'hidden' }} onPress={() => LibNavigation.navigate('lib/video', { code: item?.video })} >
|
|
65
|
+
<LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(item?.video) }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width - 30, marginLeft: 0, marginHorizontal: 20, resizeMode: 'cover' }} />
|
|
66
|
+
</TouchableOpacity>
|
|
67
|
+
</>
|
|
68
|
+
}
|
|
69
|
+
</View>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
75
|
+
<EventHeader />
|
|
76
|
+
|
|
77
|
+
<ScrollView>
|
|
78
|
+
{
|
|
79
|
+
result?.length > 0 && result?.map?.(renderArtist)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
</ScrollView>
|
|
83
|
+
|
|
84
|
+
</View>
|
|
85
|
+
)
|
|
86
|
+
}
|