MockJs.mock (/ PROJECT/, {
)"data|0-100":[
{
"id":"@guid()",
"projectname":"@ctitle(3, 5)",
"describe|0-1":"@cparagraph(1)",
"user|1":"@cname",
"startdate":"@date()",
"enddate":"@date()",
"fileList": [
{
"name": "@ctitle(3, 10).word",
"url": "@url"
}
]
}
]
})
I think that after the project starts, the simulated data of mockjs will not change, because each time the localhost:9090/PROJECT is added, deleted, changed or queried, this operation will trigger to refresh the data, resulting in different simulated data each time.
add:
this.axios({
method:"post",
url:url,
data:data
}).then().catch()
modify:
this.axios({
method:"put",
url:url+id,
data:data
})
.