sito web:Marais 瑪黑家居選物soddisfare
Marais瑪黑-禮物推薦、家居選物的首選 (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:,hjsv:6}; a=o.getElementsByTName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'static.hotjar.com/c/hotjar-','.js?sv='); window.dataLayer=window.dataLayer||[]; functiongt(){dataLayer.push(arguments);} gt('js',newDate()); gt('config','G-5258L3H95N'); window.dataLayer=window.dataLayer||[]; functiongt(){dataLayer.push(arguments);} gt('js',newDate()); gt('config','AW-4'); (function(g,d,o){ g._ltq=g._ltq||[];g._lt=g._lt||function(){g._ltq.push(arguments)}; varh=location.protocol===':'?'d.line-scdn.net':'httpd.line-cdn.net'; vars=d.createElement('script');s.async=1; s.src=o||h+'/n/line_t/public/release/v1/lt.js'; vart=d.getElementsByTName('script')[0];t.parentNode.insertBefore(s,t); })(window,document); _lt('init',{ customerType:'account', tId:'fa-9a1c-4c7a-9386-a7933c3a625d' }); _lt('send','pv',['fa-9a1c-4c7a-9386-a7933c3a625d']); _lt('send','cv',{ type:'Conversion' },['fa-9a1c-4c7a-9386-a7933c3a625d']); (function(w,d,s,l,i){ w[l]=w[l]||[];w[l].push({ 'gtm.start': newDate().getTime(),event:'gtm.js' });varf=d.getElementsByTName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TWKF8FW'); varcurrUrl=window.location.href; if(currUrl.includes('ecid')){ varcleaned=removeURLParameter(currUrl,'ecid'); window.history.pushState({},,cleaned); } //damnyouIEdon'theURLSearchParams functionremoveURLParameter(url,parameter){ //prefertousel.searchifyouhealocation/linkobject varurlparts=url.split('?'); if(urlparts.length>=2){ varprefix=encodeURIComponent(parameter)+'='; varpars=urlparts[1].split(/[&;]/g); //reverseiterationasmaybedestructive for(vari=pars.length;i-->0;){ //idio mforstring.startsWith if(pars[i].lastIndexOf(prefix,0)!==-1){ pars.splice(i,1); } } url=urlparts[0]+'?'+pars.join('&'); returnurl; }else{ returnurl; } } window.fbAsyncInit=function(){ FB.init({ appId:'', autoLogAppEvents:true, xfbml:true, version:'v12.0', }); }; !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTName(e)[0]; s.parentNode.insertBefore(t,s)}(window,document,'script','connect.facebook.net/en_US/fbevents.js'); fbq('init',''); fbq('init',''); fbq('track','PeView'); constFB_UA=nigator.userent constFB_INIT_CURRENT=newDate().setHours(newDate().getHours()-1) console.log('FB_INIT_CURRENT',FB_INIT_CURRENT) constCC=document.cookie constCC_LIST=CC.split(';') constCC_OBJ={} letFB_FBC='' letFB_FBP='' for(leti=0;i APP專屬|輸MP3首筆消費再折3% LINE好友募集|加好友領100折扣碼 Marais 熱門搜尋 年菜火熱預訂中 完美旅程必備好物 髮界愛馬仕限定禮盒 交換禮物這樣挑 世界好用的筷子 熱門品牌 EPT藝術聯名全台首賣 感應垃圾桶6折起 有設計感的招財擺飾揪吉限時95折 CP值破表香氛沐浴 寒流必備「保暖電器」推薦! 生活 熱門活動HOT 節慶氣氛升級|香氛推薦 年末養出好膚質|保養推薦 聖誕交換禮物|挑禮指南 美味團圓|年菜大賞 香氛 香氛 蠟燭/香氛蠟燭 室內擴香/線香 居室香氛 車用香氛 香氛工具 韓國hetras 趣味香氛蠟燭to:from 西班牙Ambientair 保養清潔 保養清潔 臉部清潔 臉部保養 身體清潔 身體/保養 口腔清潔保養 男士清潔保養 美髮造型 美容工具 人氣熱銷SALT&STONE 無敏有機洗護髮品ZENZOrganic 法國頂級芳療保養DARPHIN 行李箱 行李箱 行李箱/配件 上掀式可擴充行李箱LOJEL 澳洲旅遊精品JULY 世界潮行李箱Floyd 日用清潔 日用清潔 居家清潔劑 衣物清潔 浴廁清潔劑 廚房清潔劑 除濕/除蟲 加拿大居家清潔品牌Nellie's 澳洲家事美學MurchisonHume 英國植萃精油清潔品牌Greenscents 生活電器 生活電器 季節家電 廚房家電 健康/美容 生活家電 按摩器材 Dyson 居家美容專家AdoreU 居家美容科技AMIRO 3C 3C 手機平板週邊 電腦週邊 穿戴裝置 充電周邊 相機/相機週邊 法國LCF時髦手機鍊、手機殼 韓國PHONOPHONO極簡手機殼、手機鍊 Mipea美極品自拍棒 戶外休閒 戶外休閒 運動健身 露營/登山 野餐用品 水上活動 園藝 益智遊戲 雨天用具 機能美學瑜珈球椅VLUV 法國美學瑜珈墊HerculeStudio Business&PleasureCo. 咖啡茶具 咖啡茶具 咖啡用具 茶具/壺 英國NickMunro咖啡鑑賞家必備 HERO攜帶式電動磨豆機 美國FELLOW電子溫控手沖壺 保溫隨行 保溫隨行 瓶/杯 地表強保溫杯STANLEY 義大利24Bottles時尚水瓶 WOKY台灣在地保溫杯品牌 圖書與文具 圖書與文具 書/雜誌 書寫用具 事務文具 紙製品/筆記本 MartinSchwartz城市海報 RingADate萬年曆 岸下事物TydoInfo 保健 保健 機能保健 窈窕美肌 運動保健 醫材用品 衛生用品 東璧堂明星、KOL指名選購 理科太太好好生醫 AFC膠原蛋白飲 寵物 寵物 鮮食/乾糧/保健品 清潔/美容 寵物家具 寵物玩具 用品/外出 美國APetwithPaws時尚寵物包 Neakasa多功能寵物理毛美容機 PETTEEZER提碁毛孩順毛梳 食品 食品 加熱食品 生鮮食材 零食/餅乾 沖泡/濾掛 飲料/水 甜點/冰品 食材/乾貨 節慶禮盒 台中人氣美食永酵年 KOE&ESTHER厚顏披薩 GREEN&SAF料理省時達人 時尚 熱門活動 韓國人氣EPT球鞋登台 派對必備閃亮配件 質感設計小包推薦 掌握手時髦新品 配飾 配飾 飾品 LESIS 珍珠的翻譯家 AECParis 份量感法式配件 ME30 地中海風格配飾 提包皮件 提包皮件 女性皮件 男性皮件 女性包包 男性包包 DronDiffusion Rosé也在背的編織包包 Lotsyou 韓團BLACKPINKJennie同款包包 VASIC 被《Vogue》評選為必入手的時髦包款之一 服飾 服飾 女裝 男裝 運動/機能女裝 運動/機能男裝 女性內著/居家服 男性內著/居家服 襪子/絲襪 MIKUTA 百萬網紅品牌,歐美隨性慵懶感穿搭 Sporty&Rich 美式運動風掀起的復古風潮,老錢運動服飾 RisingBoutique 讓設計質感睡衣成為你的生活品味 鞋履 鞋履 女鞋 男鞋 eastpacifictrade 韓國超人氣EPT球鞋獨家首賣 VEJA 法國國民經典小白鞋,百搭舒適 PALLADIUM 機能與潮流的完美碰撞 髮飾 髮飾 髮飾/造型配件 SnackBreak Y2K當道時髦髮飾 ByEloiseLondon 是時髦髮圈,也能作為首飾搭配 CoucouSuzette 趣味療癒造型髮夾 眼鏡手錶 眼鏡手錶 眼鏡/墨鏡 手錶 BREDA 精緻好品味質感腕錶 VelvetCanyon 名模愛的時髦造型墨鏡 iplusoeyes 入選眾多前衛平台版面 泳裝 泳裝 泳裝/配件 ShineFromWithin 兼顧自然、舒適,襯托獨特氣質 HÁIthelabel 閃耀動人的美型泳衣 香水 香水 香水/香精 彩妝 彩妝 妝前底妝 眼部彩妝 頰彩修容 唇部彩妝 指甲彩繪 彩妝工具 Marais 瑪黑家居選物 配件 配件 圍巾 帽子/手套 皮帶/領帶 吊飾 家居 熱門活動 聖誕氛圍營造必備 節慶餐桌佈置 空間換裝質感抱枕推薦 家居館質感新品上市 家具 家具 沙發 單椅 凳 桌子 櫃子 床架/床 立架/推車 設計師質感生活camino 兼具時尚與實用性B-LINE 溫暖北歐風格Bloomingville 家飾 家飾 燈具/燈泡 地墊/地毯 抱枕/坐墊/蓋毯 花器/燭台 鏡子/時鐘 擺飾/壁飾 收納/雜貨 衛浴用品 壁掛/層架 屏風/廉 節慶派對 丹麥設計大師經典桌燈&Tradition 療癒能量幸運招財揪吉 絕美編織陶器fermLIVING 餐廚 餐廚 鍋具 砧板/刀具 保鮮/儲物 杯/玻璃杯 酒杯/酒器 烘焙用品 料理工具 碗/盤餐具 餐廚收納 廚房雜貨 餐廚用品 法國百年玻璃工藝LaRochere 送禮自用的好選擇HH健康於筷 歐式專業廚具品牌BergHOFF 寢具 寢具 枕/枕套 床包/床包組 床墊/保潔墊 蓆 被/被套 親膚天絲床寢瑪黑x好關係 吸濕排汗頂級亞麻LINENTALES 法式蕾絲埃及棉床包青鳥家居 掃除 掃除 清潔用品 熱銷NO.1感應垃圾桶ELPHECO 精品級環保垃圾桶Brabantia 獲德國世紀品牌獎WESCO 大型家電 大型家電 大型家電(需要專人安裝) 電視影音 貼近生活的科技家電LG 設計品味居家美學SAMSUNG 潮流迷愛音響TRANSPARENT 母嬰 熱門活動HOT 孩子的聖誕禮物|可愛玩偶 孩子的聖誕禮物|禮盒系列 孩子的聖誕禮物|蠟筆、繪畫用品 孩子的聖誕禮物|積木、益智玩具 兒童居家 兒童居家 嬰幼兒居家品 嬰幼兒家具 北歐美感教育BloomingvilleMINI 美的兒童地墊LittleWiwa 英國育兒品牌Mamas&Papas 母嬰生活用品 母嬰生活用品 嬰幼兒餐具 嬰幼兒外出品 嬰幼兒哺育用品 母嬰清潔保養 奶瓶界的愛馬仕hegen 台灣製造育兒精品SIMBA小獅王辛巴 BébéSilk頂級天然蠶絲寢具 母嬰服飾配件 母嬰服飾配件 服裝配件 鞋類 超舒適好穿Crocs洞洞鞋 兒童時尚髮飾英國Mimi&Lula 德國PlayShoes戲水服飾配件 玩樂道具 玩樂道具 玩具/積木 圖書文具 英國Jellycat絨毛玩具 MNA-TILES磁力積木 法國RatatamKids彈跳球 標題內文取消確認functionshowNotifyModal(title='標題',content='內文',isRightBtn=true,//是否顯示右邊按鈕rightBtnText='右邊按鈕文字',onRightBtn=null,//右邊按鈕執行動作isDangerRightBtn=false,//是否顯示危險樣式isLeftBtn=false,//是否顯示左邊按鈕leftBtnText='左邊按鈕文字',onLeftBtn=null,//左邊按鈕執行動作isDangerLeftBtn=false){const$rightButton=$('#notify-modal.right-button')const$leftButton=$('#notify-modal.left-button')$('#notify-modal.notify-title').text(title)$('#notify-modal.notify-text').text(content)if(isRightBtn){$rightButton.show().text(rightBtnText).toggleClass('danger',isDangerRightBtn).off('click').click(function(){if(onRightBtn)onRightBtn()})}else{$rightButton.hide()}if(isLeftBtn){$leftButton.show().text(leftBtnText).toggleClass('danger',isDangerLeftBtn).off('click').click(function(){if(onLeftBtn)onLeftBtn()})}else{$leftButton.hide()}$('#notify-modal').modal('show')if($('.modal-backdrop').length>1){$('.modal-backdrop').last().css('z-index',1060)}}functioncloseNotifyModal(){$('#notify-modal').modal('hide')if($('.modal-backdrop')){$('body').css('overflow','hidden')}}APP專屬|輸MP3首筆消費再折3%LINE好友募集|加好友領100折扣碼Marais熱門搜尋年菜火熱預訂中完美旅程必備好物髮界愛馬仕限定禮盒交換禮物這樣挑世界好用的筷子熱門品牌EPT藝術聯名全台首賣感應垃圾桶6折起有設計感的招財擺飾揪吉限時95折CP值破表香氛沐浴寒流必備「保暖電器」推薦!{{item.title}}{{item.title}}{{selectedL1?.title}}{{categoryItem.title}}{{item?.title}}{{textItem.title}}{{item.title}}{{selectedL1?.title}}旗艦館{{item.name}}已經到底了歡迎來到瑪黑請選擇您感興趣的主題開始瀏覽MARAIS瑪黑家居選物從細微的感動出發,透過來自世界各地的好設計,傳遞直接而純真的品味溫度。與瑪黑對話有任何問題請透過以下管道來訊,我們將有專人回覆您,謝謝瑪黑線上客服瑪黑家居門市據點瑪黑餐飲關於我們夥伴招募追蹤瑪黑Line官方帳號FacebookInstramYoutube會員服務線上客服幫助中心防詐騙提醒使用條款隱私權政策商務洽詢企業採購設計師方案銷售/商務合作©2024Storemarais.Allrightsreserved.統一編號:醫療器材販賣許可執照字號:MD00 varisProd='prod'=='prod' initSkeletonPe() Vue.component('loading-skeleton',{template:'#loading-skeleton',}){{cardData.title.text}}{{item.text}}{{linkItem.title.text}}Vue.component('orientation-card',{template:'#orientation-card-temp',props:{cardData:{type:Object,default:()=>({"cardId":"ca2103","ime":{"srcPc":"picsum.photos/1440/1000/?random=63","srcMob":"picsum.photos/718/800/?random=83","alt":"商品卡"},"title":{"text":"居家"},"subTitleList":[{"text":"Furniture&Home"}],"linkList":[{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},]})}},methods:{getImgFullLink(path){returncombineImgSrc(path)},indexClick(e,cardData){e.preventDefault();if(cardData.id){localStore.setItem('selectedOrientationId',cardData.id)}window.location.href='/layout/'+cardData.id},linkClick(e,linkItem){e.preventDefault();e.stopPropation();if(this.cardData?.id){localStore.setItem('selectedOrientationId',this.cardData.id)}if(linkItem?.url){window.location.href=linkItem?.url}}},}){{cardData.title.text}}{{item.text}}{{cardData?.button.text}}Vue.component('ime-card',{template:'#ime-card-temp',props:{cardData:{type:Object,default:()=>({"cardId":"da5047","ime":{"srcPc":"picsum.photos/1240/1516/?random=86","srcMob":"picsum.photos/686/1000/?random=99","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"副標題1"}]})}},methods:{getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}},}){{cardData.brand?.text}}{{cardData.title?.text}}{{cardData.discount?.text}}${{cardData.promoPrice?.text||cardData.originalPrice?.text}}${{cardData.originalPrice?.text}}{{item.text}}購買Vue.component('product-card',{template:'#product-card-temp',props:{cardData:{type:Object,default:()=>({"cardId":"9b1068","imeList":[{"srcPc":"picsum.photos/860/860/?random=88","srcMob":"picsum.photos/700/700/?random=80","alt":"商品卡"},{"srcPc":"picsum.photos/860/860/?random=91","srcMob":"picsum.photos/700/700/?random=36","alt":"商品卡"},],"brand":{"text":"品牌"},"title":{"text":"標題"},"originalPrice":{"text":1000},"url":"/","tList":[]})},cardIndex:{type:Number,}},data(){return{swiperId:generateUniqueId(),}},mounted(){constimgListLength=this.cardData?.imeList?.lengthif(imgListLength>1){setTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,loop:imgListLength>1,pination:{el:`.swiper-pination-`+this.swiperId,},nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},})},4000)}},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{getImgFullLink(path){returncombineImgSrc(path)},foriteClick(){constparams={productIdList:[this.cardData.productId],status:this.cardData.isForite?'DELETED':'NORMAL',}axios.post('/me/act/updateForiteProduct',params).then(res=>{//console.log('update_forite',res)this.$emit('on-forite-change',{isForite:this.cardData.isForite,cardIndex:this.cardIndex})})},goPe(url,event){event.preventDefault()constparentWithClass=event.target.closest('.swiper-button-prev,.swiper-button-next')if(parentWithClass)returnhandleLink(url,event)}},}){{cardData.title.text}}{{item.text}}{{item.title.text}}Vue.component('store-card',{template:'#store-card-temp',props:{cardData:{type:Object,default:()=>({"ime":{"srcPc":"picsum.photos/632/336/?random=23","srcMob":"picsum.photos/590/336/?random=24","alt":"商品卡"},"title":{"text":"概念店"},"subTitleList":[{"text":"與經典常在,丹麥家居品牌北周質感設計,滿足您對美的生活樣貌"}],"storeType":"瑪黑門市","linkList":[{"title":{"text":"台北安和"},"url":"/"},{"title":{"text":"台中新光三越中港"},"url":"/"}]})}},methods:{getImgFullLink(path){returncombineImgSrc(path)}},})Vue.component('orientation-a',{template:'#orientation-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"60dd15","sectionGroup":"orientation","type":"orientation_a","orientationCardList":[{"cardId":"dafb83","ime":{"srcPc":"picsum.photos/1440/1000/?random=75","srcMob":"picsum.photos/718/800/?random=57","alt":"商品卡"},"title":{"text":"居家"},"subTitleList":[{"text":"Furniture&Home"}],"linkList":[{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"}]},{"cardId":"d64f18","ime":{"srcPc":"picsum.photos/1440/1000/?random=51","srcMob":"picsum.photos/718/800/?random=62","alt":"商品卡"},"title":{"text":"時尚"},"subTitleList":[{"text":"Fashion"}],"linkList":[{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"}]},{"cardId":"2f2454","ime":{"srcPc":"picsum.photos/1440/1000/?random=17","srcMob":"picsum.photos/718/800/?random=61","alt":"商品卡"},"title":{"text":"生活"},"subTitleList":[{"text":"Lifestyle"}],"linkList":[{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"}]},{"cardId":"c3ec1f","ime":{"srcPc":"picsum.photos/1440/1000/?random=95","srcMob":"picsum.photos/718/800/?random=6","alt":"商品卡"},"title":{"text":"母嬰"},"subTitleList":[{"text":"Baby"}],"linkList":[{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"},{"title":{"text":"新上架"},"url":"/"}]}]})}},})Vue.component('banner-1-a',{template:'#banner-1-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"a","sectionGroup":"banner","type":"banner_1_a","bannerCardList":[{"cardId":"77f336","ime":{"srcPc":"picsum.photos/1412/1136/?random=6","srcMob":"picsum.photos/750/750/?random=81","alt":"商品卡"},"title":{"text":"banner_1_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-primary"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":15,"subTitleMaxLength":20,"imgWidthPc":1344,"imgHeightPc":1344,"imgWHeightMob":750,"imgWidthMob":750}]}})}},})Vue.component('banner-1-b',{template:'#banner-1-b-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"3e9b4a","sectionGroup":"banner","type":"banner_1_b","bannerCardList":[{"cardId":"523b1d","ime":{"srcPc":"picsum.photos/2880/1200/?random=9","srcMob":"picsum.photos/750/750/?random=84","alt":"商品卡"},"title":{"text":"banner_1_b"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":""}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":15,"subTitleMaxLength":30,"imgWidthPc":2752,"imgHeightPc":1200,"imgWHeightMob":750,"imgWidthMob":800}]}})}},})Vue.component('banner-1-c',{template:'#banner-1-c-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"e921f1","sectionGroup":"banner","type":"banner_1_c","bannerCardList":[{"cardId":"","ime":{"srcPc":"picsum.photos/2752/1200/?random=73","srcMob":"picsum.photos/686/750/?random=77","alt":"商品卡"},"title":{"text":"banner_1_c"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":15,"subTitleMaxLength":30}]}})}},})Vue.component('banner-1-d',{template:'#banner-1-d-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"277ab6","sectionGroup":"banner","type":"banner_1_d","bannerCardList":[{"cardId":"bfe61c","ime":{"srcPc":"picsum.photos/1280/1280/?random=66","srcMob":"picsum.photos/686/750/?random=43","alt":"商品卡"},"title":{"text":"banner_1_d"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},})Vue.component('banner-1-e',{template:'#banner-1-e-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"c889e7","sectionGroup":"banner","type":"banner_1_e","bannerCardList":[{"cardId":"b","ime":{"srcPc":"picsum.photos/1280/1280/?random=37","srcMob":"picsum.photos/686/750/?random=20","alt":"商品卡"},"title":{"text":"banner_1_e"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},})Vue.component('banner-2-a',{template:'#banner-2-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"aead71","sectionGroup":"banner","type":"banner_2_a","bannerCardList":[{"cardId":"b","ime":{"srcPc":"picsum.photos/1344/1344/?random=73","srcMob":"picsum.photos/686/750/?random=67","alt":"商品卡"},"title":{"text":"banner_2_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}},{"cardId":"a","ime":{"srcPc":"picsum.photos/1344/1344/?random=22","srcMob":"picsum.photos/686/750/?random=99","alt":"商品卡"},"title":{"text":"banner_2_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},})Vue.component('banner-3-a',{template:'#banner-3-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"3f1df0","sectionGroup":"banner","type":"banner_3_a","bannerCardList":[{"cardId":"23f4b7","ime":{"srcPc":"picsum.photos/800/960/?random=84","srcMob":"picsum.photos/686/750/?random=80","alt":"商品卡"},"title":{"text":"banner_3_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}},{"cardId":"283b6a","ime":{"srcPc":"picsum.photos/800/960/?random=56","srcMob":"picsum.photos/686/750/?random=20","alt":"商品卡"},"title":{"text":"banner_3_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}},{"cardId":"d8ed56","ime":{"srcPc":"picsum.photos/800/960/?random=48","srcMob":"picsum.photos/686/750/?random=98","alt":"商品卡"},"title":{"text":"banner_3_a"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-outline"]}}],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},}){{layoutData.description?.text}}{{layoutData.description?.text}}{{item.title.text}}{{swiperShowPe()}}Vue.component('banner-5-a',{template:'#banner-5-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"c889e7","sectionGroup":"banner","type":"banner_5_a","ime":{"srcPc":"picsum.photos/300/176/?random=1","srcMob":"picsum.photos/300/176/?random=2","alt":"logo"},"description":{"text":"商用/家用智能感應垃圾桶,專注開發高端廚房系列用品",},"imeCardList":[{"cardId":"G4E2K8","ime":{"srcPc":"picsum.photos/1572/920/?random=37","srcMob":"picsum.photos/750/900/?random=20","alt":"商品卡"},"title":{"text":"熱銷20L美型太空艙垃圾桶"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"H5F3L9","ime":{"srcPc":"picsum.photos/1572/920/?random=38","srcMob":"picsum.photos/750/900/?random=21","alt":"商品卡"},"title":{"type":"text","text":"秒殺自動鋪袋垃圾桶"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"J6G7M0","ime":{"srcPc":"picsum.photos/1572/920/?random=39","srcMob":"picsum.photos/750/900/?random=22","alt":"商品卡"},"title":{"text":"12-14小時自動臭氧殺菌"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"K8N9P1","ime":{"srcPc":"picsum.photos/1572/920/?random=40","srcMob":"picsum.photos/750/900/?random=23","alt":"商品卡"},"title":{"text":"[週年特賣]下單即贈垃圾袋"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"L0O2Q3","ime":{"srcPc":"picsum.photos/1572/920/?random=41","srcMob":"picsum.photos/750/900/?random=24","alt":"商品卡"},"title":{"text":"廚房掛壁垃圾桶特價$599"},"route":{"routerType":"","routerData":"","url":"/"}},],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},data(){return{swiperId:generateUniqueId(),currentSlide:0,swiper:null,}},mounted(){this.$nextTick(()=>{constvue_this=thisvue_this.swiper=newSwiper(`.swiper-`+vue_this.swiperId,{slidesPerView:'auto',centeredSlides:true,spaceBetween:0,loop:true,loopedSlides:vue_this.layoutData?.imeCardList?.length,initialSlide:0,nigation:{nextEl:`.swiper-button-next-`+vue_this.swiperId,prevEl:`.swiper-button-prev-`+vue_this.swiperId,},pination:{el:`.swiper-pination`+vue_this.swiperId,type:'custom',renderCustom:function(swiper,current,total){vue_this.currentSlide=current-1returnvue_this.swiperShowPe()}},breakpoints:{768:{slidesPerView:1,spaceBetween:0,pination:{el:`.swiper-pination`+vue_this.swiperId,type:'custom',renderCustom:function(swiper,current,total){vue_this.currentSlide=current-1consttitleText=vue_this.layoutData?.imeCardList[vue_this.currentSlide]?.title.text||''returntitleText}},},},allowTouchMove:false,//禁止滑動on:{//loop:true時,@click在複製時會失效click:function(event){consttargetIndex=vue_this.swiper.realIndexconsturl=vue_this.layoutData?.imeCardList[targetIndex]?.route?.urlvue_this.goPe(url,event)}}})})},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{getImgFullLink(path){returncombineImgSrc(path)},swiperShowPe(){constcurrentPe=this.currentSlide+1consttotalPe=this.layoutData?.imeCardList?.lengthreturn('0'+currentPe).slice(-2)+'/'+('0'+totalPe).slice(-2)},handleSlideChange(index){constindexToSlide=this.swiper.loopedSlides?index+this.swiper.loopedSlides:indexthis.swiper.slideTo(indexToSlide)},goPe(url,event){handleLink(url,event)}}})Vue.component('fn-icon',{template:'#fn-icon-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"e","sectionGroup":"fn","type":"fn_icon","fnCardList":[{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/128/128/?random=3","srcMob":"picsum.photos/128/128/?random=74","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"e","ime":{"srcPc":"picsum.photos/128/128/?random=57","srcMob":"picsum.photos/128/128/?random=96","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"6621de","ime":{"srcPc":"picsum.photos/128/128/?random=4","srcMob":"picsum.photos/128/128/?random=49","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"be4559","ime":{"srcPc":"picsum.photos/128/128/?random=78","srcMob":"picsum.photos/128/128/?random=73","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"6fbbf0","ime":{"srcPc":"picsum.photos/128/128/?random=69","srcMob":"picsum.photos/128/128/?random=51","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"da91df","ime":{"srcPc":"picsum.photos/128/128/?random=28","srcMob":"picsum.photos/128/128/?random=56","alt":"商品卡"},"title":{"text":"內文標題"}}]})}},data(){return{screenWidth:window.innerWidth}},mounted(){window.addEventListener('resize',this.handleResize)},beforeDestroy(){window.removeEventListener('resize',this.handleResize)},methods:{handleResize:_.debounce(function(){this.screenWidth=window.innerWidth},20)},computed:{gridQtyPerRow(){if(!this.layoutData.fnCardList)return1returnthis.layoutData.fnCardList.length%4==0?4:3}},}){{layoutData.title?.text}}{{item.text}}{{card.title?.text}}Vue.component('fn-circle-3',{template:'#fn-circle-3-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"e","sectionGroup":"fn","type":"fn_icon","title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"fnCardList":[{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/320/320/?random=3","srcMob":"picsum.photos/320/320/?random=74","alt":"商品卡"},"title":{"text":"名稱"},"route":{"routerType":"","routerData":"","url":"",},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/320/320/?random=3","srcMob":"picsum.photos/320/320/?random=74","alt":"商品卡"},"title":{"text":"名稱"},"route":{"routerType":"","routerData":"","url":"",},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/320/320/?random=3","srcMob":"picsum.photos/320/320/?random=74","alt":"商品卡"},"title":{"text":"名稱"},"route":{"routerType":"","routerData":"","url":""},}]})}},data(){return{}},methods:{getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}},}){{layoutData.title?.text}}{{item.text}}Vue.component('fn-circle-5',{template:'#fn-circle-5-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"b321f5","sectionGroup":"fn","type":"fn_circle_5","title":{"text":"fn_circle_5"},"subTitleList":[{"text":"副標"}],"fnCardList":[{"cardId":"a9ab49","ime":{"srcPc":"picsum.photos/200/200/?random=0","srcMob":"picsum.photos/160/160/?random=68","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"4e3f8f","ime":{"srcPc":"picsum.photos/200/200/?random=65","srcMob":"picsum.photos/160/160/?random=27","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"2631b9","ime":{"srcPc":"picsum.photos/200/200/?random=98","srcMob":"picsum.photos/160/160/?random=99","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"a3a166","ime":{"srcPc":"picsum.photos/200/200/?random=56","srcMob":"picsum.photos/160/160/?random=87","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"e0aab5","ime":{"srcPc":"picsum.photos/200/200/?random=26","srcMob":"picsum.photos/160/160/?random=50","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"11ea15","ime":{"srcPc":"picsum.photos/200/200/?random=89","srcMob":"picsum.photos/160/160/?random=60","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"0ec0e4","ime":{"srcPc":"picsum.photos/200/200/?random=14","srcMob":"picsum.photos/160/160/?random=23","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"de5dc8","ime":{"srcPc":"picsum.photos/200/200/?random=4","srcMob":"picsum.photos/160/160/?random=19","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"d","ime":{"srcPc":"picsum.photos/200/200/?random=15","srcMob":"picsum.photos/160/160/?random=31","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"3b103d","ime":{"srcPc":"picsum.photos/200/200/?random=55","srcMob":"picsum.photos/160/160/?random=54","alt":"商品卡"},"title":{"text":"內文標題"}}]})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:5,currentPe:1,}},mounted(){setTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{prevEl:`.swiper-button-prev-`+this.swiperId,nextEl:`.swiper-button-next-`+this.swiperId,},})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.fnCardList?Math.ceil(this.layoutData.fnCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.fnCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.fnCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"3f09ea","sectionGroup":"fn","type":"custom_fn_rectangle_3","situationCardList":[{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":""},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":""},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":""},},]})}},data(){return{}},methods:{getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}},}){{layoutData.title?.text}}{{item.text}}Vue.component('fn-rectangle-4',{template:'#fn-rectangle-4-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"3f09ea","sectionGroup":"fn","type":"fn_rectangle_4","title":{"text":"fn_rectangle_4"},"subTitleList":[{"text":"副標"}],"fnCardList":[{"cardId":"0c6aea","ime":{"srcPc":"picsum.photos/480/760/?random=10","srcMob":"picsum.photos/480/760/?random=3","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"80c0f8","ime":{"srcPc":"picsum.photos/480/760/?random=22","srcMob":"picsum.photos/480/760/?random=83","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"75c8f4","ime":{"srcPc":"picsum.photos/480/760/?random=35","srcMob":"picsum.photos/480/760/?random=47","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"","ime":{"srcPc":"picsum.photos/480/760/?random=50","srcMob":"picsum.photos/480/760/?random=63","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"60a8f8","ime":{"srcPc":"picsum.photos/480/760/?random=34","srcMob":"picsum.photos/480/760/?random=54","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"f","ime":{"srcPc":"picsum.photos/480/760/?random=28","srcMob":"picsum.photos/480/760/?random=80","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"d","ime":{"srcPc":"picsum.photos/480/760/?random=54","srcMob":"picsum.photos/480/760/?random=61","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"","ime":{"srcPc":"picsum.photos/480/760/?random=83","srcMob":"picsum.photos/480/760/?random=45","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"0c82ff","ime":{"srcPc":"picsum.photos/480/760/?random=51","srcMob":"picsum.photos/480/760/?random=47","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"bc8726","ime":{"srcPc":"picsum.photos/480/760/?random=49","srcMob":"picsum.photos/480/760/?random=95","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"e0966c","ime":{"srcPc":"picsum.photos/480/760/?random=68","srcMob":"picsum.photos/480/760/?random=78","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"52bfc6","ime":{"srcPc":"picsum.photos/480/760/?random=93","srcMob":"picsum.photos/480/760/?random=89","alt":"商品卡"},"title":{"text":"內文標題"}}]})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:4,}},mounted(){setTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{prevEl:`.swiper-button-prev-`+this.swiperId,nextEl:`.swiper-button-next-`+this.swiperId,},})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.fnCardList?Math.ceil(this.layoutData.fnCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.fnCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.fnCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"e","sectionGroup":"fn","type":"custom_fn_rectangle_8","imeList":[{"srcPc":"picsum.photos/224/132/?random=3","srcMob":"picsum.photos/224/132/?random=74","alt":"商品卡"},{"srcPc":"picsum.photos/224/132/?random=57","srcMob":"picsum.photos/224/132/?random=96","alt":"商品卡"},{"srcPc":"picsum.photos/224/132/?random=4","srcMob":"picsum.photos/224/132/?random=49","alt":"商品卡"},{"srcPc":"picsum.photos/112/66/?random=78","srcMob":"picsum.photos/112/66/?random=73","alt":"商品卡"},{"srcPc":"picsum.photos/112/66/?random=69","srcMob":"picsum.photos/112/66/?random=51","alt":"商品卡"},{"srcPc":"picsum.photos/112/66/?random=28","srcMob":"picsum.photos/112/66/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/112/66/?random=28","srcMob":"picsum.photos/112/66/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/112/66/?random=28","srcMob":"picsum.photos/112/66/?random=56","alt":"商品卡"}]})}},data(){return{}},methods:{getImgFullLink(path){returncombineImgSrc(path)}},}){{layoutData.title?.text}}{{item.text}}Vue.component('fn-square-4',{template:'#fn-square-4-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"91fc6e","sectionGroup":"fn","type":"fn_square_4","title":{"text":"fn_square_4"},"subTitleList":[{"text":"副標"}],"fnCardList":[{"cardId":"2b3958","ime":{"srcPc":"picsum.photos/480/480/?random=37","srcMob":"picsum.photos/300/400/?random=4","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"84efa2","ime":{"srcPc":"picsum.photos/480/480/?random=52","srcMob":"picsum.photos/300/400/?random=19","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"fe226b","ime":{"srcPc":"picsum.photos/480/480/?random=12","srcMob":"picsum.photos/300/400/?random=3","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"63d18f","ime":{"srcPc":"picsum.photos/480/480/?random=62","srcMob":"picsum.photos/300/400/?random=91","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"1ff88b","ime":{"srcPc":"picsum.photos/480/480/?random=65","srcMob":"picsum.photos/300/400/?random=25","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"b4fa0f","ime":{"srcPc":"picsum.photos/480/480/?random=63","srcMob":"picsum.photos/300/400/?random=48","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"d0117b","ime":{"srcPc":"picsum.photos/480/480/?random=97","srcMob":"picsum.photos/300/400/?random=77","alt":"商品卡"},"title":{"text":"內文標題"}},{"cardId":"4c2a26","ime":{"srcPc":"picsum.photos/480/480/?random=44","srcMob":"picsum.photos/300/400/?random=67","alt":"商品卡"},"title":{"text":"內文標題"}}]})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:4,}},mounted(){setTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環pination:{el:".swiper-pination",},nigation:{prevEl:`.swiper-button-prev-`+this.swiperId,nextEl:`.swiper-button-next-`+this.swiperId,},})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.fnCardList?Math.ceil(this.layoutData.fnCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.fnCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.fnCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"c889e7","sectionGroup":"fn","type":"custom_fn_square_5","fnCardList":[{"cardId":"H5F3L9","ime":{"srcPc":"picsum.photos/800/800/?random=38","srcMob":"picsum.photos/600/700/?random=21","alt":"商品卡"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"J6G7M0","ime":{"srcPc":"picsum.photos/800/800/?random=39","srcMob":"picsum.photos/600/700/?random=22","alt":"商品卡"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"K8N9P1","ime":{"srcPc":"picsum.photos/800/800/?random=1","srcMob":"picsum.photos/600/700/?random=2","alt":"商品卡"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"L0O2Q3","ime":{"srcPc":"picsum.photos/800/800/?random=3","srcMob":"picsum.photos/600/700/?random=4","alt":"商品卡"},"route":{"routerType":"","routerData":"","url":"/"}},{"cardId":"M3N4O5","ime":{"srcPc":"picsum.photos/800/800/?random=42","srcMob":"picsum.photos/600/700/?random=25","alt":"商品卡"},"route":{"routerType":"","routerData":"","url":"/"}},],"settingConfig":{"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20}]}})}},data(){return{swiperId:generateUniqueId(),swiper:null,}},mounted(){this.$nextTick(()=>{constvue_this=thisvue_this.swiper=newSwiper(`.swiper-`+vue_this.swiperId,{slidesPerView:'auto',centeredSlides:true,spaceBetween:24,loop:true,loopedSlides:vue_this.layoutData?.fnCardList.length,initialSlide:0,nigation:{nextEl:`.swiper-button-next-`+vue_this.swiperId,prevEl:`.swiper-button-prev-`+vue_this.swiperId,},pination:{el:`.swiper-pination`+vue_this.swiperId,type:"custom",renderCustom:function(swiper,current,total){varcurrentWithZero=('0'+current).slice(-2)vartotalWithZero=('0'+total).slice(-2)returncurrentWithZero+'/'+totalWithZero}},breakpoints:{1300:{slidesPerView:3.6,spaceBetween:24,},},on:{//loop:true時,@click在複製時會失效click:function(swiper,event){consttargetIndex=vue_this.swiper.realIndexconsturl=vue_this.layoutData?.fnCardList[targetIndex]?.route?.urlvue_this.goPe(url,event)}}})})},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}}}){{layoutData.title?.text}}{{item.text}}{{layoutData.button?.text}}Vue.component('product-title-top-5-a',{template:'#product-title-top-5-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"a89c62","sectionGroup":"product","type":"product_title_top_5_a","title":{"text":"product_title_top_5_a"},"subTitleList":[{"text":"商品卡副標題1"}],"productCardList":[{"cardId":"e","imeList":[{"srcPc":"picsum.photos/430/430/?random=96","srcMob":"picsum.photos/350/350/?random=21","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=33","srcMob":"picsum.photos/350/350/?random=58","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[]},{"cardId":"2698c4","imeList":[{"srcPc":"picsum.photos/430/430/?random=56","srcMob":"picsum.photos/350/350/?random=58","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=32","srcMob":"picsum.photos/350/350/?random=96","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[]},{"cardId":"d17b50","imeList":[{"srcPc":"picsum.photos/430/430/?random=12","srcMob":"picsum.photos/350/350/?random=21","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=5","srcMob":"picsum.photos/350/350/?random=52","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=54","srcMob":"picsum.photos/350/350/?random=45","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=48","srcMob":"picsum.photos/350/350/?random=25","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]},{"text":"贈","classList":["t-brown"]}]},{"cardId":"8b208d","imeList":[{"srcPc":"picsum.photos/430/430/?random=85","srcMob":"picsum.photos/350/350/?random=92","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=37","srcMob":"picsum.photos/350/350/?random=79","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=97","srcMob":"picsum.photos/350/350/?random=75","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=98","srcMob":"picsum.photos/350/350/?random=32","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]}]},{"cardId":"","imeList":[{"srcPc":"picsum.photos/430/430/?random=3","srcMob":"picsum.photos/350/350/?random=33","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=53","srcMob":"picsum.photos/350/350/?random=45","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},],"button":{"text":"查看更多"}})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:5,currentPe:0,}},mounted(){constvue_this=thissetTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},allowTouchMove:false,//禁止滑動on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex}}})},3000);},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{transmitForiteChange(emitObj){this.$emit('forite-change',{...emitObj,sectionIndex:this.sectionIndex})},goPe(url,event){handleLink(url,event)}},computed:{totalPe(){returnthis.layoutData.productCardList?Math.ceil(this.layoutData.productCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.productCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.productCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"79bed4","sectionGroup":"product","type":"product_title_left_4_a","title":{"text":"product_title_top_4_a"},"subTitleList":[{"text":"商品卡副標題1"}],"productCardList":[{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"dce61c","imeList":[{"srcPc":"picsum.photos/430/430/?random=29","srcMob":"picsum.photos/350/350/?random=60","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=78","srcMob":"picsum.photos/350/350/?random=48","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]},{"text":"贈","classList":["t-brown"]}]},{"cardId":"7c2720","imeList":[{"srcPc":"picsum.photos/430/430/?random=39","srcMob":"picsum.photos/350/350/?random=28","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=57","srcMob":"picsum.photos/350/350/?random=59","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=80","srcMob":"picsum.photos/350/350/?random=22","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]}]},{"cardId":"af7313","imeList":[{"srcPc":"picsum.photos/430/430/?random=18","srcMob":"picsum.photos/350/350/?random=46","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=71","srcMob":"picsum.photos/350/350/?random=78","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[]},],"button":{"text":"查看更多"}})},sectionIndex:{type:Number,}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:4,currentPe:0,}},mounted(){constvue_this=thissetTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},allowTouchMove:false,//禁止滑動on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex}}})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{transmitForiteChange(emitObj){this.$emit('forite-change',{...emitObj,sectionIndex:this.sectionIndex})},goPe(url,event){handleLink(url,event)}},computed:{totalPe(){returnthis.layoutData.productCardList?Math.ceil(this.layoutData.productCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.productCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.productCardList)//後的結果constresult=[]for(leti=0;iVue.component('product-no-title-3-a',{template:'#product-no-title-3-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"79bed4","sectionGroup":"product","type":"product_no_title_3_a","ime":{"srcPc":'picsum.photos/1030/642/?random=12',"srcMob":'picsum.photos/750/460/?random=12',"alt":'',},"productCardList":[{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"dce61c","imeList":[{"srcPc":"picsum.photos/430/430/?random=29","srcMob":"picsum.photos/350/350/?random=60","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=78","srcMob":"picsum.photos/350/350/?random=48","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]},{"text":"贈","classList":["t-brown"]}]},{"cardId":"7c2720","imeList":[{"srcPc":"picsum.photos/430/430/?random=39","srcMob":"picsum.photos/350/350/?random=28","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=57","srcMob":"picsum.photos/350/350/?random=59","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=79","srcMob":"picsum.photos/350/350/?random=22","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]}]},],})},},data(){return{}},mounted(){},methods:{getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}},}){{card?.promotionDescription?.text}}{{card.title.text}}{{formatDiscount(card.discount?.text)}}折折{{formatDiscount(card.discount?.text)}}${{card.promoPrice?.text||card.originalPrice.text}}${{card.originalPrice.text}}Vue.component('product-no-title-4-a',{template:'#product-no-title-4-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"79bed4","sectionGroup":"product","type":"product_no_title_4_a","productCardList":[{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}],"promotionDescription":{"text":"行銷描述"},},{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"promoPrice":{"text":900},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}],"promotionDescription":{"text":"行銷描述"},},{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}],"promotionDescription":{"text":"行銷描述"},},{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}],"promotionDescription":{"text":"行銷描述"},}],})},},data(){return{}},mounted(){},methods:{getImgFullLink(path){returncombineImgSrc(path)},//轉換折扣formatDiscount(discount){letdiscountText='';if(discount.includes('%')){//%數constpercent=(100-(discount.split('%')[0]).split('')[1])/10discountText=percent}else{//金額discountText=parseFloat(discount)}returndiscountText;},goPe(url,event){handleLink(url,event)}},}){{layoutData.title?.text}}{{item.text}}Vue.component('event-2-a',{template:'#event-2-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"f","sectionGroup":"event","type":"event_2_a","title":{"text":"event_2_a"},"subTitleList":[{"text":"副標題"}],"eventCardList":[{"cardId":"9b2d28","ime":{"srcPc":"picsum.photos/1116/800/?random=2","srcMob":"picsum.photos/600/760/?random=76","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},{"cardId":"9d1a36","ime":{"srcPc":"picsum.photos/1116/800/?random=86","srcMob":"picsum.photos/600/760/?random=73","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},{"cardId":"9d1a38","ime":{"srcPc":"picsum.photos/1116/800/?random=86","srcMob":"picsum.photos/600/760/?random=73","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},]})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:2,currentPe:0,}},mounted(){constvue_this=thissetTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},allowTouchMove:false,//禁止滑動on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex}}})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.eventCardList?Math.ceil(this.layoutData.eventCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.eventCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.eventCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"","sectionGroup":"event","type":"event_3_a","title":{"text":"event_3_a"},"subTitleList":[{"text":"副標題"}],"eventCardList":[{"cardId":"549df7","ime":{"srcPc":"picsum.photos/738/500/?random=65","srcMob":"picsum.photos/600/400/?random=6","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},{"cardId":"ca07c9","ime":{"srcPc":"picsum.photos/738/500/?random=12","srcMob":"picsum.photos/600/400/?random=93","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},{"cardId":"bee564","ime":{"srcPc":"picsum.photos/738/500/?random=37","srcMob":"picsum.photos/600/400/?random=18","alt":"商品卡"},"title":{"text":"活動標題"},"subTitleList":[{"text":"描述"}]},]})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:3,currentPe:0,}},mounted(){constvue_this=thissetTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},allowTouchMove:false,//禁止滑動on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex}}})},3000);},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.eventCardList?Math.ceil(this.layoutData.eventCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.eventCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.eventCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"40e187","sectionGroup":"event","type":"event_3_b","eventCardList":[{"cardId":"4d5c8f","ime":{"srcPc":"picsum.photos/1240/1516/?random=59","srcMob":"picsum.photos/686/1000/?random=60","alt":"商品卡"},"title":{"text":"event_3_b"},"subTitleList":[{"text":"描述"}]},{"cardId":"2ba6c2","ime":{"srcPc":"picsum.photos/1240/600/?random=92","srcMob":"picsum.photos/686/400/?random=2","alt":"商品卡"},"title":{"text":"event_3_b"},"subTitleList":[{"text":"描述"}]},{"cardId":"2be02e","ime":{"srcPc":"picsum.photos/1240/600/?random=97","srcMob":"picsum.photos/686/400/?random=70","alt":"商品卡"},"title":{"text":"event_3_b"},"subTitleList":[{"text":"描述"}]}],"settingConfig":{"groupDetailList":[{"groupType":"event","titleMaxLength":12,"subTitleMaxLength":20}]}})}},})Vue.component('event-5p-a',{template:'#event-5p-a-temp',props:{layoutData:{type:Object,default:()=>({"sectionId":"964def","sectionGroup":"event","type":"event_5p_a","bannerCardList":[{"cardId":"f7b5a7","ime":{"srcPc":"picsum.photos/1440/800/?random=84","srcMob":"picsum.photos/750/750/?random=13","alt":"商品卡"},"title":{"text":"banner區域"},"subTitleList":[{"text":"副標題"}],"button":{"text":"按鈕文字","url":"","classList":["m-btn-primary"]}}],"productCardList":[{"cardId":"8f4733","imeList":[{"srcPc":"picsum.photos/430/430/?random=64","srcMob":"picsum.photos/350/350/?random=11","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=88","srcMob":"picsum.photos/350/350/?random=79","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=85","srcMob":"picsum.photos/350/350/?random=80","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"product_card_1"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"39db91","imeList":[{"srcPc":"picsum.photos/430/430/?random=37","srcMob":"picsum.photos/350/350/?random=9","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=4","srcMob":"picsum.photos/350/350/?random=45","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"product_card_1"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[]},{"cardId":"e1e895","imeList":[{"srcPc":"picsum.photos/430/430/?random=35","srcMob":"picsum.photos/350/350/?random=63","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=22","srcMob":"picsum.photos/350/350/?random=65","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"f08e97","imeList":[{"srcPc":"picsum.photos/430/430/?random=0","srcMob":"picsum.photos/350/350/?random=92","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=85","srcMob":"picsum.photos/350/350/?random=20","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=9","srcMob":"picsum.photos/350/350/?random=8","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=84","srcMob":"picsum.photos/350/350/?random=33","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"59e787","imeList":[{"srcPc":"picsum.photos/430/430/?random=92","srcMob":"picsum.photos/350/350/?random=24","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=88","srcMob":"picsum.photos/350/350/?random=69","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":1000},"url":"/","tList":[]}],"settingConfig":{"basicSetting":{"hasTitle":true,"hasSubTitle":true,"titleMaxLength":12,"subTitleMaxLength":20},"groupDetailList":[{"groupType":"banner","titleMaxLength":12,"subTitleMaxLength":20},{"groupType":"product","cardMinQty":5,"cardMaxQty":10}]}})}},data(){return{swiperId:generateUniqueId(),cardQtyPerPe:5,currentPe:0,}},mounted(){constvue_this=thissetTimeout(()=>{constswiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:this.cardGroupList.length>1,//循環nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},allowTouchMove:false,//禁止滑動on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex}}})},3000)},beforeDestroy(){deleteUniqueId(this.swiperId)},computed:{totalPe(){returnthis.layoutData.productCardList?Math.ceil(this.layoutData.productCardList.length/this.cardQtyPerPe):1},cardGroupList(){if(!this.layoutData.productCardList)return[]//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.productCardList)//後的結果constresult=[]for(leti=0;i({"sectionId":"964def","sectionGroup":"event","type":"event_4g_a","ime":{"srcPc":"picsum.photos/308/180/?random=84","srcMob":"picsum.photos/308/180/?random=13","alt":"商品卡"},"basicType":"CUSTOM",//BRAND品牌.CUSTOM自定義"title":{"text":"標題"},"button":{"text":"更多商品","classList":["m-btn-primary"],"route"Marais 瑪黑家居選物:{"routerType":"","routerData":"","url":"",},},//-多個section"subSectionList":[{"sectionId":"79bed4","sectionGroup":"product","type":"product_no_title_3_a","ime":{"srcPc":'picsum.photos/1030/642/?random=12',"srcMob":'picsum.photos/750/460/?random=12',"alt":'',},"productCardList":[{"cardId":"bd8643","imeList":[{"srcPc":"picsum.photos/430/430/?random=83","srcMob":"picsum.photos/350/350/?random=56","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=15","srcMob":"picsum.photos/350/350/?random=82","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]}]},{"cardId":"dce61c","imeList":[{"srcPc":"picsum.photos/430/430/?random=29","srcMob":"picsum.photos/350/350/?random=60","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=78","srcMob":"picsum.photos/350/350/?random=48","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]},{"text":"t","classList":["t-blue"]},{"text":"贈","classList":["t-brown"]}]},{"cardId":"7c2720","imeList":[{"srcPc":"picsum.photos/430/430/?random=39","srcMob":"picsum.photos/350/350/?random=28","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=57","srcMob":"picsum.photos/350/350/?random=59","alt":"商品卡"},{"srcPc":"picsum.photos/430/430/?random=80","srcMob":"picsum.photos/350/350/?random=22","alt":"商品卡"}],"brand":{"text":"品牌"},"title":{"text":"商品標題"},"discount":{"text":"7折"},"productId":{"text":700},"originalPrice":{"text":"12,500"},"url":"/","tList":[{"text":"買一送一","classList":["t-blue"]}]},],},{"sectionId":"3f09ea","sectionGroup":"fn","type":"custom_fn_rectangle_3","situationCardList":[{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":"",},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":"",},},{"cardId":"e4610f","ime":{"srcPc":"picsum.photos/804/640/?random=3","srcMob":"picsum.photos/630/960/?random=74","alt":"商品卡"},"smallIme":{"srcPc":"picsum.photos/150/150/?random=3","srcMob":"picsum.photos/150/150/?random=74","alt":"贈品圖"},"title":{"text":"標題"},"subTitleList":[{"text":"副標題"}],"t":{"text":"標籤"},"route":{"routerType":"","routerData":"","url":"",},},]}],"settingConfig":{"basicSetting":{"hasTitle":true,"hasSubTitle":false,},}})}},data(){return{}},mounted(){window.addEventListener('resize',this.handleResize)},beforeDestroy(){window.removeEventListener('resize',this.handleResize)},methods:{handleResize:_.debounce(function(){this.screenWidth=window.innerWidth},20),getImgFullLink(path){returncombineImgSrc(path)},goPe(url,event){handleLink(url,event)}},}){{card.title.text}}{{card.title.text}}Vue.component("benefit-3-a",{template:"#benefit-3-a-temp",props:{layoutData:{type:Object,default:()=>({"sectionId":"17d7d4","sectionGroup":"benefit","type":"benefit_3_a","benefitList":[{"cardId":"c5Marais 瑪黑家居選物431d","title":{"text":"購物滿$600即可免運"},"iconIme":"freeShipping"},{"cardId":"a0c41a","title":{"text":"全站折扣碼:MARA200"},"iconIme":"coupon"},{"cardId":"c29fcd","title":{"text":"新會員APP首購享$100購物金"},"iconIme":"money"}],"settingConfig":{"groupDetailList":[{"groupType":"benefit","cardMinQty":1,"cardMaxQty":3,"titleMaxLength":15}]}})},},data(){return{swiper:null,swiperId:generateUniqueId(),cardQtyPerPe:1,currentPe:0,};},mounted(){constvue_this=this;setTimeout(()=>{vue_this.swiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁loop:true,autoplay:{delay:5000,},nigation:{nextEl:`.swiper-button-next-`+this.swiperId,prevEl:`.swiper-button-prev-`+this.swiperId,},on:{slideChangeTransitionStart:function(){vue_this.currentPe=this.activeIndex;},click:function(event){event.preventDefault()constparentWithClass=event.target.closest('.swiper-button-prev,.swiper-button-next')if(parentWithClass)returnconsttargetIndex=vue_this.swiper.realIndexconsturl=vue_this.layoutData?.benefitList[targetIndex]?.route?.urlvue_this.goPe(url,event)},},});},3000);},beforeDestroy(){deleteUniqueId(this.swiperId);},computed:{totalPe(){returnthis.layoutData.benefitList?Math.ceil(this.layoutData.benefitList.length/this.cardQtyPerPe):1;},cardGroupList(){if(!this.layoutData||!this.layoutData.benefitList)return[];//深拷貝原始資料constoriginal_data=_.cloneDeep(this.layoutData.benefitList);//後的結果constresult=[];for(leti=0;i([{"ime":{"srcPc":"/public/assets/store_flship_store.png","srcMob":"/public/assets/store_flship_store.png"},"title":{"text":"旗艦店"},"subTitleList":[{}],"storeType":"瑪黑門市","linkList":[{"url":"maps.app.goo.gl/ZEhcyRvX8WZcvErQ9","title":{"text":"敦南"}},{"url":"maps.app.goo.gl/tHJNgR1KXvnmNLzY8","title":{"text":"LaLaport"}}]},{"ime":{"srcPc":"/public/assets/store_items_store.png","srcMob":"/public/assets/store_items_store.png"},"title":{"text":"選物店"},"subTitleList":[{}],"storeType":"瑪黑門市","linkList":[{"url":"maps.app.goo.gl/cJsHitQppcm8cuke8","title":{"text":"中山"}},{"url":"maps.app.goo.gl/PbvZximqw5mRsNbm9","title":{"text":"秀泰文心"}}]},{"ime":{"srcPc":"/public/assets/store_concept.png","srcMob":"/public/assets/store_concept.png"},"title":{"text":"概念店"},"subTitleList":[{}],"storeType":"瑪黑門市","linkList":[{"url":"maps.app.goo.gl/ZJLKUvHPZep9m2up6","title":{"text":"安和"}},{"url":"maps.app.goo.gl/fLkXM8FQunAjF3gZ9","title":{"text":"新光三越"}}]},{"ime":{"srcPc":"/public/assets/store_CANTINE_MARAIS.png","srcMob":"/public/assets/store_CANTINE_MARAIS.png"},"title":{"text":"瑪黑餐酒"},"subTitleList":[{}],"storeType":"瑪黑餐酒","linkList":[{"url":"maps.app.goo.gl/pWBiaXsfcXvcc8Kr6","title":{"text":"瑪黑餐酒"}}]},{"ime":{"srcPc":"/public/assets/store_Lille_M.png","srcMob":"/public/assets/store_Lille_M.png"},"title":{"text":"LilleM.Cafe&Restaurant"},"subTitleList":[{}],"storeType":"瑪黑餐酒","linkList":[{"url":"maps.app.goo.gl/cJsHitQppcm8cuke8","title":{"text":"LilleM.Cafe&Restaurant"}}]},{"ime":{"srcPc":"/public/assets/store_Ochre_Grill_Bar.png","srcMob":"/public/assets/store_Ochre_Grill_Bar.png"},"title":{"text":"OchreGrill&Bar"},"subTitleList":[{}],"storeType":"瑪黑餐酒","linkList":[{"url":"maps.app.goo.gl/AKhu2BTTRHpuNXXR7","title":{"text":"OchreGrill&Bar"}}]}])}},data(){return{swiperId:generateUniqueId(),swiper:null,pcSelectedStoreGroupIndex:0,mobSelectedStoreIndex:0,}},mounted(){constvue_this=thissetTimeout(()=>{this.swiper=newSwiper(`.swiper-`+this.swiperId,{slidesPerView:1,//一次顯示一頁allowTouchMove:false,//禁止滑動})},3000);},beforeDestroy(){deleteUniqueId(this.swiperId)},methods:{pcStoreTypeClick(idx){this.swiper.slideTo(idx)this.pcSelectedStoreGroupIndex=idx},mobStoreTypeClick(idx){this.mobSelectedStoreIndex=idx}},computed:{pcStoreGroup(){conststoreData=this.layoutData.storeCardListconstgroupByStoreType=_.groupBy(storeData,(item)=>item.storeType)constresult=Object.entries(groupByStoreType).map(x=>({storeType:x[0],storeList:x[1]}))returnresult},mobSelectedStore(){returnthis.layoutData.storeCardList[this.mobSelectedStoreIndex]},}})newVue({el:'#optimized-orientation',data(){return{orientationId:localStore.getItem('selectedOrientationId'),//抓取localStore的selectedOrientationIdsectionList:[],}},mounted(){if(this.orientationId){window.location.href='/layout/'+this.orientationId}else{this.getOrientationIndexData()}},methods:{//取得主題頁資料getOrientationIndexData(){axios.post('/home/act/orientation').then((res)=>{//console.log('orientation_index_data',res)if(res.status===200){this.sectionList=res.data}}).catch((error)=>{console.error('get_orientation_data_error',error)})},},}) Line快速登入或註冊 OR {{apiErrorMsg}}{{accountErrorMsg}}記住此次登入忘記密碼登入沒有帳號?註冊 繼續使用即代表你同意並遵守瑪黑的 隱私政策條款 Vue.component("login-method",{template:"#login-method-step",data(){return{apiErrorMsg:"",account:"",showAccountError:false,accountErrorMsg:"",password:"",showPasswordError:false,passwordErrorMsg:"",showPassword:false,rememberMe:true,}},watch:{showPassword:{handler:function(val){varpasswordInput=document.getElementById("password")if(passwordInput.type==="password"){passwordInput.type="text"}else{passwordInput.type="password"}},deep:true,},},methods:{lineLogin(){window.location.href='/auth/line/login'},loginByCode(){this.$emit("go-verify-account","EMAILORPHONE",null,"OTP_LOGIN")},toLoginWithFB(){constv_this=thisFB.login(function(response){console.log("==toLoginWithFB==",response)if(response.authResponse){console.log("Welcome!Fetchingyourinformation....")v_this.getInfo(response.authResponse.accessToken)}else{console.log("Usercancelledloginordidnotfullyauthorize.")}},{scope:"public_profile,email"})},getInfo(at){constv_this=thisconstFB_LOGIN_REDIRECT_API="/auth/fb/loginpostback?"FB.api("/me",{fields:"email,name"},function(response){constid=response.idconstname=response.nameconstemail=response.email?response.email:'undefined'if(!id){console.log("Usernoid.")}else{letparam=encodeURI("id="+id+"&name="+name+"&email="+email+"&accessToken"+at)window.location.href=FB_LOGIN_REDIRECT_API+param}})},//帳密登入onAccountCheck(){this.apiErrorMsg=""this.showAccountError=false//email格式consthasLength=/^.{8,30}$/if(!this.account){this.accountErrorMsg="請輸入帳號"this.showAccountError=true}elseif(!hasLength.test(this.account)){this.accountErrorMsg="請輸入8-30個英數文字"this.showAccountError=true}},goResetPassword(){this.$emit("set-doing","forget_password")this.$emit("go-verify-account","EMAILORPHONE",null,"FORGET_PASSWORD")},goRegisterMethod(){this.$emit("set-doing","register")this.$emit("go-register-method")},debouncedLogin:_.debounce(function(){this.onLogin()},1000,{leading:true,trailing:false,}),asynconLogin(){try{constbody={emailOrPhone:this.account,password:this.password,remember:this.rememberMe,}constresp=awaitaxios.post("/auth/marais/loginsubmit",body)constdata=resp.dataif(data.success===false){this.apiErrorMsg=data.messe}else{if(data.loginStatus==="PHONE_VALIDATION"&&!data.phone){this.$emit("go-verify-account","PHONE",data.uuid,"REGISTRATION")}elseif(data.loginStatus==="EMAIL_VALIDATION"&&data.email){this.$emit("go-enter-code",data.email,"EMAIL",data.uuid,"REGISTRATION")}elseif(data.loginStatus==="SUCCESS"){onCallSwal("已成功登入","success")$("#login-flow-modal").modal("hide")setTimeout(()=>{//調整如果有loginBackUrl就導回,沒有就reloadif(data.loginBackUrl)window.location.href=data.loginBackUrlelsewindow.location.reload()},100)}}}catch(error){console.log("登入失敗",error)}},toggleCheckbox(){this.rememberMe=!this.rememberMe},goHome(){window.location.href="/"},goPrivacy(){window.location.href="/privacypolicy"},apiErrorShow(msg){this.apiErrorMsg=msg},},}) 驗證手機號碼,完成註冊如忘記密碼,可透過手機號碼重設只差一步,輸入信箱若忘記密碼可以透過Email找回身份驗證請輸入Email或手機號碼進行驗證快速驗證請輸入您的{{varifyType==="EMAIL"?'信箱':'手機號碼'}},以獲取驗證碼 {{apiErrorMsg}} {{varifyType==="EMAIL"?"Email":varifyType==="PHONE"?"手機號碼":"Email/手機號碼"}}*{{emailErrorMsg}} 寄送驗證碼 Vue.component("verify-account",{template:"#verify-account-step",props:{showBackArrow:{type:Boolean,default:true,},showCloseIcon:{type:Boolean,default:false,},varifyType:String,processType:String,uuid:{type:String,default:null,},},data(){return{apiErrorMsg:"",emailOrPhone:"",showEmailError:false,emailErrorMsg:"",}},methods:{backStep(){this.$emit("back-step")},showError(messe){this.emailErrorMsg=messethis.showEmailError=true},onEmailCheck(){this.showEmailError=false//用有沒有英文判斷是email還是phoneconsthasEn=/[a-zA-Z]///email格式constre=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z]+$///手機號碼格式constregex=/^09[0-9]{8}$/if(!this.emailOrPhone){if(this.varifyType==="EMAIL"){this.showError("請輸入Email")}elseif(this.varifyType==="PHONE"){this.showError("請輸入手機號碼")}else{this.showError("請輸入Email或手機號碼")}}else{if(hasEn.test(this.emailOrPhone)){if(this.emailOrPhone.search(re)!==0){this.showError("格式似乎有誤,請再試試!")}else{this.emailErrorMsg=""}}else{if(!regex.test(this.emailOrPhone)){this.showError("格式似乎有誤,請再試試!")}else{this.emailErrorMsg=""}}}},asyncsendVerifyCode(){this.onEmailCheck()lettheVarifyType=this.varifyTypeif(this.varifyType==="EMAILORPHONE"){theVarifyType=this.emailOrPhone.includes("@")?"EMAIL":"PHONE"}if(!this.showEmailError){try{constbody={emailOrPhone:this.emailOrPhone,infoType:theVarifyType,//EMAIL,PHONEprocessType:this.processType,//REGISTRATION,FORGET_PASSWORD,ADD_CONTACT_INFOuuid:this.uuid,}constresp=awaitaxios.post("/auth/marais/otpSend",body)constdata=resp.dataif(data.success===false){this.apiErrorMsg=data.messe}elseif(data.loginStatus==="RE_LOGIN"){this.$emit("go-not-ma-notify")}else{this.$emit("go-enter-code",this.emailOrPhone,null,data.uuid)}}catch(error){console.log("驗證碼發送失敗",error)}}},debouncedClick:_.debounce(function(){this.sendVerifyCode()},1000,{leading:true,trailing:false,}),},}); 驗證碼已發送! 發送地址:{{encrypt(emailOrPhone)}} 沒收到驗證碼?({{count}}秒) 再次發送 再次發送 {{otpValidationApiPending?'驗證中...':'確認'}} {{varifyType==='EMAIL'?'試試其他信箱':'試試其他手機'}} Vue.component("enter-code",{template:"#enter-code-step",props:{showBackArrow:{type:Boolean,default:true,},showCloseIcon:{type:Boolean,default:false,},uuid:{type:String,default:null,},varifyType:String,emailOrPhone:String,processType:String,doing:String,},data(){return{otpValidationApiPending:false,count:60,verifyCodeInputRef:null,verifyCodeInputs:[{show:true,value:"",},{show:true,value:"",},{show:true,value:"",},{show:true,value:"",},],}},methods:{backStep(){this.$emit("back-step")},toInputFocus(index){this.$refs.verifyCodeInputRef[index].focus()},//控制focus的位置onInputKeyDown(index){constcurrentInput=this.$refs.verifyCodeInputRef[index]//Nextif((currentInput.value.length===currentInput.maxLength&&![8,9,16,17,18,91].includes(event.keyCode))||event.keyCode===39){constnextInput=this.$refs.verifyCodeInputRef[index+1]if(nextInput){nextInput.focus()}}//Previf((currentInput.value.length===0&&event.keyCode===8)||event.keyCode===37){constprevInput=this.$refs.verifyCodeInputRef[index-1]if(prevInput){prevInput.focus()}}},onInputKeyUp(event,index){setTimeout(()=>{constnextInput=this.$refs.verifyCodeInputRef[index+1]if(this.$refs.verifyCodeInputRef[index].value&&nextInput!==undefined&&event.keyCode!==37){nextInput.focus()}},0)},moveCursorToEnd(event,item){item.show=falsesetTimeout(()=>{constinput=event.targetif(input.value.length){input.setSelectionRange(input.value.length,input.value.length)}},0)},asyncenterVerifyCode(){this.otpValidationApiPending=truetry{consttheCode=this.verifyCodeInputs.map((item)=>item.value).join("")constbody={emailOrPhone:this.emailOrPhone,infoType:this.varifyType,processType:this.processType,code:theCode,uuid:this.uuid,}constresp=awaitaxios.post("/auth/marais/otpValidate",body)constdata=resp.dataif(data.success===false){onCallSwal(data.messe,"info")}elseif(!data.isMemberActionSuccess&&this.processType==='ADD_CONTACT_INFO'){onCallSwal(this.varifyType==='EMAIL'?"信箱已重複,請再試試":"手機已重複,請再試試","info")setTimeout(()=>{this.tryOtherAccount()},3000)}else{if(data.isMemberActionSuccess){if(this.processType==='CHANGE_PASSWORD'){onCallSwal("驗證完成,請設定新密碼","success")$("#forget-password-flow-modal").modal("hide")setTimeout(()=>{window.location.reload()},1000)}elseif(this.processType==='ADD_CONTACT_INFO'){onCallSwal(this.varifyType==='EMAIL'?"信箱已新增":"手機已新增","success")$("#add-email-or-phone-flow-modal").modal("hide")setTimeout(()=>{memberInfo_vm.getMemberInfo()},100)}}if(data.loginStatus==="PHONE_VALIDATION"){if(data.phone){//alert("我們發現你用過此帳號登入,請接續使用此手機收信並進行驗證")this.varifyType="PHONE"this.emailOrPhone=data.phonethis.verifyCodeInputs.forEach((element)=>{element.value=""})}else{this.$emit("go-verify-account","PHONE",data.uuid,"REGISTRATION")}}elseif(data.loginStatus==="PASSWORD_RESET"){if(this.doing==="forget_password"){this.$emit("go-reset-password",data.accountType,data.uuid)}}elseif(data.loginStatus==="RE_LOGIN"){if(data.account){this.$emit("go-find-same-ma-notify",data.account)}else{onCallSwal("資料有誤,請再試試","info")this.$emit("go-login-method",data.account)}}elseif(data.loginStatus==="SUCCESS"){onCallSwal("已成功登入","success")$("#login-flow-modal").modal("hide")setTimeout(()=>{window.location.reload()},100)}}this.otpValidationApiPending=false}catch(error){console.log("驗證碼輸入失敗",error)this.otpValidationApiPending=false}},asyncreSendVerify(){try{constbody={emailOrPhone:this.emailOrPhone,infoType:this.varifyType,processType:this.processType,uuid:this.uuid,}constresp=awaitaxios.post("/auth/marais/otpSend",body)constdata=resp.data}catch(error){onCallSwal("驗證碼發送失敗","info")}},waitOtpValidationApiPending(){if(!this.otpValidationApiPending){this.enterVerifyCode()}},debouncedSendain:_.debounce(function(){this.countDown()this.reSendVerify()},1000,{leading:true,trailing:false,}),tryOtherAccount(){if(this.doing==='register'){this.$emit("go-register-method")}else{this.$emit("go-verify-account",this.varifyType,this.uuid,this.processType)}},encrypt(emailOrPhone){constencryptPhone=emailOrPhoneconstisEmail=emailOrPhone.includes("@")if(!isEmail){returnencryptPhone.slice(0,4)+"-***-"+encryptPhone.slice(-3)}returnencryptPhone},allInputEnter(){returnthis.verifyCodeInputs.every((item)=>item.value)},countDown(){this.count=60consttimer=setInterval(()=>{this.count--if(this.count===0){clearInterval(timer)}},1000)},pickText(item){if(item.value.length>1){item.value=item.value.charAt(0).replace(/\D/g,'')//仍然只保留个字符}},},mounted(){//this.$refs.verifyCodeInputRef[0].focus();//ioschromefocus會失敗所以不用this.countDown()},}); 設定密碼 就快完成囉,請設定您的瑪黑密碼 新密碼* 長度為8個字元以上 包含1個大寫字母 包含1個數字 確認新密碼** {{confirmPasswordErrorMsg}} 設定完成 Vue.component("reset-password",{template:"#reset-password-step",props:{uuid:{type:String,default:null,},accountType:{type:String,default:"MARAIS_ACCOUNT",},},data(){return{newPassword:"",showNewPasswordError:false,newPasswordErrorMsg:"",showNewPassword:false,isLength:false,isUpper:false,isEn:false,isNum:false,confirmPassword:"",showConfirmPasswordError:false,confirmPasswordErrorMsg:"",showConfirmPassword:false,};},watch:{showNewPassword:{handler:function(val){this.togglePasswordVisibility("newPassword");},deep:true,},showConfirmPassword:{handler:function(val){this.togglePasswordVisibility("confirmPassword");},deep:true,},},methods:{backStep(){this.$emit("back-step");},canSubmitColor(){return(this.newPassword&&this.confirmPassword&&!this.showNewPasswordError&&!this.showConfirmPasswordError);},togglePasswordVisibility(passwordFieldId){constpasswordInput=document.getElementById(passwordFieldId);passwordInput.type=passwordInput.type==="password"?"text":"password";},onPasswordCheck(){this.showNewPasswordError=false;consthasEn=/[A-Za-z]/;consthasNum=/[0-9]/;consthasUpper=/[A-Z]/;consthasLower=/[a-z]/;consthasSpace=/\s/;consthasLength=/^.{8,}$/;if(!this.newPassword){this.newPasswordErrorMsg="請輸入密碼";this.showNewPasswordError=true;}else{if(!hasLength.test(this.newPassword)){this.newPasswordErrorMsg="密碼長度需為8個字元以上";this.showNewPasswordError=true;}elseif(!hasUpper.test(this.newPassword)){this.newPasswordErrorMsg="密碼需包含1個大寫字母";this.showNewPasswordError=true;}elseif(!hasNum.test(this.newPassword)){this.newPasswordErrorMsg="密碼需包含1個數字";this.showNewPasswordError=true;}elseif(hasSpace.test(this.newPassword)){this.newPasswordErrorMsg="密碼不可包含空白字元";this.showNewPasswordError=true;}}if(hasLength.test(this.newPassword)){this.isLength=true;}else{this.isLength=false;}if(hasUpper.test(this.newPassword)){this.isUpper=true;}else{this.isUpper=false;}if(hasNum.test(this.newPassword)){this.isNum=true;}else{this.isNum=false;}if(this.confirmPassword!==this.newPassword&&this.confirmPassword){this.confirmPasswordErrorMsg="密碼未一致,請再試試";this.showConfirmPasswordError=true;}else{this.confirmPasswordErrorMsg=""this.showConfirmPasswordError=false}},onConfirmPasswordCheck(){this.showConfirmPasswordError=false;if(!this.confirmPassword){this.confirmPasswordErrorMsg="請再次輸入密碼";this.showConfirmPasswordError=true;}elseif(this.confirmPassword!==this.newPassword){this.confirmPasswordErrorMsg="密碼未一致,請再試試";this.showConfirmPasswordError=true;}else{this.confirmPasswordErrorMsg="";}},asynconResetPassword(){if(this.showNewPasswordError||this.showConfirmPasswordError){return;}try{constbody={newPwd1:this.newPassword,newPwd2:this.confirmPassword,accountType:this.accountType,uuid:this.uuid,};constresp=awaitaxios.post("/auth/marais/resetPassword",body);constdata=resp.data;if(data.success!==false){if(data.loginStatus==="RE_LOGIN"){onCallSwal("密碼設定完成","success");this.$emit("go-login-method");}else{onCallSwal("已成功登入","success");$("#login-flow-modal").modal("hide");setTimeout(()=>{window.location.reload();},100);}}}catch(error){console.log("驗證碼發送失敗");}},},});註冊會員社群帳號繼續,或使用帳密註冊OR{{apiErrorMsg}}{{accountErrorMsg}}長度為8個字元以上包含1個大寫字母包含1個數字{{confirmPasswordErrorMsg}}{{registerLoading?'註冊中...':'註冊'}}Vue.component("register-method",{template:"#register-method-step",data(){return{account:"",showAccountError:false,accountErrorMsg:"",password:"",showPasswordError:false,passwordErrorMsg:"",showPassword:false,isLength:false,isUpper:false,isEn:false,isNum:false,confirmPassword:"",showConfirmPasswordError:false,confirmPasswordErrorMsg:"",showConfirmPassword:false,registerLoading:false,apiErrorMsg:"",}},watch:{showPassword:{handler:function(val){this.togglePasswordVisibility("register-password")},deep:true,},showConfirmPassword:{handler:function(val){this.togglePasswordVisibility("register-confirmPassword")},deep:true,},},methods:{lineLogin(){window.location.href='/auth/line/login'},toLoginWithFB(){constv_this=thisFB.login(function(response){console.log("==toLoginWithFB==",response)if(response.authResponse){console.log("Welcome!Fetchingyourinformation....")v_this.getInfo(response.authResponse.accessToken)}else{varerrorArea=document.getElementById("error-alert-area")varerrorTextArea=document.getElementById("error-text")errorArea.style.display="flex"errorTextArea.innerText="帳號或密碼輸入無法辨識。請重試或使用其他登錄選項。"console.log("Usercancelledloginordidnotfullyauthorize.")}},{scope:"public_profile,email"})},getInfo(at){constFB_LOGIN_REDIRECT_API="/auth/fb/loginpostback?"FB.api("/me",{fields:"email,name"},function(response){constid=response.idconstname=response.nameconstemail=response.emailFB_DATA={id:response.id,name:response.name,email:response.email,at:at,}if(!id){varerrorArea=document.getElementById("error-alert-area")varerrorTextArea=document.getElementById("error-text")errorArea.style.display="flex"errorTextArea.innerText="帳號或密碼輸入無法辨識。請重試或使用其他登錄選項。"}elseif(!email){//無法取得emailvarerrorArea=document.getElementById("error-alert-area")varerrorTextArea=document.getElementById("error-text")varsocialBtns=document.getElementById("social-btns-area")varsocialEmail=document.getElementById("social-email-area")varspaceArea=document.getElementById("space-area")varinit=document.getElementsByClassName("init-area")[0]errorArea.style.display="flex"errorTextArea.innerHTML='登入失敗!由於您沒有授權臉書使用電子郵件,無法辨識您的email!'+'請於下方輸入您的email'socialBtns.style.display="none"socialEmail.style.display="flex"spaceArea.style.display="none"init.style.display="none"}else{letparam=encodeURI("id="+id+"&name="+name+"&email="+email+"&accessToken"+at)window.location.href=FB_LOGIN_REDIRECT_API+param}})},backStep(){this.$emit("back-step")},onAccountCheck(){this.showAccountError=false//email格式constisEmail=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z]+$/if(!this.account){this.accountErrorMsg="請輸入帳號"this.showAccountError=true}elseif(!isEmail.test(this.account)){this.accountErrorMsg="格式似乎有誤,請再試試!"this.showAccountError=true}},canRegisterColor(){return(this.account&&this.password&&this.confirmPassword&&!this.showAccountError&&!this.showPasswordError&&!this.showConfirmPasswordError)},togglePasswordVisibility(passwordFieldId){constpasswordInput=document.getElementById(passwordFieldId)passwordInput.type=passwordInput.type==="password"?"text":"password"},onPasswordCheck(){this.showPasswordError=falseconsthasEn=/[A-Za-z]/consthasNum=/[0-9]/consthasUpper=/[A-Z]/consthasLower=/[a-z]/consthasSpace=/\s/consthasLength=/^.{8,}$/if(!this.password){this.passwordErrorMsg="請輸入密碼"this.showPasswordError=true}else{if(!hasLength.test(this.password)){this.passwordErrorMsg="密碼長度需為8個字元以上"this.showPasswordError=true}elseif(!hasUpper.test(this.password)){this.passwordErrorMsg="密碼需包含1個大寫字母"this.showPasswordError=true}elseif(!hasNum.test(this.password)){this.passwordErrorMsg="密碼需包含1個數字"this.showPasswordError=true}elseif(hasSpace.test(this.password)){this.passwordErrorMsg="密碼不可包含空白字元"this.showPasswordError=true}}if(hasLength.test(this.password)){this.isLength=true}else{this.isLength=false}if(hasUpper.test(this.password)){this.isUpper=true}else{this.isUpper=false}if(hasNum.test(this.password)){this.isNum=true}else{this.isNum=false}if(this.confirmPassword!==this.password&&this.confirmPassword){this.confirmPasswordErrorMsg="密碼未一致,請再試試"this.showConfirmPasswordError=true}else{this.confirmPasswordErrorMsg=""this.showConfirmPasswordError=false}},onConfirmPasswordCheck(){this.showConfirmPasswordError=falseif(!this.confirmPassword){this.confirmPasswordErrorMsg="請再次輸入密碼"this.showConfirmPasswordError=true}elseif(this.confirmPassword!==this.password){this.confirmPasswordErrorMsg="密碼未一致,請再試試"this.showConfirmPasswordError=true}else{this.confirmPasswordErrorMsg=""}},debouncedRegister:_.debounce(function(){this.onRegister()},1000,{leading:true,trailing:false,}),asynconRegister(){this.registerLoading=trueconstv_this=thistry{if(this.canRegisterColor()){constbody={"emailOrPhone":this.account,"infoType":"EMAIL","newPwd1":this.password,"newPwd2":this.confirmPassword,}constres=awaitaxios.post("/auth/marais/signup",body)this.registerLoading=falseconstdata=res.dataif(data?.success===false){this.apiErrorMsg=data.messe}else{if(data.loginStatus==="EMAIL_VALIDATION"){this.$emit("go-enter-code",data.emailOrPhone,'EMAIL',data.uuid,'REGISTRATION')}elseif(data.loginStatus==="RE_LOGIN"&&data.mediaTypeSet.includes("ACCOUNT")){showNotifyModal(title='此信箱已是會員',content='我們發現您已經註冊過,請使用「帳號密碼」登入。',isRightBtn=true,rightBtnText='登入',onRightBtn=()=>{v_this.$emit("go-login-method")closeNotifyModal()},isDangerRightBtn=false,isLeftBtn=true,leftBtnText='取消',onLeftBtn=()=>closeNotifyModal(),isDangerLeftBtn=false)}elseif(data.loginStatus==="RE_LOGIN"){constmediaStr=data.mediaTypeSet.toString().replace(/,/g,'、')showNotifyModal(title='此信箱已是會員',content='我們發現您已經註冊過,請使用此信箱進行第三方「'+mediaStr+'」登入。',isRightBtn=true,rightBtnText='登入',onRightBtn=()=>{v_this.$emit("go-login-method")closeNotifyModal()},isDangerRightBtn=false,isLeftBtn=true,leftBtnText='取消',onLeftBtn=()=>closeNotifyModal(),isDangerLeftBtn=false)}}}}catch(error){this.registerLoading=false}}},}) 找到重複帳號,請重新登入 我們發現你同時擁有兩個帳號,系統已自動合併。將會以帳號「{{sameAccount}}」進行登入。 確認 Vue.component("find-same-ma-notify",{ template:"#find-same-ma-notify-step", props:{ sameAccount:String, }, methods:{ closeLogin(){ $("#login-flow-modal").modal("hide"); }, }, }) 您目前無法使用驗證碼登入 因為會員系統更新,請您嘗試使用其他登入方式,例如第三方應用程式、帳號密碼登入。 重新登入 Vue.component("not-ma-notify",{template:"#not-ma-notify-step",props:{ sameAccount:String, },methods:{goLogin(){this.$emit("go-login-method")},},}) 安全性驗證 我們發現您曾登入過。為確保您的帳戶安全,請再次進行手機驗證。 快速驗證 Vue.component("has-third-part-ma-notify",{template:"#has-third-part-ma-notify-step",props:{emailOrPhone:String,varifyType:String,uuid:String,processType:String,},methods:{goEnterCode(){this.$emit("go-enter-code",this.emailOrPhone,this.varifyType,this.uuid,this.processType)},},})newVue({el:"#login-flow-modal",data(){return{nowStep:"login-method",//'login-method','verify-account','verify-code','account-password-login','reset-password'stepFlow:[],varifyType:"PHONE",//PHONE,EMAILemailOrPhone:"",uuid:"",processType:"",//FORGET_PASSWORD,REGISTRATION,CHANGE_PASSWORD,ADD_CONTACT_INFOaccountType:"",//MARAIS_ACCOUNTdoing:"",//用來記錄正在進行的動作分別有登入彈窗忘記密碼(doing=forget_password)和會員中心忘記密碼(doing=memberPe_forget_password)和登入彈窗忘記密碼(doing=register)sameAccount:"",samePhone:"",showBackArrow:true,closeFresh:0,}},methods:{backStep(){this.nowStep=this.stepFlow[this.stepFlow.length-1]this.stepFlow.pop()},setDoing(doing){this.doing=doing},goLoginMethod(){this.stepFlow.push(this.nowStep)this.nowStep="login-method"},goVerifyAccount(varifyType,uuid,processType){this.varifyType=varifyTypethis.uuid=uuidthis.processType=processTypethis.stepFlow.push(this.nowStep)this.nowStep="verify-account"},goEnterCode(emailOrPhone,varifyType,uuid,processType){this.emailOrPhone=emailOrPhone||this.emailOrPhonethis.varifyType=varifyType||this.varifyTypethis.uuid=uuid||this.uuidthis.processType=processType||this.processTypethis.stepFlow.push(this.nowStep)this.nowStep="enter-code"},goRegisterMethod(){this.stepFlow.push(this.nowStep)this.nowStep="register-method"},goResetPassword(accountType,uuid){this.accountType=accountTypethis.uuid=uuidthis.stepFlow.push(this.nowStep)this.nowStep="reset-password"},goFindSameMaNotify(sameAccount){this.sameAccount=sameAccountthis.stepFlow.push(this.nowStep)this.nowStep="find-same-ma-notify"},goNotMaNotify(){this.stepFlow.push(this.nowStep)this.nowStep="not-ma-notify"},goHasThirdPartMaNotify(varifyType,uuid,processType,samePhone){this.varifyType=varifyTypethis.uuid=uuidthis.processType=processTypethis.emailOrPhone=samePhonethis.stepFlow.push(this.nowStep)this.nowStep="has-third-part-ma-notify"},},mounted(){const_this=this$("#login-flow-modal").on("hide.bs.modal",function(){setTimeout(()=>{_this.nowStep="login-method"_this.closeFresh++},300)})//這段是for第三方跳轉回來後要做的事情判斷constloginStatus=''constphone=''constuuid=''if(loginStatus){if(loginStatus==="PHONE_VALIDATION"&&phone){this.goHasThirdPartMaNotify("PHONE",uuid,"REGISTRATION",phone)this.emailOrPhone=phone}elseif(loginStatus==="PHONE_VALIDATION"&&!phone){this.goVerifyAccount("PHONE",uuid,"REGISTRATION")}elseif(loginStatus==="EMAIL_VALIDATION"){this.goVerifyAccount("EMAIL",uuid,"REGISTRATION")}elseif(loginStatus==="SUSPENDED_FAIL"){this.$refs.loginMethod.apiErrorShow('帳號已停用,請嘗試其他帳號!')this.goLoginMethod()}}},}) functionformatatar(){ varaccount='a' if(''){ account='' } if($('#member-login')){ $('#member-login').text(account.substring(0,1).toUpperCase()) } } formatatar() varisInMaraisApp=checkIsInMaraisApp() //如果是在app內 if(isInMaraisApp){ //在body加上in-marais-appclass constbodyNode=document.querySelector('body') bodyNode.classList.add('in-marais-app') //隱藏nbar constnBar=document.querySelector('#shop-n-pc') nBar.style.display='none' //隱藏footer constfooter=document.querySelector('.global-footer-a') footer.style.display='none' } //根據localStore的selectedOrientationId來決定哪個l0-item要加上'item-active'class constselectedOrientationId=localStore.getItem('selectedOrientationId') //設定nbar的selectedL0Item setNSelectedL0Item(selectedOrientationId) //初始化swipermarquee constswiperMarquee=newSwiper('.swiper-marquee',{ autoplay:{ delay:3000, }, speed:1500, centeredSlides:true, centeredSlidesBounds:true, slidesPerView:1, spaceBetween:0, loop:true, }) functionswiperSlidePrevClick(){ swiperMarquee.slideNext() } functionswiperSlideNextClick(){ swiperMarquee.slidePrev() } functionl0LinkClick(e){ e.preventDefault() constorientationId=e.target.getAttribute('orientationId') localStore.setItem('selectedOrientationId',orientationId) if(orientationId){ window.location.href='/layout/'+orientationId } } functionl2LinkClick(e){ e.preventDefault() //取得該項目的l0-item constl0Item=e.target.closest('.l0-item') //orientationId在aLink的attribute裡 constaLink=l0Item.querySelector('a.l0-item-link') //設定localStore的selectedOrientationId constorientationId=aLink.getAttribute('orientationId') if(orientationId){ localStore.setItem('selectedOrientationId',orientationId) } //跳轉url consturl=e.target.getAttribute('href') if(url){ window.location.href=url } } functionnSearchItemClick(searchStr,item){ constnSearchInput=document.querySelector('#n-search-input') nSearchInput.value=searchStr nSearchInput.submit() } functionopenLoginModal(){ $('#login-flow-modal').modal('show') } functionkeepLoginFlow(){ constloginStatus='' constphone='' constregistration_temp_uuid='' if(loginStatus){ if(loginStatus==='SUCCESS'){ setTimeout(()=>{ onCallSwal('已成功登入','success') },300) }elseif(loginStatus==='PHONE_VALIDATION'&&phone){ this.openLoginModal() }elseif(loginStatus==='EMAIL_VALIDATION'&®istration_temp_uuid){ this.openLoginModal() }elseif(loginStatus==='RE_LOGIN'){ this.openLoginModal() }else{ this.openLoginModal() } } } keepLoginFlow() //getflshipdata $(functiongetFlshipList(){ $.ajax({ contentType:"application/json;charset=utf-8", type:'GET', url:'/flship/act/list', success:function(res){ consttemplate=flshipTemplateHandler(res) $('#shop-n-pc.l0-group').append(template) }, error:function(err){ console.error('getFlshipListerror',err) }, }) }) //計算topnbar分類內容寬度避免換行(當nbar要換行時,先縮padding在縮字體) functionnbarFontSizeChange(){ consthasL0=$('.l0-item.item-active.l1-item-link').css("font-size") if(!hasL0){ return } letl1ItemFontSize=Number($('.l0-item.item-active.l1-item-link').css("font-size").slice(0,-2)) letl1PanelMargin=Number($('.l0-item.item-active.l1-items-box').css("margin-left").slice(0,-2)) letl1ItemPadding=Number($('.l0-item.item-active.l1-item-link').css("padding-left").slice(0,-2)) while(l1PanelMargin30&&l1ItemFontSizeitem.orientationId===currentL0)}//從首頁點擊分類後關閉,selectedNTab回填首頁if(newVal==='分類'&&oldVal==='首頁'){this.isHomeToCategory=true}if(this.isHomeToCategory&&newVal!=='分類'){this.selectedNTab='首頁'this.isHomeToCategory=false}}},},methods:{initSelectedNTab(){//若網址路徑開頭為/layout/,設定tab為首頁if(window.location.pathname.startsWith('/layout/')){this.selectedNTab='首頁'}//若網址路徑開頭為/me/myforitespe,設定tab為會員elseif(window.location.pathname.startsWith('/me/myforitespe')){this.selectedNTab='收藏'}//若網址路徑開頭為/cart,設定tab為購物車elseif(window.location.pathname.startsWith('/cart')){this.selectedNTab='購物車'}//若網址路徑開頭為/me,設定tab為會員elseif(window.location.pathname.startsWith('/me')){this.selectedNTab='會員'}},initSwiper(){this.swiperMarquee=newSwiper('.swiper-marquee-mob',{autoplay:{delay:3000,},speed:1500,centeredSlides:true,centeredSlidesBounds:true,slidesPerView:1,spaceBetween:0,loop:true,})},swiperSlidePrevClick(){this.swiperMarquee.slidePrev()},swiperSlideNextClick(){this.swiperMarquee.slideNext()},l0LinkClick(item){this.selectedL0=item//設定localStore的selectedOrientationIdif(item.orientationId){localStore.setItem('selectedOrientationId',item.orientationId)}//如果選擇的是首頁,則選取l0-item時的動作為跳轉urlif(this.selectedNTab==='首頁'){window.location.href='/layout/'+item.orientationId}},l1LinkClick(item){this.selectedL1=item},mobBackClick(){this.selectedL1=null},bottomNTabClick(tabName){//如果點擊的tab是已經選擇的tabif(this.selectedNTab===tabName){//如果點的是分類,且已經選擇了L1,則點擊分類時要取消選擇的L1if(tabName==='分類'){if(this.selectedL1){this.selectedL1=null}//如果沒有選擇L1,則取消tab的選擇else{this.selectedNTab=''}}//其餘則關閉選擇的tabelse{this.selectedNTab=''}}else{if(tabName==='首頁'){//如果選擇的項目跟初始L0不一樣,則跳轉到選擇的L0的url(適用於mobNBar中點開分類後切換L0又點選首頁)if(this.selectedL0!==this.defaultSelectedL0){window.location.href='/layout/'+this.selectedL0.orientationId}//如果網址路徑不是在/layout/下,則跳轉到目前的主題頁if(!window.location.pathname.startsWith('/layout/')){window.location.href='/layout/'+this.selectedL0.orientationId}//只有網址路徑在/layout/下才開啟tab,其餘則直接跳轉到主題頁else{this.selectedNTab=tabName}}else{this.selectedNTab=tabName}}//無倫點擊的是什麼tab,都要取消選擇的L1this.selectedL1=null},asyncgetCategoryList(){awaitaxios.post('/home/act/category').then(res=>{this.categoryList=res.data})},initSelectedL0(){//根據localStore的selectedOrientationId來決定哪個l0-item要加上'item-active'class//如果沒有選擇的id,則預設選擇個constselectedOrientationId=localStore.getItem('selectedOrientationId')if(!selectedOrientationId){this.defaultSelectedL0=this.categoryList[0]this.selectedL0=this.categoryList[0]}else{this.categoryList.forEach((item)=>{if(item.orientationId===selectedOrientationId){this.defaultSelectedL0=itemthis.selectedL0=item}})}},openLoginModal(){$('#login-flow-modal').modal('show')},nSearchItemClick(){constnSearchInput=document.querySelector('#n-search-input-mob')nSearchInput.value=searchStrnSearchInput.submit()},getImgFullLink(path){returncombineImgSrc(path)},formatatar(){varaccount='a'if(''){account=''}if($('#mobile-tab-member-login')){$('#mobile-tab-member-login').text(account.substring(0,1).toUpperCase())}},asyncgetFlshipList(){this.showFlshipLoading=trueawaitaxios.get('/flship/act/list').then(res=>{this.flshipList=res.data.map(item=>{return{...item,ime:combineImgSrc(item.ime),link:'/flship/layout/'+item.link||item.id,}})}).catch((error)=>{console.error(error)}).finally(()=>{this.showFlshipLoading=false})},onShowFlshipPopup(){this.showFlshipPopup=!this.showFlshipPopupif(this.showFlshipPopup){this.$refs.flshipContent.scroll({top:0,behior:'smooth'});}},},asyncmounted(){//設定L2預設的key,若網址路徑開頭為/category/,拼出與categorykey對應的key內容ex:4-46(L1-L2)if(window.location.pathname.startsWith('/category/')){constcurrentPath=window.location.pathnameconstsplitByCategory=currentPath.split('/category/')[1]constlevelList=splitByCategory.split('/')constl1=levelList[0]letl2=nullif(levelList.length>1){l2=levelList[1]}//設定defaultL2Keythis.defaultSelectedL2Key=l1+'-'+l2}this.formatatar()this.initSelectedNTab()this.initSwiper()awaitthis.getCategoryList()awaitthis.getFlshipList()this.initSelectedL0()},})