add 例子

This commit is contained in:
many2many 2024-10-11 11:58:39 +08:00
parent 309cd1125c
commit 60eb49e351
4 changed files with 498 additions and 0 deletions

View File

@ -0,0 +1,307 @@
{
"posts": [
{
"id": 1,
"userId": 3,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Enim mollit et nulla non tempor mollit tempor deserunt aliquip ut commodo culpa non.",
"body": "Exercitation enim ullamco voluptate sunt sit cupidatat non excepteur irure non reprehenderit labore. Ipsum Lorem duis labore ut dolore ex culpa enim ea velit ex aliqua quis. Culpa eu labore elit amet labore. Aliquip pariatur culpa culpa qui commodo consequat incididunt. Irure laboris labore duis ea anim dolore proident. Non fugiat elit nostrud ea dolor ea duis ex et consequat.\r\nLaborum commodo amet proident exercitation enim amet minim tempor incididunt exercitation consequat ut esse. Non ut eu duis culpa aliqua. Laboris id nostrud consectetur ad incididunt occaecat adipisicing quis reprehenderit ex commodo. Minim enim amet id veniam adipisicing commodo commodo minim ex. Ea eiusmod excepteur duis et et sit ea. Non veniam aliquip proident ut. Minim laborum do ut sint.\r\n",
"comments": 3,
"createDate": "2024/10/09 02:17:32"
},
{
"id": 2,
"userId": 4,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Et laborum adipisicing adipisicing mollit.",
"body": "Deserunt adipisicing esse ipsum nisi ipsum labore laborum minim est esse ad. Laboris est ipsum ipsum sint aliquip. Commodo dolore aliqua minim nisi cillum ullamco velit adipisicing occaecat ullamco esse proident. Id deserunt amet minim nostrud ullamco laborum mollit esse occaecat aliqua fugiat adipisicing sunt. Ex aute veniam ea aliquip ad do aliquip. Do aliquip cillum pariatur velit veniam tempor cupidatat occaecat ex dolor.\r\nConsectetur amet nulla consequat consequat duis laboris Lorem. Incididunt pariatur do sunt ad velit id aliqua eu elit ipsum dolore dolore voluptate exercitation. Ex veniam ea aute ut officia voluptate velit sint aliqua.\r\nCommodo dolor et magna pariatur anim non amet aliquip. Excepteur do officia sint excepteur. Quis aute sit ipsum mollit ullamco minim ullamco consectetur consequat id. Est minim nostrud veniam laborum irure tempor. Enim elit aliqua id Lorem qui officia Lorem aliqua fugiat non id. Consectetur nisi dolore sint magna non cillum elit tempor ut enim.\r\n",
"comments": 9,
"createDate": "2024/08/04 02:57:23"
},
{
"id": 3,
"userId": 2,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Irure pariatur sit nostrud magna voluptate irure reprehenderit dolor dolore consectetur in.",
"body": "Exercitation proident anim in dolore consectetur aliquip velit laboris. Exercitation et aliqua sunt esse nulla cillum. Non dolor elit in id dolore. In et consectetur nostrud nulla Lorem culpa commodo nisi dolor tempor nulla officia. Dolor aute adipisicing eu duis excepteur magna nostrud est et aute labore exercitation irure aliqua. Ut sint eiusmod aliquip laboris exercitation magna consequat Lorem sit proident ullamco Lorem.\r\nOfficia mollit ullamco cupidatat proident nulla eu irure. Et nostrud aute pariatur incididunt aute eiusmod qui do adipisicing ipsum amet do. Pariatur tempor excepteur consequat nostrud quis ea dolore aliquip magna ex.\r\n",
"comments": 9,
"createDate": "2024/08/14 04:15:04"
},
{
"id": 4,
"userId": 10,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "In voluptate magna quis nulla do sit commodo aliquip amet dolore pariatur esse pariatur.",
"body": "Qui nulla sit ex pariatur qui sint cupidatat officia dolor dolor dolor ex. Commodo velit ipsum nisi dolor nisi duis nulla fugiat. Quis sint eu quis ad incididunt enim id excepteur. Mollit et labore aliqua nulla pariatur elit duis laboris.\r\nVelit irure minim nisi in elit id sunt. Amet esse excepteur ad ex anim elit Lorem adipisicing. Consectetur consequat et aliqua cupidatat aute officia irure ea pariatur nisi do.\r\nEa ipsum anim cillum nostrud fugiat. Do ut exercitation consectetur excepteur. Sint pariatur minim aute anim voluptate elit eu magna ea cillum excepteur. Id ex adipisicing officia consectetur.\r\nQuis sunt non nostrud laboris cillum in. Nostrud fugiat voluptate nulla aliquip nulla eu irure culpa labore Lorem. Deserunt minim ut ut sit anim sit sint do ad anim labore qui qui.\r\n",
"comments": 1,
"createDate": "2024/09/14 08:04:44"
},
{
"id": 5,
"userId": 6,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Non veniam fugiat aute incididunt ut tempor.",
"body": "Do pariatur non proident adipisicing elit duis tempor. Amet non consequat amet ipsum consectetur voluptate anim cillum occaecat id dolore irure deserunt exercitation. Magna elit officia ad duis in officia nostrud id Lorem in ad nisi. Pariatur ea magna tempor deserunt occaecat commodo sint incididunt in quis. Est exercitation occaecat proident mollit sint laboris dolor proident dolor do id cupidatat deserunt. Esse non id ipsum non sunt aute elit consectetur duis incididunt proident deserunt labore. Et in consequat consectetur consectetur qui in duis do officia commodo aliqua do.\r\nLabore adipisicing consectetur esse officia enim laborum. Ut qui exercitation tempor nulla do dolor culpa minim Lorem aliquip proident. Esse in nulla do laboris sit. Sint dolor laborum enim cillum in aute cillum enim sunt voluptate qui commodo. Exercitation nulla qui ea amet tempor.\r\n",
"comments": 5,
"createDate": "2024/04/28 11:23:53"
},
{
"id": 6,
"userId": 6,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Officia excepteur elit sit laboris cupidatat voluptate.",
"body": "Consectetur nostrud sunt ex fugiat ex cupidatat anim. Pariatur pariatur sunt aute tempor adipisicing cillum elit. Aliqua cupidatat adipisicing sint veniam esse ea et.\r\nOfficia commodo laboris irure elit nulla veniam fugiat do qui et. Nulla aute ad excepteur culpa dolore cillum. Aliquip adipisicing consectetur qui cupidatat Lorem do. Anim sunt fugiat elit aute ullamco est quis veniam. Cillum Lorem adipisicing irure sint officia fugiat id aliquip aute ipsum commodo labore sunt culpa. Enim minim do occaecat et aute id proident magna culpa nulla culpa exercitation. Ea quis dolore veniam ad nulla incididunt culpa veniam cillum nisi ullamco est proident dolore.\r\nPariatur cupidatat officia ut cupidatat minim amet dolore deserunt quis aliquip. Ex consectetur ut deserunt nostrud dolore amet laborum minim fugiat nulla ad. Quis ut proident voluptate elit Lorem veniam cupidatat esse excepteur sit. Fugiat enim elit cillum aute exercitation consequat minim pariatur proident incididunt ad ut est. Dolore nulla cupidatat nulla eiusmod sit culpa quis officia adipisicing ea amet in pariatur fugiat. Esse eiusmod labore fugiat deserunt est reprehenderit nulla consequat nulla. Consequat ipsum id anim nisi pariatur non et exercitation aliquip.\r\nFugiat officia et nostrud nulla in officia mollit ex eiusmod minim officia id ut in. Laboris anim proident ullamco exercitation amet minim quis velit. Pariatur nisi nisi ipsum enim proident exercitation consequat duis ipsum cupidatat elit labore adipisicing. Labore veniam ea elit anim. Sunt elit sint cillum proident anim consectetur Lorem excepteur ipsum elit qui aute sunt aliquip. Ipsum do qui enim id.\r\n",
"comments": 4,
"createDate": "2024/02/12 12:32:56"
},
{
"id": 7,
"userId": 2,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Exercitation cillum aliqua laboris consequat.",
"body": "Mollit excepteur eu laboris ea nostrud ea. Nulla consequat occaecat magna proident occaecat deserunt. Amet sit ad cillum sit nisi sit officia aliquip nostrud ipsum ullamco ea irure. Officia sunt sunt consequat enim deserunt velit.\r\n",
"comments": 7,
"createDate": "2024/10/05 09:38:25"
},
{
"id": 8,
"userId": 8,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Ea consectetur exercitation incididunt eiusmod reprehenderit elit aute.",
"body": "Enim duis est in nisi nulla amet voluptate veniam ut fugiat consectetur ullamco. Culpa laborum fugiat do consectetur commodo proident. Esse et fugiat aliqua incididunt veniam ea esse labore elit consequat aute exercitation. Adipisicing velit dolore nulla excepteur quis incididunt excepteur culpa nisi. Ullamco ullamco labore cillum ipsum anim amet culpa consequat officia commodo nulla mollit. Labore ullamco proident laborum amet mollit commodo nulla officia.\r\nLorem cupidatat labore ad ipsum deserunt cillum eiusmod consectetur mollit ullamco dolor occaecat aliquip. Consectetur do nisi consectetur et voluptate reprehenderit est. Dolore proident exercitation minim est. Amet occaecat eu fugiat nostrud et commodo. Quis pariatur dolor tempor labore. Ex eiusmod ad tempor aliqua in veniam non exercitation.\r\nCulpa pariatur nulla non cupidatat enim eu voluptate enim incididunt officia amet laborum. Eiusmod aliquip pariatur excepteur dolor tempor exercitation cupidatat occaecat est. Dolor aliqua ex deserunt Lorem incididunt officia ad magna aliquip sunt exercitation ea. Irure do quis nisi excepteur laboris laboris nisi ad veniam enim ea ex qui ea. Aliqua irure ut qui commodo sunt deserunt in sit. Tempor sunt non ullamco non irure.\r\n",
"comments": 8,
"createDate": "2024/09/16 01:46:03"
},
{
"id": 9,
"userId": 6,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Eu consectetur aliqua ad quis tempor fugiat officia nisi.",
"body": "Aliqua ex deserunt laboris occaecat consequat. Aute eiusmod ullamco consectetur duis laboris labore occaecat. Laborum reprehenderit id sit enim. Deserunt non officia reprehenderit ut. Amet dolor eiusmod ad esse Lorem id quis aliquip. Quis aute minim exercitation excepteur sint velit amet ullamco. Pariatur magna ad sit exercitation esse deserunt minim qui.\r\nEnim fugiat elit sint laborum dolor sint. Et excepteur pariatur dolor nostrud veniam in adipisicing quis cillum. Cupidatat nostrud sunt ullamco irure consectetur dolor anim cupidatat. Nulla aliquip voluptate ea voluptate ad minim ea anim excepteur veniam nisi. Mollit ex id esse irure aliquip cillum sunt. Aliqua veniam anim qui duis incididunt magna officia incididunt reprehenderit quis duis eiusmod esse eiusmod.\r\nAliqua officia reprehenderit anim enim cupidatat in nostrud commodo. Labore sunt labore tempor et. Aute id incididunt ex incididunt amet id proident.\r\n",
"comments": 4,
"createDate": "2024/06/08 11:01:22"
},
{
"id": 10,
"userId": 9,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Culpa culpa eiusmod cillum qui irure cillum irure voluptate dolor.",
"body": "Pariatur ullamco id aute ea. Non elit eiusmod enim quis eu labore ea qui sint fugiat laborum. Reprehenderit voluptate adipisicing enim commodo est do pariatur aliqua excepteur ipsum deserunt. Incididunt officia est cupidatat eiusmod excepteur voluptate consectetur minim eu reprehenderit qui culpa magna. Ullamco enim nulla pariatur reprehenderit mollit incididunt labore cillum ipsum nulla nisi.\r\nAdipisicing reprehenderit duis nisi dolor consequat tempor esse cupidatat dolor duis ad tempor cupidatat. Occaecat pariatur id labore consectetur reprehenderit sit reprehenderit enim pariatur. Voluptate reprehenderit sint enim aute Lorem et non consectetur.\r\n",
"comments": 1,
"createDate": "2024/02/07 04:05:26"
},
{
"id": 11,
"userId": 4,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Culpa enim sit commodo aliquip fugiat nostrud et consectetur labore laborum officia labore aute proident.",
"body": "Tempor irure voluptate adipisicing esse culpa nisi pariatur officia ipsum ad in adipisicing minim adipisicing. Deserunt dolor aliqua et amet nostrud. Ea consequat cupidatat sint tempor consectetur ea labore officia ex mollit quis. Voluptate ipsum eiusmod commodo pariatur velit magna ad deserunt exercitation non minim ea commodo. Officia culpa ipsum tempor cupidatat. Aliquip sunt ea quis amet officia commodo. Aute minim ad excepteur eiusmod do id ut laboris.\r\n",
"comments": 3,
"createDate": "2024/08/06 01:33:09"
},
{
"id": 12,
"userId": 5,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Duis labore reprehenderit elit culpa fugiat.",
"body": "Voluptate aute esse ea pariatur ullamco quis fugiat reprehenderit eu. Ullamco ut cupidatat nostrud laboris quis labore culpa cupidatat pariatur. Magna non culpa ullamco reprehenderit in deserunt pariatur aliqua proident. Nostrud labore est ea aliqua ex veniam culpa ut dolore cupidatat duis consectetur aute consequat. Ea consectetur quis duis sunt esse aliquip culpa elit amet tempor quis reprehenderit. Nostrud aliquip et minim nostrud dolor culpa qui cupidatat. Cillum non mollit mollit commodo eiusmod fugiat voluptate enim aliquip veniam sint mollit sint.\r\nOfficia amet deserunt do in fugiat Lorem. Ad sit veniam officia amet. Et incididunt aute et nisi cupidatat magna irure sint enim proident voluptate nostrud cillum ea. Dolore qui consequat aute dolore sit laborum. Do sunt duis qui dolor.\r\n",
"comments": 4,
"createDate": "2024/02/10 06:40:34"
},
{
"id": 13,
"userId": 6,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Quis consectetur quis minim est officia ad ea consequat amet tempor qui in ullamco.",
"body": "Occaecat ex cillum ullamco labore est. Et aliqua aliqua duis incididunt aliquip commodo. Ipsum irure mollit mollit consectetur incididunt irure voluptate laboris Lorem elit sit duis. Elit officia nisi tempor anim et est. Sit adipisicing anim non ex adipisicing dolore. Velit commodo ut nostrud proident mollit eu nisi qui incididunt eu. Labore est incididunt labore Lorem quis.\r\nDolore minim est irure laborum. Nulla fugiat ipsum minim esse veniam duis id in labore Lorem. Occaecat excepteur amet minim in dolore culpa magna excepteur. Eiusmod quis est ad esse velit consectetur. Nisi sunt id aute excepteur commodo. Sit sint esse sint sint veniam. Aute non nulla cupidatat laborum mollit irure esse.\r\nMollit reprehenderit aliqua laboris est laborum eiusmod proident. Laborum irure dolore tempor in esse minim adipisicing consectetur deserunt voluptate sit. Tempor sint incididunt nisi aliqua anim esse duis aliqua deserunt nulla officia nulla.\r\n",
"comments": 8,
"createDate": "2024/03/01 03:26:26"
},
{
"id": 14,
"userId": 5,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Consectetur et nulla labore voluptate do ipsum occaecat.",
"body": "Magna non pariatur voluptate nisi ipsum Lorem laboris cillum. Mollit est laboris officia voluptate fugiat amet deserunt Lorem nisi ex sunt do anim occaecat. Non in tempor do laboris exercitation. Est do nisi ad quis velit deserunt ut cupidatat elit incididunt ad do id adipisicing.\r\nIpsum commodo culpa id proident irure. Aliquip minim non esse laboris ipsum Lorem excepteur voluptate. Esse culpa amet do dolor velit ex.\r\n",
"comments": 8,
"createDate": "2024/07/12 09:43:22"
},
{
"id": 15,
"userId": 5,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Officia mollit irure quis fugiat et qui.",
"body": "Nisi nisi esse laboris do incididunt sit in laboris deserunt duis ex. Lorem elit minim nulla nostrud commodo elit labore ut minim. Mollit aliquip non fugiat dolor in nulla irure. Aliquip nulla dolore cillum fugiat velit officia sit. Nulla non et dolor deserunt do in aliquip eu.\r\n",
"comments": 2,
"createDate": "2024/09/11 02:10:00"
},
{
"id": 16,
"userId": 9,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Ullamco esse commodo ex fugiat laboris eiusmod elit eiusmod velit est pariatur ipsum.",
"body": "Laborum officia sunt deserunt consequat officia. Cillum esse commodo mollit ex dolore mollit veniam nostrud esse laborum mollit ex. Minim aliqua voluptate pariatur do culpa sit ut nisi consectetur. Et sint labore duis non sunt voluptate aute deserunt ut amet magna. Sit tempor deserunt pariatur enim consectetur proident. Exercitation velit eiusmod aute dolore veniam laborum et veniam ex nostrud ex fugiat ipsum. Nisi in minim sunt fugiat labore occaecat enim sit velit magna consequat laborum.\r\nOfficia consectetur duis laboris esse incididunt nulla fugiat exercitation non. Nulla Lorem officia nostrud sit labore labore officia incididunt deserunt deserunt dolor veniam nisi. Mollit proident et excepteur minim ea consectetur reprehenderit laboris non ex. Magna laborum irure do laboris elit sint.\r\nQuis reprehenderit mollit cupidatat dolore eu pariatur velit laborum Lorem officia. Magna irure velit in qui eiusmod aliqua officia enim elit. Aliqua culpa est nulla aliquip ipsum reprehenderit nostrud labore mollit in velit veniam aliquip. Occaecat Lorem dolor enim occaecat esse ut cillum amet.\r\nConsequat consectetur laborum sunt est anim occaecat commodo voluptate mollit non tempor cillum pariatur. Excepteur nostrud aute culpa voluptate consequat fugiat magna amet elit. Elit do exercitation in pariatur Lorem quis cillum aute id. Consequat veniam ipsum veniam do reprehenderit elit nulla Lorem consectetur ex voluptate dolore. Non laborum velit qui do cillum eiusmod eu laborum pariatur occaecat tempor aute qui. Laborum aliqua cupidatat amet mollit elit consequat tempor excepteur cillum labore irure sunt. Lorem cupidatat nostrud est est excepteur id cillum exercitation.\r\n",
"comments": 6,
"createDate": "2024/09/07 08:11:43"
},
{
"id": 17,
"userId": 3,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Quis amet ut deserunt culpa est enim.",
"body": "Aliqua irure amet proident laboris et sunt ex esse culpa elit fugiat. Eu cillum sint nulla id aliqua nostrud officia officia esse sunt exercitation dolor reprehenderit. Ut est elit deserunt pariatur. Aliqua commodo aute quis dolore cillum sint sit id cupidatat ex reprehenderit. Reprehenderit qui in eiusmod laborum nostrud dolore consequat. Reprehenderit in ut non excepteur ad.\r\nLaboris aliqua pariatur mollit ex dolor duis qui id ad Lorem. Labore enim velit id eu. Eu ea ex est elit eu aliqua mollit non cupidatat commodo.\r\nCulpa laborum dolor ea aliquip incididunt proident excepteur enim. Ullamco sunt ad labore exercitation laborum. Deserunt proident dolor est officia enim nulla reprehenderit anim irure. Esse sunt ex nisi ea nisi amet do dolor. Adipisicing sit id officia id cillum ullamco magna eiusmod adipisicing velit consequat labore eu. Adipisicing anim sit incididunt voluptate quis irure reprehenderit eu enim ipsum ad ea ad. Do voluptate tempor duis enim aute.\r\nUt nisi dolor veniam duis cillum cillum anim. Voluptate quis duis aliqua exercitation officia pariatur adipisicing deserunt velit. Ullamco dolore consequat consectetur excepteur est et in.\r\n",
"comments": 8,
"createDate": "2024/07/18 02:52:41"
},
{
"id": 18,
"userId": 8,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Aute consectetur duis consectetur commodo magna commodo culpa ullamco sit qui aliqua anim voluptate do.",
"body": "Cillum sunt velit est magna dolore culpa quis est anim consectetur. Nulla consectetur eu anim deserunt eu. In nisi reprehenderit elit labore proident cillum duis consectetur. Non aute labore dolore in culpa labore irure laborum irure.\r\nReprehenderit aliquip id aliquip in officia dolore sit occaecat eu incididunt ipsum duis. Laboris quis duis deserunt est anim nostrud excepteur proident non. Eu eu nostrud aute ex commodo est labore.\r\nSint sit minim consectetur nostrud. Enim ullamco duis tempor nisi laboris sint elit eu minim amet aliqua ex Lorem deserunt. Adipisicing anim velit sit ea in aliqua reprehenderit esse commodo exercitation irure adipisicing cupidatat.\r\n",
"comments": 10,
"createDate": "2024/01/25 01:50:19"
},
{
"id": 19,
"userId": 5,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Velit irure nostrud ipsum amet do officia velit pariatur aute mollit quis consectetur.",
"body": "Voluptate proident deserunt pariatur sint eiusmod anim aute. Dolore pariatur pariatur ex sint Lorem exercitation occaecat amet qui ex. Veniam fugiat ad magna dolor officia.\r\nConsectetur adipisicing ea labore in esse. Laboris ad non minim amet ea exercitation Lorem. Eiusmod est quis do occaecat amet ullamco exercitation pariatur amet.\r\nAute culpa laboris aliqua do culpa nulla eiusmod minim. Eiusmod nulla deserunt consectetur non laborum sit consectetur culpa ex officia ipsum labore veniam. Mollit aute velit adipisicing fugiat. Laborum eiusmod anim irure sit consectetur ullamco id ullamco quis tempor fugiat velit ex. Non est laboris nisi ipsum aliquip labore irure ipsum ut aliqua ad. Ea culpa culpa ad dolore ad Lorem mollit ullamco dolore exercitation veniam consequat Lorem. Magna ex est minim occaecat minim laboris pariatur tempor reprehenderit sint.\r\n",
"comments": 10,
"createDate": "2024/06/14 11:56:34"
},
{
"id": 20,
"userId": 7,
"coverImage": "https://loremflickr.com/640/320",
"thumbnail": "https://loremflickr.com/240/320",
"title": "Ex sunt nulla laboris esse exercitation incididunt minim esse quis nostrud cupidatat duis.",
"body": "Non ea qui proident magna sint ea nulla sunt elit deserunt non proident est. Nisi est adipisicing anim laboris sit exercitation et tempor aliqua. Dolore incididunt cupidatat enim fugiat officia non anim ullamco minim. Aliquip enim ea velit cupidatat labore laborum esse. Enim esse eiusmod duis reprehenderit nostrud reprehenderit amet ullamco laboris nulla voluptate labore duis.\r\nDolor labore eu amet deserunt sint commodo. Occaecat aute elit magna et pariatur nulla fugiat culpa elit exercitation reprehenderit labore. Do id est sit esse incididunt reprehenderit culpa id ad aliquip sit incididunt consectetur. Ut mollit dolor laboris Lorem magna. Ad ex sunt voluptate deserunt ut duis voluptate non.\r\n",
"comments": 3,
"createDate": "2024/04/29 07:43:10"
}
],
"users": [
{
"id": 1,
"avatar": "https://loremflickr.com/120/120",
"nickName": "ullamco",
"name": "Albert Mcdonald",
"email": "albertmcdonald@zolavo.com",
"phone": "+86 (990) 420-3388",
"about": "Hi, wellcome to my home. I am from Cocos (Keeling Islands) ",
"createDate": "2024-04-18 02:57:52"
},
{
"id": 2,
"avatar": "https://loremflickr.com/120/120",
"nickName": "anim",
"name": "Parks Burch",
"email": "parksburch@zolavo.com",
"phone": "+86 (859) 552-3410",
"about": "Hi, wellcome to my home. I am from Wallis and Futuna Islands ",
"createDate": "2024-03-14 06:15:28"
},
{
"id": 3,
"avatar": "https://loremflickr.com/120/120",
"nickName": "irure",
"name": "Gould Cooley",
"email": "gouldcooley@zolavo.com",
"phone": "+86 (860) 414-3147",
"about": "Hi, wellcome to my home. I am from Slovak Republic ",
"createDate": "2024-05-13 06:30:46"
},
{
"id": 4,
"avatar": "https://loremflickr.com/120/120",
"nickName": "pariatur",
"name": "Jewel Olson",
"email": "jewelolson@zolavo.com",
"phone": "+86 (831) 542-2808",
"about": "Hi, wellcome to my home. I am from Indonesia ",
"createDate": "2024-08-22 09:59:30"
},
{
"id": 5,
"avatar": "https://loremflickr.com/120/120",
"nickName": "ad",
"name": "Dixie Wagner",
"email": "dixiewagner@zolavo.com",
"phone": "+86 (911) 485-3993",
"about": "Hi, wellcome to my home. I am from Yemen ",
"createDate": "2024-06-03 06:56:50"
},
{
"id": 6,
"avatar": "https://loremflickr.com/120/120",
"nickName": "mollit",
"name": "Paige Gutierrez",
"email": "paigegutierrez@zolavo.com",
"phone": "+86 (978) 413-2071",
"about": "Hi, wellcome to my home. I am from Cambodia ",
"createDate": "2024-06-25 11:41:13"
},
{
"id": 7,
"avatar": "https://loremflickr.com/120/120",
"nickName": "aliquip",
"name": "Patrick Marks",
"email": "patrickmarks@zolavo.com",
"phone": "+86 (855) 432-2045",
"about": "Hi, wellcome to my home. I am from Iran ",
"createDate": "2024-04-07 09:20:30"
},
{
"id": 8,
"avatar": "https://loremflickr.com/120/120",
"nickName": "quis",
"name": "Vera Melendez",
"email": "veramelendez@zolavo.com",
"phone": "+86 (897) 482-3154",
"about": "Hi, wellcome to my home. I am from Albania ",
"createDate": "2024-07-30 12:31:26"
},
{
"id": 9,
"avatar": "https://loremflickr.com/120/120",
"nickName": "irure",
"name": "Georgina Kemp",
"email": "georginakemp@zolavo.com",
"phone": "+86 (960) 479-2271",
"about": "Hi, wellcome to my home. I am from Guinea-Bissau ",
"createDate": "2024-07-28 07:08:56"
},
{
"id": 10,
"avatar": "https://loremflickr.com/120/120",
"nickName": "aliquip",
"name": "Nell Fulton",
"email": "nellfulton@zolavo.com",
"phone": "+86 (922) 426-3736",
"about": "Hi, wellcome to my home. I am from Uruguay ",
"createDate": "2024-04-16 01:55:34"
}
]
}

