This commit is contained in:
liuyalei 2024-02-20 17:30:42 +08:00
parent cded1c7f50
commit 2140d2b26f
2 changed files with 3 additions and 4 deletions

View File

@ -11,8 +11,6 @@
<!-- <script src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js" crossorigin></script> --> <!-- <script src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js" crossorigin></script> -->
<script> <script>
// var vConsole = new VConsole(); // var vConsole = new VConsole();
1
</script> </script>
<body> <body>

View File

@ -302,7 +302,8 @@ const sendMessage = () => {
messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' }); messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' });
http.post('/test/main_serve/', { "text": messageValue }).then((res) => { http.post('/test/main_serve/', { "text": messageValue }).then((res) => {
console.log("res", res); console.log("res", res);
var msg = JSON.parse(res.name) // var msg = JSON.parse(res.name)
var msg = res.name
messages.push({ id: Date.now() + 1, text: msg, isMe: false, type: 'txt' }); messages.push({ id: Date.now() + 1, text: msg, isMe: false, type: 'txt' });
scollToButtom() scollToButtom()
}).catch(error => { }).catch(error => {