Procházet zdrojové kódy

Merge branch 'develop' into bin2107

bin2107 před 4 roky
rodič
revize
90d1273c9e

+ 1 - 10
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -268,11 +268,7 @@ public class TsfCustomerService {
 		customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
 		customer.setCustGb(TscConstants.CustGb.NORMAL.value());
 		customer.setCustGrade(TscConstants.CustGrade.WELCOME.value());
-		// 앱이면 앱푸시 기본값으로 수신동의 처리
-		String isApp = TsfSession.getAttribute("isApp");
-		if ("true".equals(isApp)) {
-			customer.setAppAgreeYn("Y");
-		}
+		
 		int custCnt = customerDao.createCustomer(customer);
 		customerDao.saveBatchBirth(customer);
 
@@ -326,11 +322,6 @@ public class TsfCustomerService {
 		customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
 		customer.setCustGb(TscConstants.CustGb.NORMAL.value());
 		customer.setCustGrade(TscConstants.CustGrade.WELCOME.value());
-		// 앱이면 앱푸시 기본값으로 수신동의 처리
-		String isApp = TsfSession.getAttribute("isApp");
-		if ("true".equals(isApp)) {
-			customer.setAppAgreeYn("Y");
-		}
 
 		int custCnt = customerDao.createCustomer(customer);
 		customerDao.createCustomerSns(customer);

+ 18 - 0
src/main/java/com/style24/front/biz/web/TsfAppController.java

@@ -104,6 +104,24 @@ public class TsfAppController extends TsfBaseController {
 		return result;
 	}
 
+	/**
+	 * 앱푸시, 앱마케팅 수신동의
+	 *
+	 * @param  customer - 수신동의 여부
+	 * @author jsshin
+	 * @since 2021. 06. 22
+	 */
+	@PostMapping("/push/update")
+	@ResponseBody
+	public GagaMap updateAppPush(@RequestBody Customer customer) {
+		GagaMap result = new GagaMap();
+		int appResultCnt = customerService.updateAppAgreeYn(customer.getAppAgreeYn());
+		int mkResultCnt = customerService.updateMkAgreeYn(customer.getMkAgreeYn());
+		result.setInt("mkResultCnt", mkResultCnt);
+		result.setInt("appResultCnt", appResultCnt);
+		return result;
+	}
+
 	/**
 	 * 앱알림 화면
 	 *

+ 7 - 4
src/main/java/com/style24/front/biz/web/TsfCustomerController.java

@@ -455,6 +455,7 @@ public class TsfCustomerController extends TsfBaseController {
 	 * @param encodeData - 휴대폰인증에서 전달받은 인증결과 암호화 데이터 취득
 	 * @param encData - 아이핀에서 전달받은 인증결과 암호화 데이터 취득
 	 * @param redirectUrl - 모바일은 호출한 URL 암호화 데이터 전달
+	 * @param custParams - 회원가입시 입력 받았던 내용 다시 받음
 	 * @return ModelAndView
 	 * @author jsshin
 	 * @since 2021. 02. 09
@@ -762,8 +763,9 @@ public class TsfCustomerController extends TsfBaseController {
 	 * @since 2021. 03. 08
 	 */
 	@RequestMapping("/dormant/certify/form")
-	public ModelAndView getDormantCeirtyForm(@RequestParam(value = "sEncData", required = false) String sEncData, @RequestParam(value = "authMethod", required = false) String authMethod, @RequestParam(value = "custParams", required = false) String custParams) {
-
+	public ModelAndView getDormantCeirtyForm(@RequestParam(value = "sEncData", required = false) String sEncData
+			, @RequestParam(value = "authMethod", required = false) String authMethod
+			, @RequestParam(value = "custParams", required = false) String custParams) {
 		ModelAndView mav = new ModelAndView();
 
 		// http 에서는 Same-Site None 설정이 안되므로 아래와 같이 처리
@@ -836,8 +838,9 @@ public class TsfCustomerController extends TsfBaseController {
 	 * @since 2021. 03. 10
 	 */
 	@RequestMapping("/certification/form")
-	public ModelAndView getCertificationForm(@RequestParam(value = "sEncData", required = false) String sEncData, @RequestParam(value = "authMethod", required = false) String authMethod, @RequestParam(value = "custParams", required = false) String custParams) {
-
+	public ModelAndView getCertificationForm(@RequestParam(value = "sEncData", required = false) String sEncData
+			, @RequestParam(value = "authMethod", required = false) String authMethod
+			, @RequestParam(value = "custParams", required = false) String custParams) {
 		ModelAndView mav = new ModelAndView();
 
 		// http 에서는 Same-Site None 설정이 안되므로 아래와 같이 처리

+ 0 - 3
src/main/webapp/WEB-INF/views/mob/SigninFormMob.html

@@ -171,9 +171,6 @@
 	var fnReloadAfterLogin = function(result) {
 		if (result.status === 'OK') {
 			if (_isApp === 'true') {
-				if (gagajf.isNull(result.appAgreeDt)) {
-					fnAppPushAgreeUpdate('Y');
-				}
 				document.location.href = "idsend://?id=" + result.custNo + "^link=" + result.returnUrl;
 			} else {
 				document.location.href = result.returnUrl;

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/app/SettingFormMob.html

@@ -162,7 +162,7 @@
 			if ($(this).is(":checked")) {
 				if (_osType === 'A') {
 					window.style24.pushEnable('ON');
-				} else if (_osType == 'I') {
+				} else if (_osType === 'I') {
 					window.webkit.messageHandlers.pushEnable.postMessage({"status":"ON"});
 				}
 				appAgreeYn = 'Y';

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/callcenter/OneToOneQnaFormMob.html

@@ -136,7 +136,7 @@
 									<div class="form_field">
 										<div class="ui_col_12 form_full">
 											<div class="input_wrap">
-												<textarea class="doc_contactus" id="questContent" name="questContent" cols="30" rows="10" style="resize: none;" placeholder="내용을 입력해 주세요. (필수)" required="required" data-valid-name="내용"></textarea>
+												<textarea class="doc_contactus" name="questContent" cols="30" rows="10" style="resize: none;" placeholder="내용을 입력해 주세요. (필수)" required="required" data-valid-name="내용"></textarea>
 												<p class="txt_cnt">
 													<span id="contactus_cnt" class="contactus_cnt"><em class="c_primary">0</em>/500</span>
 												</p>
@@ -285,7 +285,7 @@
 		
 		$('#btnQnaMore').trigger('click');
 		
-		$('#questContent').bind('input paste', function() {
+		$('#qnaRegisterForm textarea[name=questContent]').bind('input paste', function() {
 			  $(this).trigger('keyup');
 		});
 	});

+ 23 - 19
src/main/webapp/WEB-INF/views/mob/common/fragments/FooterMob.html

@@ -10,7 +10,7 @@
 			<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MYPAGE);" class="btn-my">Mypage</a>
 			<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);" class="btn-home">Home</a>
 			<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_WISHLIST);" class="btn-wish">Wish</a>
-			<a href="javascript:history.back(-1);" class="btn-history">History</a>
+			<a href="javascript:void(0);" class="btn-history">History</a>
 		</div>
 			<!-- 
 				<span class="txt-balloon" id="tutorial_mycloset" style=""> 툴팁예제</span>
@@ -368,30 +368,34 @@
 			}
 		});
 
-		if (_isApp === 'true') {
-			//$('#alramHide').show();
-		}
-		
 	});
 
-	// 앱마케팅푸시 수신거부
-	$(document).on('click','#btnMkPushClose',function(){
-	  $('#alramHide').hide();
-	  	// 수신거부
-		if (_osType === 'A') {
-
-		} else if (_osType == 'I') {
+	// 앱 최초기동시
+	var agreeMarketingPush = function () {
+		$('#alramHide').show();
+	}
 
+	// 앱마케팅 푸시 수신동의
+	$(document).on('click','#btnMkPushAgree',function() {
+		if (_isApp === 'true') {
+			if ( _osType === 'A') {
+				window.style24.setPushSetting("ON", "ON");
+			} else if (_osType === 'I') {
+				window.webkit.messageHandlers.setPushSetting.postMessage({"pushStat":"ON", "advertisePushStat":"ON"});
+			}
+			$('#alramHide').hide();
 		}
 	});
 
-	// 앱마케팅 푸시 수신동의
-	$(document).on('click','#btnMkPushAgree',function(){
-		$('#alramHide').hide();
-		if (_osType === 'A') {
-
-		} else if (_osType == 'I') {
-
+	// 앱마케팅푸시 수신거부
+	$(document).on('click','#btnMkPushClose',function() {
+		if (_isApp === 'true') {
+			if (_osType === 'A') {
+				window.style24.setPushSetting("ON", "OFF");
+			} else if (_osType === 'I') {
+				window.webkit.messageHandlers.setPushSetting.postMessage({"pushStat":"ON", "advertisePushStat":"OFF"});
+			}
+			$('#alramHide').hide();
 		}
 	});
 

+ 38 - 2
src/main/webapp/WEB-INF/views/mob/customer/JoinCompleteFormMob.html

@@ -92,18 +92,54 @@
 	</main>
 <script th:inline="javascript">
 	const maskingCustId = [[${maskingCustId}]];
-
+	let appAgreeYn = 'Y';
 	$(document).ready(function(){
 		if (_isApp === 'true') {
 			if (gagajf.isNull(maskingCustId)) {
 				if (_osType === 'A') {
 					window.style24.setCustNo([[${custNo}]]);
+					//window.style24.isPushEnable();
 				} else if (_osType === 'I') {
-
+					//window.webkit.messageHandlers.isPushEnable.postMessage({"dummy":"dummy"});
 				}
 			}
 		}
 	});
+
+	// 앱에서 호출되는 함수(앱푸시)
+	var settingsSwtichPush = function(onOff) {
+		if (onOff === 'ON') {
+			appAgreeYn = 'Y';
+			window.style24.isAdEnable();
+			window.webkit.messageHandlers.isAdEnable.postMessage({"dummy":"dummy"});
+		} else if (onOff === 'OFF') {
+			appAgreeYn = 'N';
+			// window.style24.setCustNo([[${custNo}]],'OFF', 'OFF');
+			fnUpdatePush(appAgreeYn, 'N');
+		}
+	}
+
+	// 앱에서 호출되는 함수(마케팅동의)
+	var settingsSwtichAdvertise = function (onOff) {
+		let mkAgreeYn = 'N';
+		if (onOff === 'ON') {
+			mkAgreeYn = 'Y';
+		// window.style24.setCustNo([[${custNo}]],'ON', 'ON');
+		} else if (onOff === 'OFF'){
+			mkAgreeYn = 'N';
+		// window.style24.setCustNo([[${custNo}]],'ON', 'OFF');
+		}
+		fnUpdatePush(appAgreeYn, mkAgreeYn);
+	}
+	
+	var fnUpdatePush = function (appAgreeYn, mkAgreeYn) {
+		let params = {}
+		params.appAgreeYn = appAgreeYn;
+		params.mkAgreeYn = mkAgreeYn;
+		let jsonData = JSON.stringify(params);
+		gagajf.ajaxJsonSubmit('/app/push/update', jsonData);
+	}
+
 </script>
 </th:block>
 </body>

+ 6 - 0
src/main/webapp/WEB-INF/views/mob/goods/GoodsQnaDetailFormMob.html

@@ -122,6 +122,12 @@
 		setTimeout(fnGoodsQnaList, 100);  //딜상품상세 용
 	}
 	
+	$(document).ready( function() {
+		$("#goodsQnaDetailForm  textarea[name=questContent]").bind('input paste', function() {
+			  $(this).trigger('keyup');
+		});
+	});
+	
 	
 	
 /*]]>*/

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/mypage/MypageReviewCreateFormMob.html

@@ -657,7 +657,7 @@ var fnChooseFile = function(obj) {
 					                reader.readAsDataURL(rotateFile);
 
 					            }, fileType)
-					        }, { orientation: 1});
+					        }, { orientation: 6});
 						}
 				); 
 		}

