🔄Update: 删除加密逻辑

This commit is contained in:
2025-10-06 13:50:08 +08:00
parent 34d5bc6038
commit c7365e1338
8 changed files with 60 additions and 45 deletions
+9 -3
View File
@@ -50,7 +50,6 @@
<script setup>
import { ref, computed, onMounted } from 'vue'
import { decrypt } from '../utils/encryption'
// 响应式数据
const userInput = ref('')
@@ -143,7 +142,13 @@ const sendMessage = async () => {
const callAIPlatform = async (platformId, apiKey, endpoint, message) => {
try {
// 发送请求到后端API
const response = await fetch('/api/chat', {
// console.log(JSON.stringify({
// platformId,
// apiKey,
// endpoint,
// message
// }))
const response = await fetch('http://localhost:8080/api/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -154,7 +159,8 @@ const callAIPlatform = async (platformId, apiKey, endpoint, message) => {
endpoint,
message
})
})
}
)
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)