$fd = fopen("result.txt", 'a') or die("не удалось создать файл");
$str = file_get_contents('php://input').PHP_EOL;
fwrite($fd, $str);
fclose($fd);.then(()=>{
this.$emit('change-state', 'wordarea');
})
.catch(()=>{
this.$emit('change-state', 'wordarea');
}) .then((response)=>{
console.log(response);
this.$emit('change-state', 'wordarea');
});