-->
-->
// $(window).resize(function() {
// var windowWidth = document.documentElement.clientWidth;
// var divWidth = $('.content-wrap').width();
// var leftDistence = (windowWidth - divWidth) / 2;
// $('.bottom-floating-btn-wrap').css('left', leftDistence);
// });
// yesirApp.controller("MatzipListController", MatzipListController);
// MatzipListController.$inject = ['$window', '$http'];
// function MatzipListController($window, $http) {
// var vm = this;
// angular.extend(vm, {
// products : [],
// categories : [],
// request : {
// categories : [],
// numberSequenceOption : 'new',
// limit : 10,
// page : 0
// },
// ysrBdInfo : {
// lineupYn : 'N',
// hndodrYn : 'N',
// godsYn : 'N',
// telephone : null,
// storeName : null,
// userName : null,
// content : null,
// },
// styleGnbGuide : {
// "float": 'left',
// "width": "25%",
// "height": "60%"
// },
// selectProduct : selectProduct,
// selectCategory: selectCategory,
// loadMore: loadMore,
// sort : sort,
// scrollingDataEnd: false,
// loading: false,
// showPage: 'foodtour',
// device: 'pc',
// isShow: false,
// channel: null,
// topBannerList:null,
// deviceType: deviceType,
// upScrollNav : upScrollNav,
// downScrollNav : downScrollNav,
// calculateEventHeight : calculateEventHeight,
// changeFormatName: changeFormatName,
// moveFoodtourDetail: moveFoodtourDetail,
// moveBottomNav: moveBottomNav,
// moveNomemberBotton: moveNomemberBotton,
// gotoapp: gotoapp,
// insertInquiry: insertInquiry,
// movePage: movePage,
// gotoVertifyTelephone: gotoVertifyTelephone,
// popAgreement: popAgreement,
// popService: popService,
// popCheckBizInfo: popCheckBizInfo,
// gotoYesirInfo: gotoYesirInfo,
// isShowService: isShowService,
// checkPageLoadCount: checkPageLoadCount,
// getStyleGnbImage:getStyleGnbImage,
// getStyleGnbFont:getStyleGnbFont,
// gotoDetail:gotoDetail,
// pushGATM:pushGATM,
// });
// function getStyleGnbFont(type) {
// var color = "#212121";
// if(vm.showPage == type) {
// color = "#ec6d6b";
// }
// var fontSize = "13px";
// if(vm.device != "pc") {
// fontSize = "11px"
// }
// var style = {
// "line-height": "18px",
// "height": "10px",
// "color": color,
// "font-size": fontSize,
// "display":"block"
// }
// return style;
// }
// function getStyleGnbImage(url, type){
// if(url) {
// if(vm.showPage == type) {
// url += "_pink.svg"
// } else {
// url += ".svg";
// }
// }
// var imageSize = "27px";
// if(vm.device != "pc") {
// imageSize = "22px"
// }
// var style = {
// "margin": "auto",
// "background-image":"url('" + url + "')",
// "background-repeat": "no-repeat",
// "background-size" : imageSize + " " + imageSize,
// "width": imageSize,
// "height": imageSize,
// "cursor":"pointer"
// }
// return style;
// }
// init();
// function checkPageLoadCount() {
// gtag('event','page view',{'event_category':'YF 랜딩', 'event_label':vm.channel});
// if(!localStorage.getItem("visitedRealtimeWaitYFLanding")){
// gtag('event','first_visit',{'event_category':'YF 랜딩', 'event_label': vm.channel});
// localStorage.setItem("visitedRealtimeWaitYFLanding",true);
// }
// }
// function isShowService() {
// vm.isShow = true;
// var divHeight = document.body.scrollHeight + 200;
// console.log(divHeight);
// setTimeout(function(){
// window.scrollTo({top:divHeight, left:0, behavior:'smooth'});
// }, 200);
// }
// function gotoYesirInfo() {
// var url = "http://yesir.co.kr/intro";
// window.open(url);
// }
// function popCheckBizInfo() {
// var url = "https://www.ftc.go.kr/bizCommPop.do?wrkr_no=5508800745&apv_perm_no=";
// var name = "사업자번호 조회";
// var option = "width = 500, height = 500, top = 100, left = 200, location = no"
// window.open(url, name, option);
// }
// function gotoVertifyTelephone() {
// location.href = 'https://m.yesir.co.kr/public/mobile-verification?action=orderFoodtour';
// }
// function movePage(type) {
// vm.showPage = type;
// $("html, body").animate({ scrollTop: 0 }, "slow");
// if(vm.showPage == 'foodtour') {
// $('.content-wrap').css('margin-top', '114px');
// } else {
// $('.content-wrap').css('margin-top', '0px');
// }
// }
// function gotoapp() {
// if (navigator.platform.toLowerCase() == "iphone") {
// location.href = 'https://itunes.apple.com/kr/app/yesir/id1375801207?mt=8';
// } else {
// location.href = 'https://play.google.com/store/apps/details?id=net.yesir';
// }
// }
// function insertInquiry() {
// if(!isCheckValue()) {
// return;
// }
// vm.ysrBdInfo.contents = '문의 서비스: ';
// if(vm.ysrBdInfo.godsYn == 'Y') {
// vm.ysrBdInfo.contents += '푸드투어, ';
// }
// if(vm.ysrBdInfo.hndodrYn == 'Y') {
// vm.ysrBdInfo.contents += '핸디오더, ';
// }
// if(vm.ysrBdInfo.lineupYn == 'Y') {
// vm.ysrBdInfo.contents += '줄서기, ';
// }
// vm.ysrBdInfo.contents += '이름: ' + vm.ysrBdInfo.userName + '매장명: ' + vm.ysrBdInfo.storeName + '전화번호: ' + vm.ysrBdInfo.telephone + '문의사항: ' + vm.ysrBdInfo.content + '';
// $http.post('https://m.yesir.co.kr/public/inquiry', vm.ysrBdInfo).then(function (result) {
// if(result.data.boardSeq) {
// swal({
// title: '입점 문의가 완료 되었습니다. 빠른 시일 내에 연락드리겠습니다. 감사합니다.',
// showConfirmButton: true,
// confirmButtonText: '확인',
// reverseButtons: true,
// confirmButtonColor: '#ec6d6b'
// }).then(function (result) {
// });
// $('.content-wrap').css('margin-top', '114px');
// $("html, body").animate({ scrollTop: 0 }, "slow");
// vm.showPage = 'foodtour';
// } else {
// }
// })
// }
// function isCheckValue() {
// if(vm.ysrBdInfo.lineupYn == 'N' && vm.ysrBdInfo.hndodrYn == 'N' && vm.ysrBdInfo.godsYn == 'N') {
// swal({
// title: '문의 서비스를 확인해 주세요.',
// showConfirmButton: true,
// confirmButtonText: '확인',
// reverseButtons: true,
// confirmButtonColor: '#ec6d6b'
// }).then(function (result) {
// if (result.value) {
// angular.element('#foodtourChk').focus();
// }
// });
// return false;
// }
// if(!checkTelNumber(vm.ysrBdInfo.telephone, '전화번호를 확인해 주세요.')) {
// return false;
// }
// checkInput(vm.ysrBdInfo.storeName, '#storeName');
// checkInput(vm.ysrBdInfo.userName, '#userName');
// checkInput(vm.ysrBdInfo.content, '#content');
// return true;
// }
// function checkInput(inputValue, inputId) {
// if(!inputValue) {
// swal({
// title: '성함을 확인해 주세요.',
// showConfirmButton: true,
// confirmButtonText: '확인',
// reverseButtons: true,
// confirmButtonColor: '#ec6d6b'
// }).then(function (result) {
// if (result.value) {
// angular.element(inputId).focus();
// }
// });
// return false;
// }
// }
// function checkTelNumber(telNumber, alertTest) {
// var regExp = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
// if(!regExp.test(telNumber)) {
// swal({
// title: alertTest,
// showConfirmButton: true,
// confirmButtonText: '확인',
// reverseButtons: true,
// confirmButtonColor: '#ec6d6b'
// }).then(function (result) {
// if (result.value) {
// angular.element('#toTelephone').focus();
// }
// });
// return false;
// }
// return true;
// }
// function moveBottomNav() {
// var windowWidth = document.documentElement.clientWidth;
// var divWidth = angular.element('.content-wrap').width();
// var leftDistence = (windowWidth - divWidth) / 2;
// return {'left' : leftDistence};
// }
// function moveNomemberBotton() {
// var divWidth = angular.element('.content-wrap').width();
// return {'margin-left' : divWidth - 150};
// }
// function moveFoodtourDetail(setupId) {
// location.href = 'https://m.yesir.co.kr/public/foodtourDetail?setupId=' + setupId;
// }
// function init() {
// angular.element('.whole-content-wrapper').css('background-color', '#FFF');
// angular.element('body').css('background-color', '#f9f9f9');
// vm.request.page = 1;
// var pageName = window.utils.getParameterByName('page-name');
// if(pageName) {
// movePage(pageName);
// }
// getProducts();
// vm.device = whichOfMobileDevice();
// vm.channel = window.utils.getParameterByName('channel');
// checkPageLoadCount();
// getAgreement("T","002").then(function(result) {
// vm.agreementContentsPrivacy = result.data.data;
// });
// getAgreement("T","001").then(function(result) {
// vm.agreementContentsServiceTerm = result.data.data;
// });
// getBannerInfo(6).then(function(result) {
// if(result.data.data) {
// if(result.data.data) {
// vm.topBannerList = result.data.data;
// vm.topBannerList.forEach(function(banner){
// gtag('event','page view',{'event_category': banner.gaCategory, 'event_label':vm.channel});
// if(!localStorage.getItem("foodtourLandingTopBanner_" + banner.id + "_" + banner.gaCategory)){
// gtag('event','first visit',{'event_category': banner.gaCategory, 'event_label':vm.channel});
// localStorage.setItem("foodtourLandingTopBanner_" + banner.id + "_" + banner.gaCategory, true);
// }
// });
// setTimeout(function(){
// new Swiper('.swiper-container', {
// loop: true,
// pagination: {
// el: '.swiper-pagination',
// },
// autoplay: {
// delay: 5000,
// },
// });
// }, 200);
// }
// }
// });
// }
// function popService() {
// swal({
// title: '이용약관',
// html: '
' +
// '
예써 서비스 이용 약관
' +
// '
' +
// vm.agreementContentsServiceTerm +
// '
' +
// '
'
// }).then(function (andThen) {
// return;
// });
// $('#swal2-content pre').css('white-space', 'initial');
// }
// function popAgreement() {
// swal({
// title: '개인정보처리방침',
// html: '
' +
// '
예써 개인정보처리방침
' +
// '
' +
// vm.agreementContentsPrivacy +
// '
' +
// '
'
// }).then(function (andThen) {
// return;
// });
// $('#swal2-content pre').css('white-space', 'initial');
// }
// function getAgreement(type, code) {
// vm.loading = true;
// return $http.get('https://m.yesir.co.kr/api/matzip/v2/agreement?type=' + type + '&code=' + code);
// }
// function whichOfMobileDevice(){
// let os;
// let mobile = (/iphone|ipad|ipod|android/i.test(navigator.userAgent.toLowerCase()));
// if (mobile) {
// let userAgent = navigator.userAgent.toLowerCase();
// if (userAgent.search("android") > -1){
// return os = "android";
// }else if ((userAgent.search("iphone") > -1) || (userAgent.search("ipod") > -1) || (userAgent.search("ipad") > -1)){
// return os = "ios";
// }else{
// return os = "otehr";
// }
// } else {
// return os = "pc";
// }
// }
// function changeFormatName(name) {
// return "[" + name + "]";
// }
// function calculateEventHeight(parentId, id) {
// var tagId = '#eventTag' + parentId + id;
// setTimeout(function(){
// var currentHeight = angular.element(tagId).outerHeight();
// if(currentHeight == 19) {
// angular.element(tagId).css('margin-top', '6px');
// }
// }, 100);
// }
// var lastScrollTop = 0;
// var delta = 5;
// var fixBoxHeight = document.body.offsetHeight
// $window.onscroll = function() {
// var nowScrollTop = window.scrollY;
// if(Math.abs(lastScrollTop - nowScrollTop) <= delta){
// return;
// }
// if(nowScrollTop > lastScrollTop && nowScrollTop > fixBoxHeight){
// upScrollNav(0.5, 44, 0);
// }else{
// downScrollNav(0.5, 44, 44);
// }
// lastScrollTop = nowScrollTop;
// };
// var isDownScrolled = true;
// function upScrollNav(seconds, height, option){
// var frame = 45;
// var frameSpeed = calculateFrameSpeed(frame, seconds, height);
// var interval;
// if(isDownScrolled){
// interval = setInterval( function(){
// option += frameSpeed.distance;
// if(option > height) {
// clearInterval(interval);
// }
// document.getElementsByClassName('sort-category')[0].setAttribute("style", 'margin-top : -' + option + 'px;')
// }, frameSpeed.FPS);
// isDownScrolled = false;
// isUpScrolled = true;
// }
// }
// var isUpScrolled = true;
// function downScrollNav(seconds, height, option){
// var frame = 45;
// var frameSpeed = calculateFrameSpeed(frame, seconds, height);
// var interval;
// if(isUpScrolled){
// interval = setInterval(function(){
// option -= frameSpeed.distance;
// if(option < 0) {
// clearInterval(interval);
// }
// document.getElementsByClassName('sort-category')[0].setAttribute("style", 'margin-top : -' + option + 'px;')
// }, frameSpeed.FPS);
// isDownScrolled = true;
// isUpScrolled = false;
// }
// }
// function calculateFrameSpeed(frame, seconds, height){
// var distance = height / (frame * seconds);
// var FPS = (seconds * 1000) / frame;
// var frameSpeed = {
// 'distance' : distance,
// 'FPS' : FPS
// }
// return frameSpeed;
// }
// function loadMore() {
// var documentHight = Math.max(
// document.body.scrollHeight, document.documentElement.scrollHeight,
// document.body.offsetHeight, document.documentElement.offsetHeight,
// document.body.clientHeight, document.documentElement.clientHeight);
// var tirggerPosition = documentHight * (1/2);
// if(window.pageYOffset + 13 > tirggerPosition && !vm.scrollingDataEnd && !vm.loading) {
// getProducts();
// }
// }
// function sort(numberSequenceOption) {
// $window.scrollTo(0, 0);
// vm.request.page = 1;
// isUpScrolled = true;
// vm.scrollingDataEnd = false;
// vm.request.numberSequenceOption = numberSequenceOption;
// getProducts();
// }
// function selectCategory(category, $event) {
// $window.scrollTo(0, 0);
// vm.request.page = 1;
// isUpScrolled = true;
// vm.scrollingDataEnd = false;
// if(category == undefined){
// vm.request.categories = [];
// }else if(vm.request.categories.indexOf(category) >= 0){
// $($event.currentTarget).find('.menu-category-image').removeClass('active')
// vm.request.categories.splice(vm.request.categories.indexOf(category), 1);
// }else{
// $($event.currentTarget).find('.menu-category-image').addClass('active')
// vm.request.categories.push(category);
// }
// getProducts();
// }
// function getProducts() {
// vm.loading = true;
// return $http.get('https://m.yesir.co.kr/api/matzip/list', {params: vm.request})
// .then(success)
// .catch(error);
// function success(result) {
// if(vm.request.page == 1 ){
// vm.products = [];
// }
// var productsResponse = result.data.data.matzipProductListResponse.data
// var categories = result.data.data.categories.data;
// for(var j = 0; i < categories.length; j++) {
// var obj = categories[j];
// obj.defaultUrl = 'https://m.yesir.co.kr/resources/images/matzip/' + obj.cd + '_btn_non.png' ;
// obj.activeUrl = 'https://m.yesir.co.kr/resources/images/matzip/' + obj.cd + '_btn_press.png' ;
// }
// if(productsResponse && productsResponse.length > 0) {
// var i = 0
// var responseSize = productsResponse.length;
// for(i = 0; i < responseSize ; i++) {
// vm.products.push(productsResponse[i]);
// }
// if(vm.request.categories.length == 0 && vm.request.page == 1 ){
// vm.categories = categories;
// }
// vm.request.page++;
// vm.loading = false;
// } else {
// if(vm.request.categories.length == 0 && vm.request.page == 1 ){
// vm.categories = categories;
// }
// vm.scrollingDataEnd = true;
// vm.loading = false;
// }
// }
// function error() {
// swal({ html: '알 수 없는 오류가 발생했습니다.
관리자에게 문의해주세요.' });
// vm.loading = false;
// }
// }
// function selectProduct(setupId) {
// location.href = 'https://m.yesir.co.kr/public/foodtourDetail?setupId=' + setupId + '&channel=' + vm.channel;
// }
// function getBannerInfo(categoryId) {
// return $http.get('https://m.yesir.co.kr/api/v1/banner/category/' + categoryId).then();
// }
// function gotoDetail(targetUrl, eventCategory) {
// gtag('event','click',{'event_category':eventCategory, 'event_label': vm.channel});
// location.href = targetUrl;
// }
// function pushGATM(product, index) {
// // to.lian 카테고리 추후 기능추가해서 넣어주시길 바래요 ricky@yesir.co.kr 2021/06/29
// var category;
// if(false) {
// category = "";
// for(var i = 0; i < vm.productCategories.length; i++) {
// category += vm.productCategories[i].cdNm;
// if(i < vm.productCategories.length - 1) {
// category += " / ";
// }
// }
// }
// var productObject = [{
// 'id': product.productCode, //상품 코드 e.g. 2068514
// 'name':product.productName, //상품 이름 e.g. 성수동 핫플 꾸아만의 고기고기한 왕갈비 쌀국수
// 'price': product.salesPrice, //상품 단가 e.g. 320200
// 'brand':product.storeName, // e.g. 꾸아
// 'category': undefined, //상품 카테고리 e.g. 세계음식 / 베트남 / 쌀국수
// 'position': index + 1, //목록 내에서의 상품 위치(좌측이 1번) e.g. 1 / 2 / 3 ..
// }];
// pushGaTagManager('ee-productClick', productObject);
// }
// }