<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : GoodsReviewFormMob.html
 * @desc	: 상품 상품평 팝업
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE		 AUTHOR	  DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.04.07   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}" 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">
			<div class="pop_cont pd_review" id="goodsDealReview" data-id="layer_infinite_item" >
			</div>
		</div>
	</div>
</div>
<a href="javascript:void(0);" rel="modal:close" onclick="cfCloseLayer('layer_goods_review')" class="close-modal">Close</a>
<script th:inline="javascript">
/*<![CDATA[*/
	
	// 구성 상품 상세 상품평
	var fnGoodsDetailReview = function(params) {
		// gagajf.ajaxSubmit("/goods/detail/review/frame", "html", "goodsDealReview", params);
		$.ajax( {
			type		: "POST",
			url 		: '/goods/detail/review/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) {
					$("#goodsDealReview").css("display", "block");
					$("#goodsDealReview").html(result);
				}
			}
		});
	}
	
	$(document).ready( function() {

		// 상품평정보 
		var params = new Object();
		let goodsCd = [[${goodsInfo.goodsCd}]]
		params.goodsCd = goodsCd;
		fnGoodsDetailReview(params);  // ajax html
		
	});
	
/*]]>*/
</script>	
 </html>