const newsBrief = () => import('@/views/newsBrief/index.vue')
const ModeuleNews = () => import('@/views/newsBrief/ModeuleNews.vue')
const NewsDetial = () => import('@/views/newsBrief/NewsDetial.vue')
const NewsAnalysis = () => import('@/views/newsAnalysis/index.vue')

const newsRoutes = [
	//新闻速览页面路由
	{
		path: "/newsBrief",
		name: "newsBrief",
		component: newsBrief,
		meta: {
			title: "新闻速览"
		}
	},
	//新闻模块页面路由
	{
		path: "/newsModeule/:id",
		name: "newsModeule",
		component: ModeuleNews,
		meta: {
			title: "新闻模块"
		}
	},

	//新闻详情页面路由
	{
		path: "/newsDetail/:id",
		name: "newsDetail",
		component: NewsDetial,
		meta: {
			title: "新闻详情"
		}
	},

	// 新闻事件分析
	{
		path: "/newsAnalysis",
		name: "newsAnalysis",
		component: NewsAnalysis,
		meta: {
			title: "新闻事件分析"
		}
	}
];
import { useGotoPage } from "../common.js";

export function useGotoNewsBrief() {
	const gotoPage = useGotoPage();
	return (isNewTabs = true) => gotoPage("/newsBrief/", {}, isNewTabs)
}
export function useGotoNewsDetail() {
	const gotoPage = useGotoPage();
	return (id, isNewTabs = true) => gotoPage("/newsDetail/" + id, {}, isNewTabs)
}
export function useGotoNewsModule() {
	const gotoPage = useGotoPage();
	return (id, name, isNewTabs = true) =>
		gotoPage("/newsModeule/" + id, { name }, isNewTabs)
}


export default newsRoutes;
