Explorar o código

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front.git into develop

gagamel %!s(int64=5) %!d(string=hai) anos
pai
achega
ac9b9af369

+ 7 - 6
src/main/webapp/WEB-INF/views/mob/order/OrderFormMob.html

@@ -579,9 +579,6 @@ var orderGiftInfoSet = function() {
 					
 					// 2021.06.03
 					window.style24.getContact();
-					// 데이타테스트
-					//var obj = {"contact" : {"name" : "홍길동", "phnno" : "010-1234-0000"}}
-					//contactInfo(obj);
 				}
 			});
 			
@@ -592,9 +589,13 @@ var orderGiftInfoSet = function() {
 }
 
 // 2021.06.03 어플 callback 함수 호출
-var contactInfo = function(jsonString) {
-	$("#orderForm #orderGiftInfo input[name=recipNm]").val(jsonString.contact.name);
-	$("#orderForm #orderGiftInfo input[name=recipPhnno]").val(jsonString.contact.phnno);
+function contactInfo(jsonString) {
+	let jsonObj = JSON.parse(jsonString);
+	var phnno = jsonObj.contact.phnno;
+	phnno = phnno.replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-");
+	
+	$("#orderForm #orderGiftInfo input[name=recipNm]").val(jsonObj.contact.name);
+	$("#orderForm #orderGiftInfo input[name=recipPhnno]").val(phnno);
 }
 
 // 1.4.2 배송정보로드

+ 5 - 2
src/main/webapp/WEB-INF/views/mob/order/OrderGiftInfoMob.html

@@ -87,6 +87,7 @@
 
 <script th:inline="javascript">
 var dispYn = [[${order.dispYn}]]; // 노출여부
+var frontGb = [[${frontGb}]];
 
 //화면노출
 var orderGiftInfoDispYn = function(temp) {
@@ -101,12 +102,14 @@ var orderGiftInfoDispYn = function(temp) {
 
 //컨텐츠 호출
 $(document).ready( function() {
-	
+	//alert(frontGb);
+	//var userAgent=navigator.userAgent.toLowerCase();
+	//alert("userAgent ::: " + userAgent);
 });
 
 //2021.04.09 하이픈처리
 $(document).on("keyup", "#orderGiftInfo input[name=recipPhnno]", function() { 
-	$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
+	$(this).val($(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
 });
 
 //선물 받으실 분 직접입력 글자 제한