DEBUG url
This commit is contained in:
@@ -22,7 +22,7 @@ export default defineNuxtConfig({
|
|||||||
target: 'http://106.15.192.42:3000/api/drawing'
|
target: 'http://106.15.192.42:3000/api/drawing'
|
||||||
},
|
},
|
||||||
'/api/text': {
|
'/api/text': {
|
||||||
target: 'http://139.224.128.24:7861//api/text_to_text'
|
target: 'http://139.224.128.24:7861/api/text_to_text'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ export default defineEventHandler(async event => {
|
|||||||
const translate = async (text: string, callback:Function) => {
|
const translate = async (text: string, callback:Function) => {
|
||||||
if (/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(text)) {
|
if (/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(text)) {
|
||||||
text = encodeURIComponent(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
|
text = data.en
|
||||||
}
|
}
|
||||||
if (callback) callback(text)
|
if (callback) callback(text)
|
||||||
|
Reference in New Issue
Block a user