优化: 前后端字段对齐、AI分析JSON解析修复、AutoMigrate
- 修复登录参数 username→account - 修复前后端字段名不匹配 (ticketno/contactname/createtime等) - 修复AI分析GLM返回markdown包裹和priority类型问题 - 添加AutoMigrate自动建表 - 统一API路由为 /api/auth/ 前缀 - 添加config.example.yaml,.gitignore排除config.yaml
This commit is contained in:
@@ -19,7 +19,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
async function login(account: string, password: string) {
|
||||
const res = await loginApi({ account, password })
|
||||
setToken(res.token)
|
||||
setUsername(account)
|
||||
setUsername(res.user.username)
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
|
||||
@@ -61,8 +61,7 @@ const form = reactive({
|
||||
content: '',
|
||||
contactname: '',
|
||||
contactphone: '',
|
||||
source: 'web',
|
||||
submitterid: 1
|
||||
source: 'web'
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -166,8 +166,9 @@ async function fetchDetail() {
|
||||
|
||||
// Try to fetch AI analysis
|
||||
try {
|
||||
const analysisData = await getAnalysis(ticketId) as any
|
||||
if (analysisData && analysisData.category) {
|
||||
const analysisArr = await getAnalysis(ticketId) as any
|
||||
if (analysisArr && analysisArr.length > 0) {
|
||||
const analysisData = analysisArr[0]
|
||||
analysis.value = analysisData
|
||||
analysisForm.category = analysisData.category
|
||||
analysisForm.priority = analysisData.priority
|
||||
|
||||
Reference in New Issue
Block a user