[Vuejs]-SSR error when Writing API in Nuxt with Router Module?

0👍

Maybe it can somehow help you.

export default {
        layout: 'main',
        async asyncData ({store, params}) {
            let projectId = params.id;
            let {data} = await axios.get('https://admin.xxx.com/page/preview/' + projectId)
            return {
                pageContent: data.xxx,
                title: data.xxx.meta_title,
                description: data.xxx.meta_desc,
                keywords: data.xxx.meta_key,

            }
        },
}

Leave a comment