Skip to content

Commit

Permalink
fix: 修复global接口
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Feb 3, 2023
1 parent 83562de commit 4de8cc3
Showing 1 changed file with 33 additions and 26 deletions.
59 changes: 33 additions & 26 deletions frontend/server/api/global/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,40 @@ interface IGlobal {
}
export default defineEventHandler(async (): Promise<IGlobal> => {
const reqQuery = `query{
global{
data{
attributes{
gadgets{
title
subtitle
qrcode
url
}
links{
title
icon
url
}
ads{
ad
img
}
footers{
footer
url
describe
icon
}
}
global{
data{
attributes{
gadgets{
title
subtitle
qrcode
url
}
links{
title
icon
url
}
ads{
ad
img
}
footers{
footer
url
describe
icon
}
articleAds{
title
author
summary
cover
url
}
}
}`
}
}
}`
return (await useGraphql(reqQuery)).global
})

0 comments on commit 4de8cc3

Please sign in to comment.