优化Pexels 背景图的搜索结果
This commit is contained in:
parent
fa9bde2d89
commit
48f2f0b208
@ -791,10 +791,15 @@ const fetchPexelsImages = async () => {
|
||||
query: pexelsQuery.value,
|
||||
page: pexelsPage.value,
|
||||
per_page: PEXELS_PER_PAGE,
|
||||
orientation: 'landscape'
|
||||
orientation: 'landscape',
|
||||
locale: 'zh-CN' // Add locale for better Chinese search results
|
||||
},
|
||||
headers: {
|
||||
Authorization: PEXELS_API_KEY
|
||||
},
|
||||
// Ensure proper encoding of parameters
|
||||
paramsSerializer: {
|
||||
encode: (param) => encodeURIComponent(param)
|
||||
}
|
||||
})
|
||||
const newPhotos = response.data.photos || []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user