PageSourceSearch

https://www.jejupass.com/assets/EventDetailView.1b847a2e.js

js jejupass.com collected 2026-09-24 10:55:46 UTC 14,026 bytes, 316 lines download raw bytes

1import { H as HeaderLnb, F as FooterView } from "./FooterView.2c9bfc21.js";
2import { L as Lnb } from "./event.3c42faf6.js";
3import { _ as _sfc_main$1 } from "./DetailInfoView.vue_vue_type_script_setup_true_lang.e27f434f.js";
4import { d as defineComponent, a7 as B, r as ref, L as useRoute, O as useRouter, e as onMounted, P as watch, t as resolveComponent, o as openBlock, c as createElementBlock, g as createBaseVNode, h as createVNode, F as Fragment, J as useAmplitude, K as useBraze, aj as hooks } from "./index.fb0a2414.js";
5import { g as getEventDetail } from "./event_api.462840e5.js";
6import { g as getCouponInfo, i as issueCoupon, a as issueCouponCampaign, p as publishThreeComboCoupons } from "./payment_api.b936c55d.js";
7import "./enum.84551e71.js";
8import "./rentcar_search.dbe7d49c.js";
9import "./rentcar_insurance.0dcad289.js";
10import "./_plugin-vue_export-helper.cdc0426e.js";
11import "./ko.f7972b54.js";
12const _hoisted_1 = {
13  id: "wrapper",
14  class: "wrapper"
15};
16const _hoisted_2 = {
17  id: "container",
18  class: "container lnbWrapper"
19};
20const _hoisted_3 = {
21  id: "contents",
22  class: "contents"
23};
24const _hoisted_4 = /* @__PURE__ */ createBaseVNode("h2", { class: "titDep2 titLine type01" }, "\uC9C4\uD589\uC911\uC778 \uC774\uBCA4\uD2B8", -1);
25const _sfc_main = /* @__PURE__ */ defineComponent({
26  __name: "EventDetailView",
27  setup(__props) {
28    const { logEventForPageView, logEvent } = useAmplitude();
29    const { brazeCustomEventWithProperties } = useBraze();
30    B({
31      title: ""
32    });
33    const modalEventClosed = ref(null);
34    const modalLoginRequired = ref(null);
35    const modalCouponIssued = ref(null);
36    const modalCouponIssuedRedirect = ref(null);
37    const route = useRoute();
38    const router = useRouter();
39    const detailView = ref({});
40    ref(true);
41    const keyTitle = ref(true);
42    const keyDate = ref(true);
43    const keyContents = ref(true);
44    let redirectUrl = "";
45    const handelConfirmLoginRequired = () => {
46      window.location.href = "https://auth.jejupass.com/web/login?callbackUrl=" + encodeURIComponent("https://event.jejupass.com/web/event/events/" + Number(route.params.id) + "?sortSeq=" + Number(route.query.sortSeq));
47    };
48    const handelConfirmRedirect = (url) => {
49      location.href = redirectUrl;
50    };
51    let couponIssueRunFlag = false;
52    const couponIssue = async (coupon_id, cafepassYn = "N", eventTit = "", eventCont = "") => {
53      var _a, _b, _c;
54      if (couponIssueRunFlag) {
55        return false;
56      }
57      couponIssueRunFlag = true;
58      if (coupon_id != 0) {
59        let amplitudObj = {};
60        const data = await getCouponInfo(coupon_id);
61        if (data) {
62          if (data.data.status === 200) {
63            let coupon = data.data.data;
64            let productCategory = "";
65            if (coupon.categories[0].categoryCode == "RENTCAR" || coupon.categories[0].categoryCode == "RENTCAR_INLAND" || coupon.categories[0].categoryCode == "RENTCAR_JAPAN") {
66              productCategory = "\uB80C\uD130\uCE74";
67            } else if (coupon.categories[0].categoryCode == "STAY") {
68              productCategory = "\uC219\uBC15";
69            } else if (coupon.categories[0].categoryCode == "TRIP") {
70              productCategory = "\uD2B8\uB9BD";
71            } else if (coupon.categories[0].categoryCode == "CAFE") {
72              productCategory = "\uCE74\uD398";
73            } else {
74              productCategory = "common";
75            }
76            amplitudObj = {
77              "coupon name": coupon.name,
78              "coupon amount": coupon.discountAmount,
79              "coupon rate": coupon.discountRate,
80              "minimum purchase amount": coupon.minUseAmount,
81              "product category": productCategory,
82              "page name": "\uC774\uBCA4\uD2B8\uC0C1\uC138",
83              "page area": "\uC774\uBCA4\uD2B8\uCF58\uD150\uCE20",
84              "page area details": "\uC774\uBCA4\uD2B8\uCF58\uD150\uCE20_\uCFE0\uD3F0 \uBC1B\uAE30",
85              "event type": "\uC804\uD658"
86            };
87          }
88        }
89        const response = await issueCoupon(coupon_id, cafepassYn);
90        if (response) {
91          if (response.data.code === 200) {
92            logEvent("PC_\uCFE0\uD3F0 \uBC1C\uAE09", amplitudObj);
93            (_a = modalCouponIssued.value) == null ? void 0 : _a.open({
94              show: true,
95              title: eventTit !== "" ? eventTit : "\uCFE0\uD3F0 \uBC1C\uAE09",
96              contents: eventCont !== "" ? eventCont : "\uCFE0\uD3F0\uC774 \uBC1C\uAE09\uB418\uC5C8\uC2B5\uB2C8\uB2E4."
97            });
98          } else {
99            if (response.data.message == "\uB85C\uADF8\uC778 \uD6C4 \uC774\uC6A9\uD574\uC8FC\uC138\uC694.") {
100              (_b = modalLoginRequired.value) == null ? void 0 : _b.open({
101                show: true,
102                title: "\uCFE0\uD3F0 \uBC1C\uAE09",
103                contents: "\uB85C\uADF8\uC778 \uD6C4 \uC774\uC6A9\uD574\uC8FC\uC138\uC694."
104              });
105            } else {
106              (_c = modalCouponIssued.value) == null ? void 0 : _c.open({
107                show: true,
108                title: "\uCFE0\uD3F0 \uBC1C\uAE09 \uC2E4\uD328",
109                contents: response.data.message
110              });
111            }
112          }
113          couponIssueRunFlag = false;
114        }
115      }
116    };
117    const couponIssueCampaign = async (campaignCode, eventTit = "", eventCont = "", locationUrl = "") => {
118      var _a, _b, _c, _d, _e, _f;
119      if (couponIssueRunFlag) {
120        return false;
121      }
122      couponIssueRunFlag = true;
123      if (campaignCode != "") {
124        const response = await issueCouponCampaign(campaignCode);
125        if (response) {
126          if (response.errorCode === "CPN_999") {
127            (_a = modalLoginRequired.value) == null ? void 0 : _a.open({
128              show: true,
129              title: "\uCFE0\uD3F0 \uBC1C\uAE09",
130              contents: "\uB85C\uADF8\uC778 \uD6C4 \uC774\uC6A9\uD574\uC8FC\uC138\uC694."
131            });
132          } else if (response.errorCode === "CPN_004") {
133            if (locationUrl === "") {
134              (_b = modalCouponIssued.value) == null ? void 0 : _b.open({
135                show: true,
136                title: "\uCFE0\uD3F0 \uBC1C\uAE09 \uC2E4\uD328",
137                contents: response.errorCodeMessage
138              });
139            } else {
140              redirectUrl = locationUrl;
141              (_c = modalCouponIssuedRedirect.value) == null ? void 0 : _c.open({
142                show: true,
143                title: "\uCFE0\uD3F0 \uBC1C\uAE09 \uC2E4\uD328",
144                contents: response.errorCodeMessage
145              });
146            }
147          } else {
148            if (response.data.issuedCount > 0) {
149              if (locationUrl === "") {
150                (_d = modalCouponIssued.value) == null ? void 0 : _d.open({
151                  show: true,
152                  title: eventTit !== "" ? eventTit : "\uCFE0\uD3F0 \uBC1C\uAE09",
153                  contents: eventCont !== "" ? eventCont : "\uCFE0\uD3F0\uC774 \uBC1C\uAE09\uB418\uC5C8\uC2B5\uB2C8\uB2E4."
154                });
155              } else {
156                redirectUrl = locationUrl;
157                (_e = modalCouponIssuedRedirect.value) == null ? void 0 : _e.open({
158                  show: true,
159                  title: eventTit !== "" ? eventTit : "\uCFE0\uD3F0 \uBC1C\uAE09",
160                  contents: eventCont !== "" ? eventCont : "\uCFE0\uD3F0\uC774 \uBC1C\uAE09\uB418\uC5C8\uC2B5\uB2C8\uB2E4."
161                });
162              }
163            } else {
164              (_f = modalCouponIssued.value) == null ? void 0 : _f.open({
165                show: true,
166                title: "\uCFE0\uD3F0\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
167                contents: ""
168              });
169            }
170          }
171          couponIssueRunFlag = false;
172        }
173      }
174    };
175    const threeComboCoupon = async (eventName) => {
176      var _a, _b, _c, _d;
177      if (eventName === "threeCombo") {
178        const response = await publishThreeComboCoupons(eventName);
179        if (response) {
180          if (response.errorCode === "CPN_999") {
181            (_a = modalLoginRequired.value) == null ? void 0 : _a.open({
182              show: true,
183              title: "\uCFE0\uD3F0 \uBC1C\uAE09",
184              contents: "\uB85C\uADF8\uC778 \uD6C4 \uC774\uC6A9\uD574\uC8FC\uC138\uC694."
185            });
186          } else if (response.errorCode === "CPN_004") {
187            (_b = modalCouponIssued.value) == null ? void 0 : _b.open({
188              show: true,
189              title: response.errorCodeMessage,
190              contents: ""
191            });
192          } else {
193            let couponIds = response.data.issuedCouponIds;
194            if (couponIds.length > 0) {
195              (_c = modalCouponIssued.value) == null ? void 0 : _c.open({
196                show: true,
197                title: "\uCFE0\uD3F0 \uBC1C\uAE09",
198                contents: "\uCFE0\uD3F0\uC774 \uBC1C\uAE09\uB418\uC5C8\uC2B5\uB2C8\uB2E4."
199              });
200            } else {
201              (_d = modalCouponIssued.value) == null ? void 0 : _d.open({
202                show: true,
203                title: "\uCFE0\uD3F0\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
204                contents: ""
205              });
206            }
207          }
208        }
209      }
210    };
211    const goSearchView = async (insrncApplcCode) => {
212      let resveBeginDe = hooks().add(1, "days").format("YYYY-MM-DD");
213      let resveBeginTime = "0900";
214      let resveEndDe = hooks().add(2, "days").format("YYYY-MM-DD");
215      let resveEndTime = "0900";
216      let driverYearLmt = "30";
217      let driverLicenseYear = "3";
218      window.location.href = "https://rentcar.jejupass.com/web/rentcar/lowestPrice
218s?resveBeginDe=" + resveBeginDe + "&resveBeginTime=" + resveBeginTime + "&resveEndDe=" + resveEndDe + "&resveEndTime=" + resveEndTime + "&driverYearLmt=" + driverYearLmt + "&driverLicenseYear=" + driverLicenseYear + "&insrncApplcCode=" + insrncApplcCode + "&administrativeCode=5011000001&administrativeCode2=5011000001";
219    };
220    if (typeof window !== "undefined") {
221      window.couponIssue = couponIssue;
222      window.couponIssueCampaign = couponIssueCampaign;
223      window.goSearchView = goSearchView;
224      window.threeComboCoupon = threeComboCoupon;
225    }
226    const getEventView = async () => {
227      const response = await getEventDetail(Number(route.params.id), "IN_PROGRESS", "WEB", Number(route.query.sortSeq), Boolean(!route.query.display));
228      if (response) {
229        if (response.status === 500) {
230          if (modalEventClosed.value)
231            modalEventClosed.value.open({ show: true, title: "\uC774\uBCA4\uD2B8 \uC885\uB8CC", contents: "\uC885\uB8CC\uB41C \uC774\uBCA4\uD2B8\uC785\uB2C8\uB2E4." });
232          return;
233        }
234        detailView.value = response.data;
235        detailView.value.prevTitle = detailView.value.prevTitle ? detailView.value.prevTitle : "\uC774\uC804\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.";
236        detailView.value.nextTitle = detailView.value.nextTitle ? detailView.value.nextTitle : "\uB2E4\uC74C\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.";
237        document.title = detailView.value.title;
238      }
239    };
240    const handelConfirmEventClosed = () => {
241      router.push("/web/event/events");
242    };
243    onMounted(async () => {
244      var _a, _b, _c, _d, _e;
245      await getEventView();
246      logEventForPageView("PC_\uC774\uBCA4\uD2B8\uC0C1\uC138 \uD398\uC774\uC9C0 \uC9C4\uC785", {
247        "product category": "common",
248        "product name": detailView.value.title
249      });
250      if (route.query.utm_source && route.query.utm_medium && route.query.utm_campaign) {
251        const externalAd = {
252          source: (_a = route.query.utm_source) == null ? void 0 : _a.toString(),
253          medium: (_b = route.query.utm_medium) == null ? void 0 : _b.toString(),
254          campaign: (_c = route.query.utm_campaign) == null ? void 0 : _c.toString()
255        };
256        if (route.query.utm_term) {
257          externalAd.term = (_d = route.query.utm_term) == null ? void 0 : _d.toString();
258        }
259        if (route.query.utm_content) {
260          externalAd.content = (_e = route.query.utm_content) == null ? void 0 : _e.toString();
261        }
262        brazeCustomEventWithProperties("\uC678\uBD80 \uAD11\uACE0 \uC778\uC785", externalAd);
263      }
264      brazeCustomEventWithProperties("\uD504\uB85C\uBAA8\uC158 \uD398\uC774\uC9C0 \uC9C4\uC785", {});
265    });
266    watch(() => route.path, (to, from) => {
267      if (to != from) {
268        router.go(0);
269      }
270    });
271    return (_ctx, _cache) => {
272      const _component_Alert = resolveComponent("Alert");
273      const _component_Confirm = resolveComponent("Confirm");
274      return openBlock(), createElementBlock(Fragment, null, [
275        createBaseVNode("div", _hoisted_1, [
276          createVNode(HeaderLnb),
277          createBaseVNode("main", _hoisted_2, [
278            createVNode(Lnb),
279            createBaseVNode("div", _hoisted_3, [
280              _hoisted_4,
281              createVNode(_sfc_main$1, {
282                detailView: detailView.value,
283                keyTitle: keyTitle.value,
284                keyDate: keyDate.value,
285                keyContents: keyContents.value
286              }, null, 8, ["detailView", "keyTitle", "keyDate", "keyContents"])
287            ])
288          ])
289        ]),
290        createVNode(FooterView),
291        createVNode(_component_Alert, {
292          ref_key: "modalEventClosed",
293          ref: modalEventClosed,
294          onConfirm: handelConfirmEventClosed
295        }, null, 512),
296        createVNode(_component_Confirm, {
297          ref_key: "modalLoginRequired",
298          ref: modalLoginRequired,
299          onConfirm: handelConfirmLoginRequired
300        }, null, 512),
301        createVNode(_component_Alert, {
302          ref_key: "modalCouponIssued",
303          ref: modalCouponIssued
304        }, null, 512),
305        createVNode(_component_Alert, {
306          ref_key: "modalCouponIssuedRedirect",
307          ref: modalCouponIssuedRedirect,
308          onConfirm: handelConfirmRedirect
309        }, null, 512)
310      ], 64);
311    };
312  }
313});
314export {
315  _sfc_main as default
316};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.