瀏覽代碼

connect to realtime json

huaisianhuang 3 年之前
父節點
當前提交
abae55d0c9
共有 2 個文件被更改,包括 442 次插入1 次删除
  1. 1 1
      js/index.js
  2. 441 0
      json/realtime.json

+ 1 - 1
js/index.js

@@ -7,7 +7,7 @@ $(".sec-01__slider").slick({
     let result;
       $.ajax({
           method: "GET",
-          url: "https://m3.hhh.com.tw:18686/genjson",
+          url: "../json/realtime.json",
           dataType: "json",
       }).done(function (msg) {
           result = [...msg];

+ 441 - 0
json/realtime.json

@@ -0,0 +1,441 @@
+[
+    {
+        "_comment": "頂部輪播區",
+        "id": 0,
+        "block": "topCarousel",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15664_1619582521.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=23",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15664_1619582509.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_15664_1619582537.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15672_1605260703.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=28",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15672_1605260690.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_15672_1605260747.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15662_1607045625.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=447",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15662_1607045611.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_15662_1607045687.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15673_1603096869.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=31",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15673_1603096869.jpg",
+                "webp": ""
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16076_1625209654.jpg",
+                "link": "https://hhh.com.tw/designers/cases/586/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16076_1625209580.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16076_1625209663.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15666_1627961097.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=32",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15666_1627961071.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_15666_1627961107.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16002_1617866880.jpg",
+                "link": "https://hhh.com.tw/brand-index.php?brand_id=202",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16002_1617866862.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16002_1617866888.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16051_1623138395.png",
+                "link": "https://hhh.com.tw/designers/cases/33/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16051_1623138372.png",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16051_1623141226.png"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16108_1628669736.jpg",
+                "link": "https://hhh.com.tw/designers/cases/452/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16108_1628669721.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16108_1628669767.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16115_1629356235.png",
+                "link": "https://hhh.com.tw/designers/cases/438/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16115_1629356225.png",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16115_1629356246.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16138_1631259916.jpg",
+                "link": "https://hhh.com.tw/designers/cases/182/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16138_1631259909.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16138_1631259938.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16139_1631597917.jpg",
+                "link": "https://hhh.com.tw/columns/detail/6072/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16139_1631597907.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16139_1631597927.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16147_1632300957.jpg",
+                "link": "https://bigsale.tmall.com/wow/a/act/haiwaifenzu/dailygroup/1345/wupr?disableNav=YES&wh_pid=daily-249643&ali_trackid=2:mm_2663294",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16147_1632300948.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16147_1632300969.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16107_1628644159.jpg",
+                "link": "https://hhh.com.tw/deco/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16107_1628644143.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16107_1628644166.webp"
+            }
+        ]
+    },
+    {
+        "_comment": "主要輪播區",
+        "id": 1,
+        "block": "sec02",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15660_1604643433.jpg",
+                "link": "https://hhh.com.tw/designer-index.php?designer_id=28",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15660_1604643425.jpg",
+                "webp": ""
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16057_1632144721.jpg",
+                "link": "https://hhh.com.tw/columns/detail/3726/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16057_1632144623.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16057_1632144745.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16093_1629944189.jpg",
+                "link": "https://v.hhh.com.tw/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16093_1629944183.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16093_1629944200.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16082_1627804898.jpg",
+                "link": "https://hhh.com.tw/topic/detail/402/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16082_1627804906.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16082_1627804929.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16142_1631782259.jpg",
+                "link": "https://event.hhh.com.tw/2021-Top-Brands/page.php?id=182",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16142_1631782224.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16142_1631782273.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16143_1631782091.jpg",
+                "link": "https://event.hhh.com.tw/topglory/designer_54.html",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16143_1631782085.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16143_1631782161.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16140_1631782123.jpg",
+                "link": "https://event.hhh.com.tw/topglory/designer_382.html",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16140_1631782117.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16140_1631782136.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16141_1631782111.jpg",
+                "link": "https://hhh.com.tw/designers/cases/441/1-page/new-sort/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16141_1631782101.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16141_1631782147.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16144_1631782077.jpg",
+                "link": "https://event.hhh.com.tw/2021-Most-Favorite-Designers/case.php?id=131",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16144_1631782071.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16144_1631782178.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16145_1631782064.jpg",
+                "link": "https://event.hhh.com.tw/2021-Most-Favorite-Designers/case.php?id=688",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16145_1631782040.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16145_1631782190.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16099_1627623476.jpg",
+                "link": "https://hhh.com.tw/deco/",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16099_1627623458.jpg",
+                "webp": "https://images.hhh.com.tw/uploads/_had/adlogo_16099_1627623493.webp"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15781_1601366572.jpg",
+                "link": "https://hhh.com.tw/softouch",
+                "DimgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15781_1601366572.jpg",
+                "webp": ""
+            }
+        ]
+    },
+    {
+        "_comment": "tab區塊-最夯設計, 影音實錄, 專欄文章",
+        "id": 2,
+        "block": "sec03",
+        "data": [
+            {
+                "tab": "最夯設計",
+                "data": [
+                    {
+                        "imgUrl": "https://m.hhh.com.tw/upload/_hcase_img/name_13774_20210922163501.jpg",
+                        "link": "https://www.hhh.com.tw/cases/detail/13774/",
+                        "description": "轉動鑰匙打開家的期待 雙設計師詮釋景觀新豪奢│現代風│46坪"
+                    },
+                    {
+                        "imgUrl": "https://m.hhh.com.tw/upload/_hcase_img/name_13772_20210922155613.jpg",
+                        "link": "https://www.hhh.com.tw/cases/detail/13772/",
+                        "description": "春日。The Spring│混搭風│17坪"
+                    },
+                    {
+                        "imgUrl": "https://m.hhh.com.tw/upload/_hcase_img/name_13771_20210922153206.jpg",
+                        "link": "https://www.hhh.com.tw/cases/detail/13771/",
+                        "description": "森 F Casa|北歐風|14坪"
+                    }
+                ]
+            },
+            {
+                "tab": "影音實錄",
+                "data": [
+                    {
+                        "imgUrl": "https://img.youtube.com/vi/AqGKRujUuL0/hqdefault.jpg",
+                        "link": "https://www.hhh.com.tw/video-post.php?id=4186",
+                        "description": "離塵不離城 獨享一座森林的幸福適意"
+                    },
+                    {
+                        "imgUrl": "https://img.youtube.com/vi/5oH-huLBq1k/hqdefault.jpg",
+                        "link": "https://www.hhh.com.tw/video-post.php?id=4185",
+                        "description": "設計以人為本 裝修從「心」考量"
+                    },
+                    {
+                        "imgUrl": "https://img.youtube.com/vi/bN2cRRkke_c/hqdefault.jpg",
+                        "link": "https://www.hhh.com.tw/video-post.php?id=4184",
+                        "description": "全視屏居家辦公新體驗  沉浸感影音收視再進化"
+                    }
+                ]
+            },
+            {
+                "tab": "專欄文章",
+                "data": [
+                    {
+                        "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index04_477.jpg",
+                        "link": "https://www.hhh.com.tw/column/detail/6088/",
+                        "description": "爸媽必看收納攻略!小孩把家搞得一團亂怎麼辦?"
+                    },
+                    {
+                        "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index04_476.jpg",
+                        "link": "https://www.hhh.com.tw/column/detail/6087/",
+                        "description": "工作時「燃燒殆盡症候群」上身嗎?你的桌椅高度可能出問題了!"
+                    },
+                    {
+                        "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point05_285_01.jpg",
+                        "link": "https://www.hhh.com.tw/column/detail/6086/",
+                        "description": "改善門窗玻璃外觀,你適合什麼款式的「居家建築膜」呢?"
+                    }
+                ]
+            }
+        ]
+    },
+    {
+        "_comment": "主題企劃區",
+        "id": 3,
+        "block": "sec06",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/designer546_81_07.jpg",
+                "link": "https://www.hhh.com.tw/case/13320/detail/"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/designer737_03_01.jpg",
+                "link": "https://www.hhh.com.tw/case/12997/detail/"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/name_12422_20200601145042.jpg",
+                "link": "https://www.hhh.com.tw/case/12422/detail/"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index02_241.jpg",
+                "link": "https://www.hhh.com.tw/column/5926/detail/"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcolumn/clogo_5763_20210528143431.jpg",
+                "link": "https://www.hhh.com.tw/column/5763/detail/"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index01_312.jpg",
+                "link": "https://www.hhh.com.tw/column/5650/detail/"
+            }
+        ]
+    },
+    {
+        "_comment": "編輯精選",
+        "id": 4,
+        "block": "sec07",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index01_356.jpg",
+                "link": "https://www.hhh.com.tw/columns/detail/6072/",
+                "description": "2022得利絕美年度色「晴空藍Bright Skies」!為空間注入清新能量,完美晴空就在身旁"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index05_284.jpg",
+                "link": "https://www.hhh.com.tw/columns/detail/6076/",
+                "description": "揮別單調!超吸睛衛浴配件單品色彩學"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcolumn_orig/point-index05_283.jpg",
+                "link": "https://www.hhh.com.tw/columns/detail/6064/",
+                "description": "懶人居家必備智能神器!下班好累不想動,就交給Google Nest 智慧音箱"
+            }
+        ]
+    },
+    {
+        "_comment": "活動頁banners區",
+        "id": 5,
+        "block": "sec08",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15356_1588832058.jpg",
+                "link": "https://event.hhh.com.tw/2021-Most-Favorite-Designers/?utm_source=INDEX_BANNER&adid=15356"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_15927_1627805018.jpg",
+                "link": "https://hhh.com.tw/topic/detail/402/"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_had/adlogo_16106_1628489482.jpg",
+                "link": "https://c.hhh.com.tw/?utm_source=homepage&utm_medium=banner&utm_campaign=0809"
+            }
+        ]
+    },
+    {
+        "_comment": "來選好物區",
+        "id": 6,
+        "block": "sec09",
+        "data": [
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2384_20210803162337.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2384/",
+                "description": "Sunline 特殊型塑鋁百葉窗"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2383_20210816182839.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2383/",
+                "description": "Sunline 折疊門"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2382_20210803161842.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2382/",
+                "description": "Sunline 推拉門"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2381_20210527160349.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2381/",
+                "description": "MIT鐵桌腳"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2380_20210527160130.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2380/",
+                "description": "實木長凳"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hproduct_img/name_2379_20210527155756.png",
+                "link": "https://www.hhh.com.tw/product-post.php?id=2379/",
+                "description": "實木小家具"
+            }
+        ]
+    },
+    {
+        "_comment": "本週推薦",
+        "id": 7,
+        "block": "sec10",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/name_12458_20200616152204.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/12458/",
+                "description": "簡約沐光宅 暖色調營造家的恬靜溫度",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/name_11965_20191231153835.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/11965/",
+                "description": "連結城市風華 坐擁浪漫夜景(上)",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/designer519_26_02.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13088/",
+                "description": "整合鄉村元素 營造日常的暖馨溫度|30坪|3+1 房、2廳、2衛",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13319_20210528165925.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13319/",
+                "description": "現代日式混搭佐日光 構畫敞朗質感好生活",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13728_20210913165321.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13728/",
+                "description": "微光島嶼。Dusky Island│現代風│50坪",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13737_20210914183731.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13737/",
+                "description": "譜出音符律動的宅邸 回家就像歌劇院|現代風|26坪",
+                "video": "false"
+            }
+        ]
+    },
+    {
+        "_comment": "粉絲推薦",
+        "id": 8,
+        "block": "sec11",
+        "data": [
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/name_12458_20200616152204.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/12458/",
+                "description": "簡約沐光宅 暖色調營造家的恬靜溫度",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/name_11965_20191231153835.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/11965/",
+                "description": "連結城市風華 坐擁浪漫夜景(上)",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://images.hhh.com.tw/uploads/_hcase/designer519_26_02.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13088/",
+                "description": "整合鄉村元素 營造日常的暖馨溫度|30坪|3+1 房、2廳、2衛",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13319_20210528165925.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13319/",
+                "description": "現代日式混搭佐日光 構畫敞朗質感好生活",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13728_20210913165321.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13728/",
+                "description": "微光島嶼。Dusky Island│現代風│50坪",
+                "video": "false"
+            },
+            {
+                "imgUrl": "https://cloud.hhh.com.tw/upload/_hcase_img/name_13737_20210914183731.jpg",
+                "link": "https://www.hhh.com.tw/cases/detail/13737/",
+                "description": "譜出音符律動的宅邸 回家就像歌劇院|現代風|26坪",
+                "video": "false"
+            }
+        ]
+    },
+    {
+        "_comment": "video最新影音區",
+        "id": 9,
+        "block": "video",
+        "title": "離塵不離城 獨享一座森林的幸福適意",
+        "yt": "AqGKRujUuL0"
+    }
+]