- corretto gruppomacro catalogo, info prodotti, estrazione dati da amazon corretto.

This commit is contained in:
Surya Paolo
2025-09-27 17:24:40 +02:00
parent c8589e794f
commit d6c0bcf879
13 changed files with 330 additions and 252 deletions

View File

@@ -19,8 +19,11 @@ import MixinBase from '../../mixins/mixin-base'
export default defineComponent({
name: 'LandingFooter',
components: { Logo, FormNewsletter, CFacebookFrame },
setup() {
props: {
mykey: { type: String, required: false },
mysubkey: { type: String, required: false }
},
setup(props: { mykey?: string; mysubkey?: string }) {
const $q = useQuasar()
const { t } = useI18n()
const globalStore = useGlobalStore()
@@ -39,7 +42,37 @@ export default defineComponent({
return 'linear-gradient(180deg, ' + mycol + ' 95%, #FFF)'
})
// console.log('LandingFooter - INIT')
// New: Access nested product data via optional props
const productSource = computed(() => {
// Try to read a globally exposed product store value if present
try {
const gp: any = (globalStore as any).myproduct
if (gp && gp.value !== undefined) return gp.value
} catch {
// ignore
}
// Fallback: try to read from site.productInfo if available
try {
const s: any = site.value
if (s && s.productInfo) return s.productInfo
} catch {
// ignore
}
// Final fallback
return {}
})
const nestedProductValue = computed(() => {
const key = props.mykey
if (!key) return undefined
const base = (productSource.value as any)?.[key]
if (props.mysubkey && base && typeof base === 'object') {
return base[props.mysubkey]
}
return base
})
function TelegramSupport() {
return globalStore.getValueSettingsByKey('TELEGRAM_SUPPORT', false)
@@ -90,6 +123,7 @@ export default defineComponent({
site,
getBackColorText,
t,
nestedProductValue,
}
},
})