Commit 2661d45f authored by Yuan Zhixiang's avatar Yuan Zhixiang
Browse files

修复了error: stray ‘\\302’‘\\240’ in program

parent 16876e0c
...@@ -13,9 +13,11 @@ const code_input = ref('') // 用户输入的代码 ...@@ -13,9 +13,11 @@ const code_input = ref('') // 用户输入的代码
const stdin_input = ref('') // 用户输入的测试用例 const stdin_input = ref('') // 用户输入的测试用例
function send_request() { // 将输入的代码/测试用例发送给后端 function send_request() { // 将输入的代码/测试用例发送给后端
data.value = {} data.value = {}
let code = code_input.value
code = code.replace(/ /g,' ')
if (stdin_input.value.length == 0) { if (stdin_input.value.length == 0) {
axios.post(base_url + '/visualize', { axios.post(base_url + '/visualize', {
code: code_input.value code: code
}, { }, {
headers: { headers: {
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
...@@ -30,7 +32,7 @@ function send_request() { // 将输入的代码/测试用例发送给后端 ...@@ -30,7 +32,7 @@ function send_request() { // 将输入的代码/测试用例发送给后端
}); });
} else { } else {
axios.post(base_url + '/visualize', { axios.post(base_url + '/visualize', {
code: code_input.value, code: code,
stdin: stdin_input.value stdin: stdin_input.value
}, { }, {
headers: { headers: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment