index.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. @extends('views.layouts.master')
  2. @section('content')
  3. <!--=====================================
  4. BANNER PART START
  5. =======================================-->
  6. @push('css')
  7. <link rel="stylesheet" href="{{ csset('/themes/pro/nawame/resources/css/banner.css') }}">
  8. @endpush
  9. <section class="home-classic-slider slider-arrow">
  10. @forelse($maMainSlider ?? [] as $widget)
  11. <div class="banner-part" onclick="location.href='{{ $widget['C5'] }}'"
  12. style="height:605px; display:block; background: url({{ msset($widget['C4']) }}) no-repeat center; cursor: pointer;">
  13. <div class="container">
  14. <div class="row">
  15. <div class="col-md-8 col-lg-6">
  16. <div class="banner-content">
  17. {!! $widget['C6'] !!}
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. @empty
  24. @endforelse
  25. </section>
  26. <!--=====================================
  27. BANNER PART END
  28. =======================================-->
  29. <!--=====================================
  30. BEST PART START
  31. =======================================-->
  32. <section class="section newitem-part">
  33. <div class="container">
  34. <div class="row">
  35. <div class="col">
  36. <div class="section-heading">
  37. <h2>BEST</h2>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col">
  43. <ul class="new-slider slider-arrow">
  44. @forelse($best ?? [] as $item)
  45. <li>
  46. <div class="product-card">
  47. <div class="product-media">
  48. <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
  49. @forelse($item['BadgePage'] ?? [] as $badge)
  50. <div class="mr-1">
  51. <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
  52. </div>
  53. @empty
  54. @endforelse
  55. </div>
  56. <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="best-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
  57. </div>
  58. <div class="product-content">
  59. <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
  60. @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
  61. <h6 class="product-price">
  62. <span>{{ number_format($item['C6']) }} 원</span>
  63. </h6>
  64. @endif
  65. </div>
  66. </div>
  67. </li>
  68. @empty
  69. @endforelse
  70. </ul>
  71. </div>
  72. </div>
  73. <!--
  74. <div class="row">
  75. <div class="col">
  76. <div class="section-btn-25">
  77. <a href="shop-4column.html" class="btn btn-outline">
  78. <i class="fas fa-eye"></i>
  79. <span>show more</span>
  80. </a>
  81. </div>
  82. </div>
  83. </div>
  84. -->
  85. </div>
  86. </section>
  87. <!--=====================================
  88. BEST PART END
  89. =======================================-->
  90. <!--=====================================
  91. MID BANNER PART START
  92. =======================================-->
  93. <section class="mbnr1-part">
  94. <div class="container">
  95. @forelse($mbSubSlider ?? [] as $widget)
  96. <div class="left">
  97. <a href="{{ $widget['C5'] }}">
  98. <img src="{{ msset($widget['C4']) }}" alt="중간배너">
  99. </a>
  100. </div>
  101. @empty
  102. @endforelse
  103. {{-- <div class="right"><a href="#"><img src="{{ asset('/themes/pro/nawame/resources/images/home/mright_bnr.jpg') }}" alt="오른쪽배너"></a></div>--}}
  104. </div>
  105. </section>
  106. <!--=====================================
  107. MID BANNER PART END
  108. =======================================-->
  109. <!--=====================================
  110. WEEKLY BEST PART START
  111. =======================================-->
  112. <section class="section weekly-part">
  113. <div class="container">
  114. <div class="row">
  115. <div class="col">
  116. <div class="section-heading">
  117. <h2>WEEKLY BEST</h2>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="row">
  122. <div class="col">
  123. <ul class="new-slider slider-arrow">
  124. @forelse($weeklyBest ?? [] as $item)
  125. <li>
  126. <div class="product-card">
  127. <div class="product-media">
  128. <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
  129. @forelse($item['BadgePage'] ?? [] as $badge)
  130. <div class="mr-1">
  131. <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
  132. </div>
  133. @empty
  134. @endforelse
  135. </div>
  136. <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="weekly-best-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
  137. </div>
  138. <div class="product-content">
  139. <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
  140. @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
  141. <h6 class="product-price">
  142. <span>{{ number_format($item['C6']) }} 원</span>
  143. </h6>
  144. @endif
  145. </div>
  146. </div>
  147. </li>
  148. @empty
  149. @endforelse
  150. </ul>
  151. </div>
  152. </div>
  153. <!--
  154. <div class="row">
  155. <div class="col">
  156. <div class="section-btn-25">
  157. <a href="shop-4column.html" class="btn btn-outline">
  158. <i class="fas fa-eye"></i>
  159. <span>show more</span>
  160. </a>
  161. </div>
  162. </div>
  163. </div>
  164. -->
  165. </div>
  166. </section>
  167. <!--=====================================
  168. WEEKLY BEST PART END
  169. =======================================-->
  170. <!--=====================================
  171. MID BANNER2 PART START
  172. =======================================-->
  173. <section class="mbnr2-part">
  174. <div class="container">
  175. @forelse($maMainText ?? [] as $widget)
  176. <div style="background:url({{ msset($widget['C4']) }})">
  177. {!! $widget['C6'] !!}
  178. </div>
  179. @empty
  180. @endforelse
  181. </div>
  182. </section>
  183. <!--=====================================
  184. MID BANNER2 PART END
  185. =======================================-->
  186. <!--=====================================
  187. PRODUCTS LIST PART START
  188. =======================================-->
  189. <div class="section products-part">
  190. <div class="container">
  191. <div class="row row-cols-2 row-cols-md-3 row-cols-lg-3 row-cols-xl-3">
  192. @forelse($withCoin ?? [] as $item)
  193. <div class="col">
  194. <div class="product-card">
  195. <div class="product-media">
  196. <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
  197. @forelse($item['BadgePage'] ?? [] as $badge)
  198. <div class="mr-1">
  199. <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
  200. </div>
  201. @empty
  202. @endforelse
  203. </div>
  204. {{-- <button class="product-wish wish" onclick="location.href='wish-list.html'"> <i class="far fa-heart"></i> </button>--}}
  205. <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="with-coin-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
  206. </div>
  207. <div class="product-content">
  208. <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
  209. @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
  210. <h6 class="product-price">
  211. <span>{{ number_format($item['C6']) }} 원</span>
  212. </h6>
  213. @endif
  214. {{-- <button class="product-add" title="Add to Cart"> <i class="fas fa-cart-arrow-down"></i> <span>바로구매</span> </button>--}}
  215. {{-- <div class="product-action">--}}
  216. {{-- <button class="action-minus" title="Quantity Minus"><i class="icofont-minus"></i></button>--}}
  217. {{-- <input class="action-input" title="Quantity Number" type="text" name="quantity" value="1">--}}
  218. {{-- <button class="action-plus" title="Quantity Plus"><i class="icofont-plus"></i></button>--}}
  219. {{-- </div>--}}
  220. </div>
  221. </div>
  222. </div>
  223. @empty
  224. @endforelse
  225. </div>
  226. </div>
  227. <div>
  228. {{-- <div class="col-lg-12">--}}
  229. {{-- <div class="section-btn-25"> <a href="shop-4column.html" class="btn_more btn btn-outline"> <span>더보기 <img src="{{ '/themes/pro/nawame/resources/images/home/icn_arrow.png' }}"></span> </a> </div>--}}
  230. {{-- </div>--}}
  231. </div>
  232. </div>
  233. <!--=====================================
  234. PRODUCTS LIST PART END
  235. =======================================-->
  236. <!--=====================================
  237. LOTTERY PART START
  238. =======================================-->
  239. <section class="section mlottery-part">
  240. <div class="container">
  241. <div class="section-heading">
  242. @forelse($mbMainText ?? [] as $widget)
  243. {!! $widget['C6'] !!}
  244. @empty
  245. @endforelse
  246. </div>
  247. <div class="row">
  248. <div class="col-lg-12 ">
  249. <ul class="blog-slider slider-arrow">
  250. @forelse($giftCoupon ?? [] as $item)
  251. <li class="blog-card">
  252. <div class="product-card">
  253. <div class="product-media"> <a class="product-image" href="{{ route('item-details', [ 'id' => $item['C7'], 'raffle' => true ]) }}">
  254. <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
  255. @forelse($item['BadgePage'] ?? [] as $badge)
  256. <div class="mr-1">
  257. <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
  258. </div>
  259. @empty
  260. @endforelse
  261. </div>
  262. <!--이미지크기 415x415-->
  263. <img src="{{ msset($item['C2']) }}" alt="lottery"> </a> </div>
  264. <div class="product-content">
  265. <h6 class="product-name"> <a href="{{ route('item-details', [ 'id' => $item['C7'], 'raffle' => true ]) }}">{{ $item['C4'] }}</a> </h6>
  266. {{-- <h6 class="product-price"> <span>{{ number_format($item['C5']) }} 원</span> </h6>--}}
  267. <button onclick="go_to_gift_page('{{ $item['C7'] }}')">
  268. <span>응모하기 <img src="{{ '/themes/pro/nawame/resources/images/home/icn_arrow.png' }}"></span>
  269. </button>
  270. </div>
  271. </div>
  272. </li>
  273. @empty
  274. @endforelse
  275. </ul>
  276. </div>
  277. </div>
  278. </div>
  279. </section>
  280. <!--=====================================
  281. LOTTERY LIST PART END
  282. =======================================-->
  283. @php
  284. $popupPage = $bannerInput;
  285. $multiPopupLeft = 0;
  286. $multiPopupTop = 0;
  287. if ($popupPage) {
  288. $multiPopupLeft = $popupPage[0]['C7'];
  289. $multiPopupTop = $popupPage[0]['C8'];
  290. }
  291. $popupTitleList = collect($popupPage)->pluck('C1')->toArray();
  292. @endphp
  293. <div class="df-multipopup df-bannermanager df-bannermanager-pc-multi-popup" df-banner-code="pc-multi-popup" df-banner-wrap="" style="top: {{ $multiPopupTop }}px; left: {{ $multiPopupLeft }}px;">
  294. <div class="df-multipopup-box">
  295. <div class="df-slider">
  296. <div class="swiper-container swiper-container-slide swiper-container-initialized swiper-container-horizontal swiper-container-autoheight">
  297. <ul class="swiper-wrapper" style="height: 320px; transform: translate3d(-320px, 0px, 0px); transition-duration: 0ms;">
  298. @forelse($bannerInput ?? [] as $banner)
  299. <li class="swiper-slide" style="width: 320px;">
  300. <a href="{{ $banner['C5'] }}" target="{{ $banner['C4'] === '0' ? '_self' : '_blank' }}">
  301. <img src="{{ msset($banner['C11']) }}">
  302. </a>
  303. </li>
  304. @empty
  305. @endforelse
  306. </ul>
  307. <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
  308. </div>
  309. <div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets swiper-pagination-text">
  310. </div>
  311. </div>
  312. </div>
  313. <div class="df-multipopup-btn-items">
  314. <div class="df-multipopup-btn-item df-multipopup-btn-item_todayclose" onclick="today_close_banner()"></div>
  315. <div class="df-multipopup-btn-item df-multipopup-btn-item_close" onclick="$('.df-bannermanager').hide()"></div>
  316. </div>
  317. </div>
  318. @endsection
  319. @push('js')
  320. <script src="{{ csset('/themes/pro/nawame/resources/js/plugins/swiper/swiper-bundle.min.js') }}"></script>
  321. <script src="{{ csset('/js/external/jquery-ui.js') }}"></script>
  322. <script>
  323. $(document).ready(function () {
  324. $('.df-multipopup').draggable();
  325. const cook = $.cookie('multi-popup');
  326. const popupTitleList = @json($popupTitleList);
  327. if (cook === 'ok' || isEmpty(popupTitleList)) {
  328. $('.df-bannermanager').hide()
  329. }
  330. else {
  331. $('.df-bannermanager').show()
  332. }
  333. var swiper = new Swiper(".swiper-container", {
  334. allowTouchMove: false,
  335. pagination: {
  336. el: '.swiper-pagination',
  337. clickable: true,
  338. renderBullet: function (index, className) {
  339. const title_list = popupTitleList[index].split(' ')
  340. let caption = ''
  341. title_list.forEach((title, index) => {
  342. if (index === 0) {
  343. caption += title
  344. } else if (index === 1) {
  345. caption += (`<br>${title}`)
  346. } else {
  347. caption += ' ' + title
  348. }
  349. });
  350. return `<div class="swiper-pagination-item ${className}">
  351. <div class="swiper-pagination-item-link">
  352. <span class="swiper-pagination-item-text">${caption}</span>
  353. </div>
  354. </div>`
  355. }
  356. },
  357. autoplay: {
  358. delay: 5000,
  359. disableOnInteraction: false,
  360. },
  361. });
  362. $('.swiper-slide').on('mouseover', function(){
  363. swiper.autoplay.stop();
  364. });
  365. $('.swiper-slide').on('mouseout', function(){
  366. swiper.autoplay.start();
  367. });
  368. });
  369. function today_close_banner() {
  370. $.cookie('multi-popup', 'ok', { expires: 1, path: '/' });
  371. $('.df-bannermanager').hide()
  372. }
  373. function go_to_gift_page(item_slug) {
  374. if (isEmpty(window.Member)) {
  375. return location.href = '{{ route('member-login') }}'
  376. }
  377. let route_url = '{{ route('item-details', [ 'id' => ':id', 'raffle' => true ]) }}'
  378. route_url = route_url.replace(':id', item_slug)
  379. return location.href = route_url
  380. }
  381. function gift_coupon(item_id) {
  382. const sel_item = giftCouponList.filter(item => item['Id'] === item_id)[0]
  383. iziToast.question({
  384. timeout: 20000,
  385. close: false,
  386. overlay: true,
  387. displayMode: 'once',
  388. id: 'question',
  389. zindex: 999,
  390. title: "경품응모",
  391. message: "회원 아이디당 경품 한껀당 : 1개만 부여",
  392. position: 'center',
  393. buttons: [
  394. [`<button><b>응모하기</b></button>`, function (instance, toast) {
  395. instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
  396. submitEntry(sel_item)
  397. }, true],
  398. [`<button>취소</button>`, function (instance, toast) {
  399. instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
  400. }],
  401. ],
  402. });
  403. }
  404. async function submitEntry(item) {
  405. if (isEmpty(window.Member)) {
  406. return location.href = '{{ route('member-login') }}'
  407. }
  408. const unique_key = String(item['HId']) + String(item['Id']) + String(window.Member['MemberId'])
  409. const post_pick = await get_api_data('post-pick', {
  410. Page : [ { Pc10: unique_key } ]
  411. })
  412. if (isEmpty(post_pick.data.apiStatus)) {
  413. return iziToast.error({
  414. title: 'Error',
  415. message: '이미 응모한 품목입니다',
  416. });
  417. }
  418. const post_title = item['Id'] + '-' + moment(new Date()).format('YYYYMMDD') + '-' + rand(1, 99) + window.Member['MemberId']
  419. const response = await get_api_data('post-act', {
  420. Page : [
  421. {
  422. Id: 0,
  423. PostTitle: post_title,
  424. PostTypeId: 51,
  425. Pc1: item['C2'],
  426. Pc2: item['C3'],
  427. Pc3: item['C4'],
  428. Pc4: item['C5'],
  429. Pc10: unique_key,
  430. MemberId: window.Member['MemberId']
  431. }
  432. ]
  433. })
  434. show_iziToast_msg(response.data.Page, function () {
  435. confirm('응모번호: ' + post_title)
  436. })
  437. }
  438. const giftCouponList = @json($giftCoupon);
  439. </script>
  440. @endpush