dl_site_nuxt/middleware/footer.js

17 lines
564 B
JavaScript
Raw Normal View History

export default async function ({
$axios,
store
}) {
const footerInfo = await $axios.$get('/web/footerInfo')
store.commit('SET_FOOTER_INFO', footerInfo)
2025-07-29 21:29:20 +08:00
const pordCategory = await $axios.$get('/web/prodCategory?catgId=660179025d0e2e0e4263db0eec86a8cc')
store.commit('SET_FOOTER_PRODCAT', pordCategory)
if (process.client) {
let link = document.querySelector("link[rel~='icon']") || document.createElement('link')
link.rel = 'icon'
link.href = footerInfo.icon
if (!link.parentElement) {
document.head.appendChild(link)
}
}
}