fetch(createUrl,
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
}
)
.then(response => response.json())
.then(data => {
if (data.code == 200) {
success(data.msg);
this.list.unshift({
"content": this.title,
"status" : 0
})
this.title = ''
} else {
error(data.msg)
}
})