diff --git a/bocai.db b/bocai.db index 9b14ec1..19ba48e 100644 Binary files a/bocai.db and b/bocai.db differ diff --git a/frontend/src/components/index.vue b/frontend/src/components/index.vue index e6e9619..6448940 100644 --- a/frontend/src/components/index.vue +++ b/frontend/src/components/index.vue @@ -279,7 +279,8 @@ async function handleLogin() { // 调用登录API const response = await axios.post(loginApiUrl, { username: loginForm.value.username, - password: loginForm.value.password + password: loginForm.value.password, + loginUrl: loginForm.value.loginUrl }); // 处理登录结果 @@ -291,14 +292,6 @@ async function handleLogin() { // 更新用户名 username.value = loginForm.value.username; - - // 重置表单 - loginForm.value = { - username: '', - password: '', - loginUrl: 'https://4701268539-esh.qdk63ayw8g.com' - }; - console.log('登录成功:', response.data); } else { // 登录失败 @@ -390,6 +383,31 @@ async function handleStop() { } } +// 处理开始按钮点击 +async function handleStart() { + console.log('开始按钮点击'); + + try { + // 调用后端开始API + const response = await axios.post('http://localhost:8080/api/ocr/saveUserInfo', { + onOff: 1 + }); + + // 处理响应结果 + if (response.data && response.code !== 500) { + console.log('开始成功:', response.data); + alert('开始成功'); + } else { + console.error('开始失败:', response.data); + alert('开始失败: ' + (response.data.message || '未知错误')); + } + + } catch (err) { + console.error('开始失败:', err); + alert('开始操作失败,请检查网络连接'); + } +} + onUnmounted(() => { // 销毁图表 chart1.value?.dispose(); @@ -411,6 +429,8 @@ onUnmounted(() => {
+ +
@@ -418,7 +438,7 @@ onUnmounted(() => {