123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477 |
- @extends('views.layouts.master')
- @section('content')
- <!--=====================================
- BANNER PART START
- =======================================-->
- @push('css')
- <link rel="stylesheet" href="{{ csset('/themes/pro/nawame/resources/css/banner.css') }}">
- @endpush
- <section class="home-classic-slider slider-arrow">
- @forelse($maMainSlider ?? [] as $widget)
- <div class="banner-part" onclick="location.href='{{ $widget['C5'] }}'"
- style="height:605px; display:block; background: url({{ msset($widget['C4']) }}) no-repeat center; cursor: pointer;">
- <div class="container">
- <div class="row">
- <div class="col-md-8 col-lg-6">
- <div class="banner-content">
- {!! $widget['C6'] !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- @empty
- @endforelse
- </section>
- <!--=====================================
- BANNER PART END
- =======================================-->
- <!--=====================================
- BEST PART START
- =======================================-->
- <section class="section newitem-part">
- <div class="container">
- <div class="row">
- <div class="col">
- <div class="section-heading">
- <h2>BEST</h2>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <ul class="new-slider slider-arrow">
- @forelse($best ?? [] as $item)
- <li>
- <div class="product-card">
- <div class="product-media">
- <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
- @forelse($item['BadgePage'] ?? [] as $badge)
- <div class="mr-1">
- <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
- </div>
- @empty
- @endforelse
- </div>
- <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="best-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
- </div>
- <div class="product-content">
- <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
- @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
- <h6 class="product-price">
- <span>{{ number_format($item['C6']) }} 원</span>
- </h6>
- @endif
- </div>
- </div>
- </li>
- @empty
- @endforelse
- </ul>
- </div>
- </div>
- <!--
- <div class="row">
- <div class="col">
- <div class="section-btn-25">
- <a href="shop-4column.html" class="btn btn-outline">
- <i class="fas fa-eye"></i>
- <span>show more</span>
- </a>
- </div>
- </div>
- </div>
- -->
- </div>
- </section>
- <!--=====================================
- BEST PART END
- =======================================-->
- <!--=====================================
- MID BANNER PART START
- =======================================-->
- <section class="mbnr1-part">
- <div class="container">
- @forelse($mbSubSlider ?? [] as $widget)
- <div class="left">
- <a href="{{ $widget['C5'] }}">
- <img src="{{ msset($widget['C4']) }}" alt="중간배너">
- </a>
- </div>
- @empty
- @endforelse
- {{-- <div class="right"><a href="#"><img src="{{ asset('/themes/pro/nawame/resources/images/home/mright_bnr.jpg') }}" alt="오른쪽배너"></a></div>--}}
- </div>
- </section>
- <!--=====================================
- MID BANNER PART END
- =======================================-->
- <!--=====================================
- WEEKLY BEST PART START
- =======================================-->
- <section class="section weekly-part">
- <div class="container">
- <div class="row">
- <div class="col">
- <div class="section-heading">
- <h2>WEEKLY BEST</h2>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col">
- <ul class="new-slider slider-arrow">
- @forelse($weeklyBest ?? [] as $item)
- <li>
- <div class="product-card">
- <div class="product-media">
- <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
- @forelse($item['BadgePage'] ?? [] as $badge)
- <div class="mr-1">
- <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
- </div>
- @empty
- @endforelse
- </div>
- <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="weekly-best-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
- </div>
- <div class="product-content">
- <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
- @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
- <h6 class="product-price">
- <span>{{ number_format($item['C6']) }} 원</span>
- </h6>
- @endif
- </div>
- </div>
- </li>
- @empty
- @endforelse
- </ul>
- </div>
- </div>
- <!--
- <div class="row">
- <div class="col">
- <div class="section-btn-25">
- <a href="shop-4column.html" class="btn btn-outline">
- <i class="fas fa-eye"></i>
- <span>show more</span>
- </a>
- </div>
- </div>
- </div>
- -->
- </div>
- </section>
- <!--=====================================
- WEEKLY BEST PART END
- =======================================-->
- <!--=====================================
- MID BANNER2 PART START
- =======================================-->
- <section class="mbnr2-part">
- <div class="container">
- @forelse($maMainText ?? [] as $widget)
- <div style="background:url({{ msset($widget['C4']) }})">
- {!! $widget['C6'] !!}
- </div>
- @empty
- @endforelse
- </div>
- </section>
- <!--=====================================
- MID BANNER2 PART END
- =======================================-->
- <!--=====================================
- PRODUCTS LIST PART START
- =======================================-->
- <div class="section products-part">
- <div class="container">
- <div class="row row-cols-2 row-cols-md-3 row-cols-lg-3 row-cols-xl-3">
- @forelse($withCoin ?? [] as $item)
- <div class="col">
- <div class="product-card">
- <div class="product-media">
- <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
- @forelse($item['BadgePage'] ?? [] as $badge)
- <div class="mr-1">
- <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
- </div>
- @empty
- @endforelse
- </div>
- {{-- <button class="product-wish wish" onclick="location.href='wish-list.html'"> <i class="far fa-heart"></i> </button>--}}
- <a class="product-image" href="{{ route('item-details', $item['C7']) }}"> <img class="with-coin-image" src="{{ msset($item['C2']) }}" alt="product"> </a>
- </div>
- <div class="product-content">
- <h6 class="product-name"> <a href="{{ route('item-details', $item['C7']) }}">{{ $item['C4'] }}</a> </h6>
- @if (! env('IS_INVITE_MALL') || session()->exists('member.is_member'))
- <h6 class="product-price">
- <span>{{ number_format($item['C6']) }} 원</span>
- </h6>
- @endif
- {{-- <button class="product-add" title="Add to Cart"> <i class="fas fa-cart-arrow-down"></i> <span>바로구매</span> </button>--}}
- {{-- <div class="product-action">--}}
- {{-- <button class="action-minus" title="Quantity Minus"><i class="icofont-minus"></i></button>--}}
- {{-- <input class="action-input" title="Quantity Number" type="text" name="quantity" value="1">--}}
- {{-- <button class="action-plus" title="Quantity Plus"><i class="icofont-plus"></i></button>--}}
- {{-- </div>--}}
- </div>
- </div>
- </div>
- @empty
- @endforelse
- </div>
- </div>
- <div>
- {{-- <div class="col-lg-12">--}}
- {{-- <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>--}}
- {{-- </div>--}}
- </div>
- </div>
- <!--=====================================
- PRODUCTS LIST PART END
- =======================================-->
- <!--=====================================
- LOTTERY PART START
- =======================================-->
- <section class="section mlottery-part">
- <div class="container">
- <div class="section-heading">
- @forelse($mbMainText ?? [] as $widget)
- {!! $widget['C6'] !!}
- @empty
- @endforelse
- </div>
- <div class="row">
- <div class="col-lg-12 ">
- <ul class="blog-slider slider-arrow">
- @forelse($giftCoupon ?? [] as $item)
- <li class="blog-card">
- <div class="product-card">
- <div class="product-media"> <a class="product-image" href="{{ route('item-details', [ 'id' => $item['C7'], 'raffle' => true ]) }}">
- <div class="product-label d-flex flex-row" style="top: 10px; left: 10px;">
- @forelse($item['BadgePage'] ?? [] as $badge)
- <div class="mr-1">
- <label class="label-text {{ $badge['C5'] }}">{{ $badge['C3'] }}</label>
- </div>
- @empty
- @endforelse
- </div>
- <!--이미지크기 415x415-->
- <img src="{{ msset($item['C2']) }}" alt="lottery"> </a> </div>
- <div class="product-content">
- <h6 class="product-name"> <a href="{{ route('item-details', [ 'id' => $item['C7'], 'raffle' => true ]) }}">{{ $item['C4'] }}</a> </h6>
- {{-- <h6 class="product-price"> <span>{{ number_format($item['C5']) }} 원</span> </h6>--}}
- <button onclick="go_to_gift_page('{{ $item['C7'] }}')">
- <span>응모하기 <img src="{{ '/themes/pro/nawame/resources/images/home/icn_arrow.png' }}"></span>
- </button>
- </div>
- </div>
- </li>
- @empty
- @endforelse
- </ul>
- </div>
- </div>
- </div>
- </section>
- <!--=====================================
- LOTTERY LIST PART END
- =======================================-->
- @php
- $popupPage = $bannerInput;
- $multiPopupLeft = 0;
- $multiPopupTop = 0;
- if ($popupPage) {
- $multiPopupLeft = $popupPage[0]['C7'];
- $multiPopupTop = $popupPage[0]['C8'];
- }
- $popupTitleList = collect($popupPage)->pluck('C1')->toArray();
- @endphp
- <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;">
- <div class="df-multipopup-box">
- <div class="df-slider">
- <div class="swiper-container swiper-container-slide swiper-container-initialized swiper-container-horizontal swiper-container-autoheight">
- <ul class="swiper-wrapper" style="height: 320px; transform: translate3d(-320px, 0px, 0px); transition-duration: 0ms;">
- @forelse($bannerInput ?? [] as $banner)
- <li class="swiper-slide" style="width: 320px;">
- <a href="{{ $banner['C5'] }}" target="{{ $banner['C4'] === '0' ? '_self' : '_blank' }}">
- <img src="{{ msset($banner['C11']) }}">
- </a>
- </li>
- @empty
- @endforelse
- </ul>
- <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
- </div>
- <div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets swiper-pagination-text">
- </div>
- </div>
- </div>
- <div class="df-multipopup-btn-items">
- <div class="df-multipopup-btn-item df-multipopup-btn-item_todayclose" onclick="today_close_banner()"></div>
- <div class="df-multipopup-btn-item df-multipopup-btn-item_close" onclick="$('.df-bannermanager').hide()"></div>
- </div>
- </div>
- @endsection
- @push('js')
- <script src="{{ csset('/themes/pro/nawame/resources/js/plugins/swiper/swiper-bundle.min.js') }}"></script>
- <script src="{{ csset('/js/external/jquery-ui.js') }}"></script>
- <script>
- $(document).ready(function () {
- $('.df-multipopup').draggable();
- const cook = $.cookie('multi-popup');
- const popupTitleList = @json($popupTitleList);
- if (cook === 'ok' || isEmpty(popupTitleList)) {
- $('.df-bannermanager').hide()
- }
- else {
- $('.df-bannermanager').show()
- }
- var swiper = new Swiper(".swiper-container", {
- allowTouchMove: false,
- pagination: {
- el: '.swiper-pagination',
- clickable: true,
- renderBullet: function (index, className) {
- const title_list = popupTitleList[index].split(' ')
- let caption = ''
- title_list.forEach((title, index) => {
- if (index === 0) {
- caption += title
- } else if (index === 1) {
- caption += (`<br>${title}`)
- } else {
- caption += ' ' + title
- }
- });
- return `<div class="swiper-pagination-item ${className}">
- <div class="swiper-pagination-item-link">
- <span class="swiper-pagination-item-text">${caption}</span>
- </div>
- </div>`
- }
- },
- autoplay: {
- delay: 5000,
- disableOnInteraction: false,
- },
- });
- $('.swiper-slide').on('mouseover', function(){
- swiper.autoplay.stop();
- });
- $('.swiper-slide').on('mouseout', function(){
- swiper.autoplay.start();
- });
- });
- function today_close_banner() {
- $.cookie('multi-popup', 'ok', { expires: 1, path: '/' });
- $('.df-bannermanager').hide()
- }
- function go_to_gift_page(item_slug) {
- if (isEmpty(window.Member)) {
- return location.href = '{{ route('member-login') }}'
- }
- let route_url = '{{ route('item-details', [ 'id' => ':id', 'raffle' => true ]) }}'
- route_url = route_url.replace(':id', item_slug)
- return location.href = route_url
- }
- function gift_coupon(item_id) {
- const sel_item = giftCouponList.filter(item => item['Id'] === item_id)[0]
- iziToast.question({
- timeout: 20000,
- close: false,
- overlay: true,
- displayMode: 'once',
- id: 'question',
- zindex: 999,
- title: "경품응모",
- message: "회원 아이디당 경품 한껀당 : 1개만 부여",
- position: 'center',
- buttons: [
- [`<button><b>응모하기</b></button>`, function (instance, toast) {
- instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
- submitEntry(sel_item)
- }, true],
- [`<button>취소</button>`, function (instance, toast) {
- instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
- }],
- ],
- });
- }
- async function submitEntry(item) {
- if (isEmpty(window.Member)) {
- return location.href = '{{ route('member-login') }}'
- }
- const unique_key = String(item['HId']) + String(item['Id']) + String(window.Member['MemberId'])
- const post_pick = await get_api_data('post-pick', {
- Page : [ { Pc10: unique_key } ]
- })
- if (isEmpty(post_pick.data.apiStatus)) {
- return iziToast.error({
- title: 'Error',
- message: '이미 응모한 품목입니다',
- });
- }
- const post_title = item['Id'] + '-' + moment(new Date()).format('YYYYMMDD') + '-' + rand(1, 99) + window.Member['MemberId']
- const response = await get_api_data('post-act', {
- Page : [
- {
- Id: 0,
- PostTitle: post_title,
- PostTypeId: 51,
- Pc1: item['C2'],
- Pc2: item['C3'],
- Pc3: item['C4'],
- Pc4: item['C5'],
- Pc10: unique_key,
- MemberId: window.Member['MemberId']
- }
- ]
- })
- show_iziToast_msg(response.data.Page, function () {
- confirm('응모번호: ' + post_title)
- })
- }
- const giftCouponList = @json($giftCoupon);
- </script>
- @endpush
|