DEBUG url

This commit is contained in:
2023-03-03 10:19:41 +08:00
parent 41d96da246
commit 363130ddd0
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ export default defineNuxtConfig({
target: 'http://106.15.192.42:3000/api/drawing'
},
'/api/text': {
target: 'http://139.224.128.24:7861//api/text_to_text'
target: 'http://139.224.128.24:7861/api/text_to_text'
},
},
}

View File

@@ -25,7 +25,7 @@ export default defineEventHandler(async event => {
const translate = async (text: string, callback:Function) => {
if (/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(text)) {
text = encodeURIComponent(text)
const {data} = await axios.get(`http://139.224.128.24:7861//api/text_to_text?zh=${text}`)
const {data} = await axios.get(`http://139.224.128.24:7861/api/text_to_text?zh=${text}`)
text = data.en
}
if (callback) callback(text)