<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  :GoodsDeliveryFormMob.html
 * @desc	: 상품 배송안내 팝업
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE		 AUTHOR	  DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.04.06   eskim		최초 작성
 *******************************************************************************
 -->
<div class="modal-dialog" role="document">
	<div class="modal-content">
		<div class="modal-header">
			<!-- 해당상품 -->
			<div class="item_blk">
				<div class="item_prod" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}">
					<div class="item_state">
						<a href="javascript:void(0);" class="itemLink">
							<div class="itemPic">
								<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=40'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
							</div>
							<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">NBA</p>
							<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성</div>
						</a>
					</div>
				</div>
			</div>
			<!-- //해당상품 -->
		</div>
		<div class="modal-body" id="goodsDealDelivery">
		</div>
	</div>
</div>
<a href="javascript:void(0);" rel="modal:close" onclick="cfCloseLayer('layer_goods_delivery')" class="close-modal">Close</a>
<script th:inline="javascript">
/*<![CDATA[*/
		
	// 구성 상품 상세 배송정보
	var fnGoodsDetailDelivery = function(params) {
		//gagajf.ajaxSubmit("/goods/detail/delivery/frame", "html", "goodsDealDelivery", params);
		$.ajax( {
			type		: "POST",
			url 		: '/goods/detail/delivery/frame',
			data		: JSON.stringify(params),
			dataType 	: 'html',
			beforeSend : function(xhr, settings) {
				xhr.setRequestHeader("AJAX"			, "true");
				xhr.setRequestHeader('Accept'		, 'application/json');
				xhr.setRequestHeader('Content-Type'	, 'application/json');
			},
			success 	: function(result) {
				if (result != null) {
					$("#goodsDealDelivery").css("display", "block");
					$("#goodsDealDelivery").html(result);
				}
			}
		});	
	}
	
	$(document).ready( function() {

		// 배송정보 
		var params = new Object();
		let goodsCd = [[${goodsInfo.goodsCd}]]
		params.goodsCd = goodsCd;
		fnGoodsDetailDelivery(params);  // ajax html
		
	});
	
/*]]>*/
</script>
 </html>