<template>
    <div class="app-container">
        <supplier-detail ref="supplierDetailRef" />
    </div>
</template>
<script setup name="Post">
import { onMounted, ref } from 'vue'; 
import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png'

import supplierDetail from "./supplierDetail.vue";

const bgStore = useBackgroundStore()
const route = useRoute()

const supplierDetailRef = ref(null)

// 初始化
onMounted(() => {
    bgStore.setBgImage(otherbg)
    const _supplierId = route.params && route.params.supplierId
    if (_supplierId) {
        console.log('接收id', _supplierId)
        supplierDetailRef.value.linkGetSupplierInfo(_supplierId)
    }
}); 
</script>