<template>
    <div>
        <GoodsListOne v-if="routeType == 2"></GoodsListOne>
        <NewsList v-if="routeType == 1"></NewsList>
        <CompanyList v-if="routeType==6"></CompanyList>
    </div>
</template>

<script setup>
//0.加载页面依赖 start ---------------------------------------->
import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
//0.加载页面依赖 end ---------------------------------------->

//1.获得路由id start ---------------------------------------->
const targetSegment = getRoutePath(1);
//1.1 获得当前的路由id
let routeId;
let routeType;
//通过导航路径反向查询导航id
const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
    method: 'GET',
    query: {
        'pinyin': targetSegment,
    },
});
if (getRouteId.code == 200) {
    console.log('getRouteId', getRouteId.data);
    routeId = getRouteId.data.category_id
    routeType = getRouteId.data.type
} else {
    console.log("获得路由id出错！", getRouteId.message)
}
//1.获得路由id end ---------------------------------------->
</script>