fix get static paths params
parent
50a8a51a20
commit
e502863a16
|
@ -181,7 +181,7 @@ export default OilCard
|
||||||
|
|
||||||
export const getStaticPaths = async () => {
|
export const getStaticPaths = async () => {
|
||||||
const service = new LocalAPI()
|
const service = new LocalAPI()
|
||||||
const data = await service.getCatalogItems() as {code: string}[]
|
const data = await service.getCatalogItems({}, 1) as {code: string}[]
|
||||||
const codes = data.map(item => ({params: {code: item.code}}))
|
const codes = data.map(item => ({params: {code: item.code}}))
|
||||||
return {
|
return {
|
||||||
paths: [
|
paths: [
|
||||||
|
|
Loading…
Reference in New Issue