请使用mock模拟一个对象,对象的属性是data,对象的值是数组,数组长度是7-10随机长度,数组里面是对象,对象的text属性是用mock模拟的语句,例如“实力强的就连出场都这么帅”,对象的img属性是使用picsum模拟的60×30的随机图片,每个对象有唯一标识id
时间: 2024-03-04 22:51:28 浏览: 145
以下是一个符合要求的mock对象:
```
{
"data": [
{
"id": "1",
"text": "实力强的就连出场都这么帅",
"img": "https://picsum.photos/60/30?random=1"
},
{
"id": "2",
"text": "我最喜欢的颜色是紫色",
"img": "https://picsum.photos/60/30?random=2"
},
{
"id": "3",
"text": "今天的天气真是宜人啊",
"img": "https://picsum.photos/60/30?random=3"
},
{
"id": "4",
"text": "我爱吃水果沙拉",
"img": "https://picsum.photos/60/30?random=4"
},
{
"id": "5",
"text": "我最喜欢的电影是《肖申克的救赎》",
"img": "https://picsum.photos/60/30?random=5"
},
{
"id": "6",
"text": "晚上去看漫画展",
"img": "https://picsum.photos/60/30?random=6"
},
{
"id": "7",
"text": "我喜欢旅行,想去欧洲旅行一次",
"img": "https://picsum.photos/60/30?random=7"
},
{
"id": "8",
"text": "我正在学习人工智能",
"img": "https://picsum.photos/60/30?random=8"
},
{
"id": "9",
"text": "我喜欢读书,最近在读《三体》",
"img": "https://picsum.photos/60/30?random=9"
}
]
}
```
阅读全文