Ver código fonte

fix: 绑定大模型参数传递方式修改

sheldon 1 mês atrás
pai
commit
1bb382ad65

+ 1 - 1
src/api/modules/anycallService.ts

@@ -73,5 +73,5 @@ export function updateAgentLLm(params: {
   agentId: string,
   llmId: string
 }){
-  return request(`/anycall/updateAgentLLm`, params)
+  return request(`/anycall/updateAgentLLm`, {}, {params: {agentId: params.agentId, llmId: params.llmId}})
 }

+ 1 - 1
src/components/AccountForm/LoginForm.vue

@@ -116,7 +116,7 @@ function testAccount(account: string) {
             忘记密码了?
           </FaButton>
         </div>
-        <ElButton type="primary" size="large" :loading="loading" class="w-full">
+        <ElButton type="primary" size="large" native-type="submit" :loading="loading" class="w-full">
           登录
         </ElButton>
         <!-- <div class="mt-4 flex-center gap-2 text-sm">

+ 2 - 1
src/store/modules/user.ts

@@ -11,7 +11,7 @@ export const useUserStore = defineStore(
     const tabbarStore = useTabbarStore()
 
     const account = ref(localStorage.account ?? '')
-    const token = ref(localStorage.token ?? '')
+    const token = ref(localStorage.accessToken ?? '')
     const avatar = ref(localStorage.avatar ?? '')
     const permissions = ref<string[]>([])
     const isLogin = computed(() => {
@@ -26,6 +26,7 @@ export const useUserStore = defineStore(
       account: string
       password: string
     }) {
+      console.log('login', params)
       const {code, data} = await apiUser.login(params)
       if(code === 0 ){
         localStorage.setItem('accessToken', data)