|
|
@@ -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 배송정보로드
|