+ 8 - 3
src/main/webapp/WEB-INF/views/mob/social/SocialMainFormMob.html

@@ -189,15 +189,20 @@ var fnSocialInfiniteScrollInit = function(){
 	$("#listBox").html("");
 } 
 
-
+var totalCnt = 0;
+var idx = 1;
 //인피니트 스크롤 이벤트 발생 시 데이터 가져오기
 var fnGetInfiniteScrollDataList = function(pageNum) {
 	$("#socialForm input[name=pageNo]").val(pageNum+1);
-	gagajf.ajaxFormSubmit("/social/list",document.socialForm, gagaInfiniteScroll.jsonToHtml);
+	if(idx==1 || totalCnt > Number($("#socialForm").find("input[name=pageSize]").val())){
+		idx++;
+		gagajf.ajaxFormSubmit("/social/list",document.socialForm, gagaInfiniteScroll.jsonToHtml);
+	}
+	
 }
 
 var fnDrawInfiniteScrollData = function (result){
-	let totalCnt = result.totalCnt;
+	totalCnt = result.totalCnt;
 	gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
 	
 	if (result.dataList != null && result.dataList.length > 0) {

+ 9 - 3
src/main/webapp/WEB-INF/views/web/social/SocialMainFormWeb.html

@@ -214,15 +214,21 @@ var fnSocialInfiniteScrollInit = function(){
 	$("#listBox").html("");
 }
 
-
+var totalCnt = 0;
+var idx = 1;
 //인피니트 스크롤 이벤트 발생 시 데이터 가져오기
 var fnGetInfiniteScrollDataList = function(pageNum) {
 	$("#socialForm input[name=pageNo]").val(pageNum+1);
-	gagajf.ajaxFormSubmit("/social/list",document.socialForm, gagaInfiniteScroll.jsonToHtml);
+	
+	if(idx==1 || totalCnt > Number($("#socialForm").find("input[name=pageSize]").val())){
+		idx++;
+		gagajf.ajaxFormSubmit("/social/list",document.socialForm, gagaInfiniteScroll.jsonToHtml);
+	}
+	
 }
 
 var fnDrawInfiniteScrollData = function (result){
-	let totalCnt = result.totalCnt;
+	totalCnt = result.totalCnt;
 	gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
 
 	if (result.dataList != null && result.dataList.length > 0) {