diff --git a/assets/js/main.js b/assets/js/main.js index 85a25c7..3420e30 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -65,7 +65,8 @@ if (typeof (memos) !== "undefined") { var limit = memo.limit var memos = memo.host.replace(/\/$/, '') -var memoUrl = memos + "/api/v1/memo?creatorId=" + memo.creatorId + "&rowStatus=NORMAL" +//var memoUrl = memos + "/api/v1/memo?creatorId=" + memo.creatorId + "&rowStatus=NORMAL" +memoUrl = "../assets/memos.json" var page = 1, offset = 0, nextLength = 0, @@ -93,7 +94,8 @@ if (memoDom) { } function getFirstList() { - var memoUrl_first = memoUrl + "&limit=" + limit; + // var memoUrl_first = memoUrl + "&limit=" + limit; + var memoUrl_first = memoUrl fetch(memoUrl_first).then(res => res.json()).then(resdata => { updateHTMl(resdata) var nowLength = resdata.length @@ -109,11 +111,12 @@ function getFirstList() { } // 预加载下一页数据 function getNextList() { - if (tag){ - var memoUrl_next = memoUrl + "&limit=" + limit + "&offset=" + offset + "&tag=" + tag; - } else { - var memoUrl_next = memoUrl + "&limit=" + limit + "&offset=" + offset; - } + // if (tag){ + // var memoUrl_next = memoUrl + "&limit=" + limit + "&offset=" + offset + "&tag=" + tag; + // } else { + // var memoUrl_next = memoUrl + "&limit=" + limit + "&offset=" + offset; + // } + var memoUrl_next = memoUrl fetch(memoUrl_next).then(res => res.json()).then(resdata => { nextDom = resdata nextLength = nextDom.length @@ -167,7 +170,8 @@ function getTagFirstList() { nextLength = 0; nextDom = ''; memoDom.innerHTML = ""; - var memoUrl_tag = memoUrl + "&limit=" + limit + "&tag=" + tag; + // var memoUrl_tag = memoUrl + "&limit=" + limit + "&tag=" + tag; + var memoUrl_tag = memoUrl fetch(memoUrl_tag).then(res => res.json()).then(resdata => { updateHTMl(resdata); var nowLength = resdata.length diff --git a/assets/memos.json b/assets/memos.json new file mode 100644 index 0000000..aa7ee1a --- /dev/null +++ b/assets/memos.json @@ -0,0 +1,212 @@ +[ + { + "id": 5526, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670079000, + "updatedTs": 1670079004, + "displayTs": 1670079000, + "content": "#Hello 👋 Welcome to [https://memos.top/](https://memos.top/)", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5540, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670078984, + "updatedTs": 1670079030, + "displayTs": 1670078984, + "content": "《Miłość od pierwszego wejrzenia》 - 辛波斯卡", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5539, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670078926, + "updatedTs": 1670079035, + "displayTs": 1670078926, + "content": "他们彼此深信,是瞬间迸发的热情让他们相遇。
Oboje są przekonani, że połączyło ich uczucie nagłe.", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5538, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670078918, + "updatedTs": 1670079044, + "displayTs": 1670078918, + "content": "这样的确定是美丽的,但变幻无常更为美丽。
Piękna jest taka pewność, ale niepewność piękniejsza.", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5537, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670078912, + "updatedTs": 1670079050, + "displayTs": 1670078912, + "content": "他们素未谋面,所以他们确定彼此并无任何瓜葛。
Sądzą, że skoro nie znali się wcześniej, nic między nimi nigdy się nie działo.", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5527, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670077260, + "updatedTs": 1670079074, + "displayTs": 1670077260, + "content": "- [ ] To do something.", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5535, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670077242, + "updatedTs": 1678858812, + "displayTs": 1670077242, + "content": "#Picture #Image \nBing daily 必应每日一图。\n![](https://api.eallion.com/bing?region=zh-CN&type=image)", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5534, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670077007, + "updatedTs": 1670077072, + "displayTs": 1670077007, + "content": "HTML\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n \u003cmeta charset=\"UTF-8\"\u003e\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n \u003ctitle\u003eDocument\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n \n\u003c/body\u003e\n\u003c/html\u003e\n```\nCSS\n```css\n.hidden {\n display: none;\n}\n```\nJS\n```js\nconsole.log(hello memos)\n```", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5533, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076814, + "updatedTs": 1670076814, + "displayTs": 1670076814, + "content": "#电影 \n分享豆瓣电影《星际穿越》\nhttps://movie.douban.com/subject/1889243/", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5532, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076761, + "updatedTs": 1670076761, + "displayTs": 1670076761, + "content": "#读书 \n分享豆瓣读书《苏菲的世界》-(挪威)乔斯坦·贾德\nhttps://book.douban.com/subject/1045818/", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5529, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076381, + "updatedTs": 1670076381, + "displayTs": 1670076381, + "content": "#音乐 \n分享来自 QQ 音乐的《平凡之路》- 朴树\nhttps://y.qq.com/n/ryqq/songDetail/000T1Ws32MWrUj", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5528, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076309, + "updatedTs": 1670076309, + "displayTs": 1670076309, + "content": "#音乐 \n分享来自网易云音乐的《光辉岁月》- Beyond\nhttps://music.163.com/#/song?id=346576", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5530, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076240, + "updatedTs": 1670077572, + "displayTs": 1670076240, + "content": "#视频 \n分享来自 Bilibili 的视频 《【华语巅峰】2004年华语乐坛金曲榜TOP120》\nhttps://www.bilibili.com/video/BV1bq4y137DD/", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + }, + { + "id": 5531, + "rowStatus": "NORMAL", + "creatorId": 102, + "createdTs": 1670076120, + "updatedTs": 1670078710, + "displayTs": 1670076120, + "content": "#视频 \n分享来自 Youtube 的父爱视频《What is that?》\nhttps://www.youtube.com/watch?v=mNK6h1dfy2o", + "visibility": "PUBLIC", + "pinned": false, + "creatorName": "demo", + "creatorUsername": "demo", + "resourceList": [], + "relationList": [] + } +] diff --git a/index.html b/index.html index ee4cada..8873b6b 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@

Memos Top

Je memos, donc je suis - René Descartes fans

-
Total 10 Memos 🎉 ( Demo from https://memos.eallion.com/u/102 )
+
Total 10 Memos 🎉 ( Demo from https://eallion.com )