View File

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetch API Example</title>
<!-- 引入 Bootstrap -->
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<div class="container mt-8" id="top-post">
<div class="card mt-5 mb-5">
<a href="#!"><img class="card-img-top" src="https://loremflickr.com/640/320" alt="..." /></a>
<div class="card-body">
<div class="small text-muted"><i class="fas fa-clock m-1"></i>2024-10-10 09:09:00</div>
<h2 class="card-title">Featured Post Title</h2>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis aliquid atque, nulla? Quos cum ex quis soluta, a laboriosam. Dicta expedita corporis animi vero voluptate voluptatibus possimus, veniam magni quis!</p>
<div class="row align-items-start">
<div class="col-5">
</div>
<div class="col-3">
<i class="fas fa-comments"></i><a href="#" class="card-link p-1">评论(8)</a>
</div>
<div class="col-3">
<i class="fas fa-user"></i> <a href="#" class="card-link p-1">jone mike</a>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-8" id="posts">
<div class="card mb-5">
<div class="row g-0">
<div class="col-md-3">
<img src="https://loremflickr.com/240/320" class="img-fluid rounded-start" alt="...">
</div>
<div class="col-md-6">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text text-muted">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small>2024-10-10 08:08:10</small> <small class="p-1">小明</small></p>
</div>
</div>
</div>
</div>
<div class="card mb-5">
<div class="row g-0">
<div class="col-md-3">
<img src="https://loremflickr.com/240/320" class="img-fluid rounded-start" alt="...">
</div>
<div class="col-md-6">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text text-muted">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small>2024-10-10 08:08:10</small> <small class="p-1">小明</small></p>
</div>
</div>
</div>
</div>
<div class="card mb-5">
<div class="row g-0">
<div class="col-md-3">
<img src="https://loremflickr.com/240/320" class="img-fluid rounded-start" alt="...">
</div>
<div class="col-md-6">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text text-muted">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small>2024-10-10 08:08:10</small> <small class="p-1">小明</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-8">
<!-- GET 请求按钮 -->
<button id="refresh" class="btn btn-primary mb-3">刷新帖子</button>
<!-- POST 请求表单 -->
<form class="mt-5" action="#">
<h2>发布新帖子</h2>
<div class="mb-3">
<label for="title" class="form-label">标题</label>
<input type="text" class="form-control" id="title" placeholder="输入帖子标题">
</div>
<div class="mb-3">
<label for="body" class="form-label">内容</label>
<textarea class="form-control" id="body" rows="3" placeholder="输入帖子内容"></textarea>
</div>
<div class="mb-3">
<label for="cover" class="form-label">内容</label>
<input type="text" class="form-control" id="cover" placeholder="image"/>
</div>
<div class="mb-3">
<label for="userId" class="form-label">用户ID</label>
<input type="text" class="form-control" id="userId" placeholder="输入用户id">
</div>
<button class="btn btn-primary" id="submit">发布</button>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
# 使用json-generator生成假数据
## website
https://json-generator.com/
## user
```text
[
'{{repeat(10)}}',
{
id: '{{index(1)}}',
avatar: 'https://loremflickr.com/120/120',
nickName: '{{lorem(1, "word")}}',
name: '{{firstName()}} {{surname()}}',
email: '{{email()}}',
phone: '+86 {{phone()}}',
about: 'Hi, wellcome to my home. I am from {{country()}}. ',
createDate: '{{date(new Date(2024, 0, 1), new Date(), "YYYY-MM-dd hh:mm:ss")}}'
}
]
```
## post
```text
[
'{{repeat(20)}}',
{
id: '{{index(1)}}',
userId: '{{integer(1,10)}}',
coverImage: 'https://loremflickr.com/640/320',
thumbnail: 'https://loremflickr.com/240/320',
title: '{{lorem(1)}}',
body: '{{lorem(integer(1,4), "paragraphs")}}',
comments: '{{integer(1,10)}}',
createDate: '{{date(new Date(2024, 0, 1), new Date(), "YYYY-MM-dd hh:mm:ss")}}'
}
]
```

View File

@ -0,0 +1,31 @@
# json-server
## 介绍
[github地址](https://github.com/typicode/json-server)
json-server 是一款小巧的接口模拟工具,一分钟内就能搭建一套 Restful 风格的 API尤其适合前端接口测试使用。
只需指定一个 json 文件作为 api 的数据源即可使用起来非常方便30 秒入门,基本上有手就行。
进阶操作还支持分页,排序等操作,简直强大。
## 安装
- 安装 Node.js
- clone项目
> git clone https://github.com/typicode/json-server.git
- 进入项目目录,安装依赖
> npm install
- 把自己的db.json文件放在fixtures目录下然后运行json-server即可
> npm run dev -- --port 8899
- 访问 http://localhost:8899/users
## 使用
[前端接口神器之 json-server 详细使用指南](https://www.cnblogs.com/Megasu/p/15782353.html)