Kaynağa Gözat

分享完事

于添 8 ay önce
ebeveyn
işleme
7c23b20ab7

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ NODE_ENV = development
 VITE_TITLE = Snowy
 
 # 接口地址
-VITE_API_BASEURL = http://192.168.31.80:9003
+VITE_API_BASEURL = http://192.168.31.14:9003
 # VITE_API_BASEURL = http://192.168.31.80:9003
 # VITE_API_BASEURL = http://192.168.31.6:9003
 

+ 11 - 1
src/api/portal/index.js

@@ -7,6 +7,16 @@ const request = moduleRequest(`/api/webapp/`)
  * 获取文件列表相关接口
  */
 // 获取文件列表(区分文件路径)
-export const list = (p) => request('disk/courseinfo/page', p, 'get')
+export const list = (p) => request('disk/resourcecentre/page', p, 'get')
 // 获取文件列表(区分文件类型)
 // export const getFileListByType = (p) => request('file/selectfilebyfiletype', p, 'get')
+
+// 进入详情之后增加观看次数
+export const addViewCount = (p) => request('disk/courseauditrecord/addViewCount', p, 'post')
+//详情
+export const detail = (p) => request('disk/courseauditrecord/detail', p, 'get')
+//收藏增加
+export const add = (p) => request('disk/collect/add', p, 'post')
+//收藏查询
+export const queryList = (p) => request('disk/collect/queryList', p, 'get')
+export const cancel = (p) => request('disk/collect/cancel', p, 'post')

+ 22 - 13
src/router/fullPageTool.js

@@ -8,27 +8,36 @@
  *	5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
  *	6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
  */
+
+import portal from './portal'
+
 const fullPageTool = {
 	//检查
 	check(to) {
 		//如果在这个列表里就设置可以全屏
-		this.fullPageList.forEach((item) => {
-			if (to.path.includes(item.path)) {
+		// 使用示例
+		const allPaths = this.getPath(portal)
+
+		allPaths.forEach((item) => {
+			if (to.path.includes(item)) {
 				to.meta.fullpage = true
 			}
 		})
 	},
-	fullPageList: [
-		{
-			path: '/portal'
-		},
-		{
-			path: '/portal/resourceCenter'
-		},
-		{
-			path: '/portal/resourceDetails'
-		}
-	]
+	getPath(routes) {
+		let paths = []
+
+		routes.forEach((route) => {
+			if (route.path) {
+				paths.push(route.path)
+			}
+			if (route.children && Array.isArray(route.children)) {
+				paths = paths.concat(this.getPath(route.children))
+			}
+		})
+
+		return paths
+	}
 }
 /**
  * 路由白名单(数组形式)

+ 1 - 0
src/router/index.js

@@ -195,6 +195,7 @@ const filterAsyncRouter = (routerMap) => {
 			children: item.children ? filterAsyncRouter(item.children) : null,
 			component: loadComponent(item.component)
 		}
+		// console.log('看看', route)
 		accessedRouters.push(route)
 	})
 	return accessedRouters

+ 20 - 3
src/router/portal.js

@@ -9,18 +9,35 @@
  *	6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
  */
 const portal = [
+	// {
+	// 	name: 'portal',
+	// 	path: '/portal',
+	// 	components: () => import('@/portal/index.vue'),
+	// 	children: [
+	// 		{
+	// 			name: 'resourceCenter',
+	// 			path: '/portal/resourceCenter',
+	// 			component: () => import('@/resourceCenter/index.vue')
+	// 		},
+	// 		{
+	// 			name: 'resourceDetails',
+	// 			path: '/portal/resourceDetails',
+	// 			component: () => import('@/resourceDetails/index.vue')
+	// 		}
+	// 	]
+	// }
 	{
 		name: 'portal',
 		path: '/portal',
-		components: () => import('@/portal/index.vue'),
+		component: () => import('@/portal/index.vue'),
 		children: [
 			{
-				name: 'resourceCenter',
+				name: 'portal.resourceCenter',
 				path: '/portal/resourceCenter',
 				component: () => import('@/resourceCenter/index.vue')
 			},
 			{
-				name: 'resourceDetails',
+				name: 'portal.resourceDetails',
 				path: '/portal/resourceDetails',
 				component: () => import('@/resourceDetails/index.vue')
 			}

+ 1 - 1
src/utils/reSourceRequest.js

@@ -136,7 +136,7 @@ service.interceptors.response.use(
 			]
 			apiNameArray.forEach((apiName) => {
 				if (responseUrl.includes(apiName)) {
-					message.success(data.msg)
+					// message.success(data.msg)
 				}
 			})
 		}

+ 10 - 0
src/utils/tool.js

@@ -218,4 +218,14 @@ tool.formatTimesYearMonthDay = (timestamp) => {
 	return `${year}-${month}-${day}`
 }
 
+//添加文本到剪切板
+tool.writeText = (text) => {
+	let copyInput = document.createElement('input')
+	copyInput.value = text
+	document.body.appendChild(copyInput)
+	copyInput.select()
+	document.execCommand('copy')
+	document.body.removeChild(copyInput)
+}
+
 export default tool

+ 25 - 4
src/views/portal/index.vue

@@ -4,8 +4,8 @@
 			<Header @onChangeCurrent="onChangeCurrent" />
 			<div style="width: 71%; margin-left: 10%">
 				<BreadCrumb />
-				<ResourceCenter v-if="indexType == 'resourceCenter'" />
-				<ResourceDetails v-if="indexType == 'resourceDetails'" />
+				<ResourceCenter />
+				<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
 			</div>
 		</a-layout>
 		<Footer />
@@ -18,8 +18,12 @@
 	import Footer from './components/Footer.vue'
 	import ResourceCenter from '@/views/resourceCenter/index.vue'
 	import ResourceDetails from '@/views/resourceDetails/index.vue'
+	import EventBus from '@/utils/EventBus'
+	import { useRouter, useRoute } from 'vue-router'
+	const router = useRouter()
 
-	const indexType = ref('resourceDetails')
+	const indexType = ref('resourceCenter')
+	const ResourceDetailsRef = ref(null)
 	const onChangeCurrent = (current) => {
 		indexType.value = current
 	}
@@ -28,9 +32,26 @@
 		// emit('handlerItemSidebar', item)
 	}
 
-	const handlerItemCorrelation = (item) => {
+	const handleOpenResourceDetails = (item) => {
 		// emit('handlerItemSidebar', item)
+		// indexType.value = 'resourceDetails'
+		// nextTick(() => {
+		// 	console.log('看看呢', ResourceDetailsRef.value, item) /
+		// 		// if (ResourceDetailsRef.value) {
+		// 		// 	ResourceDetailsRef.value.setData(item)
+		// 		// }
+		// })
+		console.log('看看呢', item)
+		router.push({
+			path: '/portal/resourceDetails',
+			query: {
+				id: item.id
+			}
+		})
 	}
+
+	EventBus.off('openResourceDetails', handleOpenResourceDetails)
+	EventBus.on('openResourceDetails', handleOpenResourceDetails)
 </script>
 
 <style scoped>

+ 20 - 6
src/views/resourceCenter/components/ResourceList.vue

@@ -10,7 +10,12 @@
 				<TabSwitcher @selectTab="selectTab" />
 			</div>
 
-			<a-input-search placeholder="输入资源关键词" style="width: 200px" @search="onSearch" />
+			<a-input-search
+				v-model:value="currentPage.queryInfo"
+				placeholder="输入资源关键词"
+				style="width: 200px"
+				@search="onSearch"
+			/>
 		</div>
 		<a-row :gutter="[16, 16]">
 			<a-col :span="8" v-for="(item, index) in resources" :key="index">
@@ -21,14 +26,14 @@
 						</div>
 					</div>
 					<div style="display: flex; flex-direction: column; padding: 5px 10px">
-						<span style="font-size: 16px; font-weight: bold">{{ item.courseName }}</span>
-						<span style="font-size: 12px">{{ item.description }}</span>
-						<span style="font-size: 12px">{{ item.name }}</span>
+						<span style="font-size: 16px; font-weight: bold">{{ item.fileName }}</span>
+						<span style="font-size: 12px">{{ item.collegeIdName }}</span>
+						<span style="font-size: 12px">{{ item.majorIdName }}</span>
 						<div style="display: flex; justify-content: space-between">
 							<div style="display: flex; justify-content: center; align-items: center">
 								<FieldTimeOutlined />
 								<div style="width: 5px"></div>
-								<span style="font-size: 12px">{{ tool.formatTimestamp(item.publishTime) }}</span>
+								<span style="font-size: 12px">{{ item.uploadTime }}</span>
 							</div>
 
 							<div style="display: flex; justify-content: center; align-items: center">
@@ -61,12 +66,16 @@
 	import TabSwitcher from './TabSwitcher.vue'
 	import { list } from '@/api/portal'
 	import tool from '@/utils/tool'
+	import EventBus from '@/utils/EventBus'
+
 	const total = ref(1024)
 	const tabKey = ref('new')
 	const currentPage = reactive({
 		current: 1,
-		size: 10
+		size: 10,
+		queryInfo: ''
 	})
+	const searchKeyword = ref('')
 	const resources = ref([
 		// { id: 1, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
 		// { id: 2, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
@@ -88,9 +97,14 @@
 	}
 	const handleItem = (item) => {
 		console.log('点了看教材的条目了', item)
+
+		EventBus.emit('openResourceDetails', { id: item.id })
 	}
 	const onSearch = (value) => {
 		console.log('搜索了', value)
+		currentPage.current = 1
+		currentPage.size = 10
+		getList()
 	}
 	const onChange = (page, pageSize) => {
 		console.log('翻页', page, pageSize)

+ 2 - 2
src/views/resourceCenter/components/SidebarRecommend.vue

@@ -5,12 +5,12 @@
 			<div v-for="(item, index) in recommendations" :key="index" class="recommend-item" @click="handlerItem(item)">
 				<div class="item"></div>
 				<div style="display: flex; flex-direction: column; justify-content: space-between; margin-left: 10px">
-					<span style="font-weight: bold; font-size: 12px; margin-top: 5px">{{ item.courseName }}</span>
+					<span style="font-weight: bold; font-size: 12px; margin-top: 5px">{{ item.fileName }}</span>
 					<div style="display: flex; justify-content: center; align-items: space-between">
 						<div style="display: flex; justify-content: center; align-items: center">
 							<FieldTimeOutlined />
 							<div style="width: 5px"></div>
-							<span style="font-size: 12px">{{ tool.formatTimesYearMonthDay(item.publishTime) }}</span>
+							<span style="font-size: 8px">{{ item.uploadTime }}</span>
 						</div>
 						<div style="width: 20px"></div>
 						<div style="display: flex; justify-content: center; align-items: center">

+ 285 - 0
src/views/resourceDetails/components/ShareDialog.vue

@@ -0,0 +1,285 @@
+<template>
+	<a-modal v-model:visible="visible" title="分享资源" @ok="handleOk">
+		<div style="display: flex; flex-direction: column">
+			<div style="display: flex; align-items: center; width: 100%">
+				<CheckCircleOutlined style="font-size: 20px; margin-right: 8px; color: green" />
+				<span style="display: block">成功创建分享链接</span>
+			</div>
+
+			<div style="display: flex; align-items: center; width: 100%; justify-content: space-between">
+				<span>{{ thisUrl }}</span> <a-button type="primary" @click="copyLink()">复制链接</a-button>
+			</div>
+		</div>
+	</a-modal>
+</template>
+
+<script setup>
+	import { ref } from 'vue'
+	import TabSwitcher from './TabSwitcher.vue'
+	import EventBus from '@/utils/EventBus'
+	import { Modal, message, notification } from 'ant-design-vue'
+	import tool from '@/utils/tool'
+	const emit = defineEmits(['selectTab'])
+
+	// id: 1,
+	// 			name: '张三',是1000元,请给我一个好评,谢谢',
+	// 			follw: 0,
+
+	// const props = defineProps({
+	// 	item: {
+	// 		type: Object,
+	// 		default: () => {}
+	// 	}
+	// 	// name: {
+	// 	// 	type: String,
+	// 	// 	default: () => ''
+	// 	// },
+	// 	// talk: {
+	// 	// 	type: String,
+	// 	// 	default: () => ''
+	// 	// },
+	// 	// follw: {
+	// 	// 	type: Number,
+	// 	// 	default: () => 0
+	// 	// },
+	// 	// callBackTalk: {
+	// 	// 	type: Array,
+	// 	// 	default: () => []
+	// 	// }
+	// })
+	const listUnpublishedView = ref(null)
+	const tallTag = ref(false)
+	const visible = ref(false)
+	const itemData = ref(null)
+	const thisUrl = ref('')
+
+	const handleOk = () => {
+		// console.log('查询内容', form)
+		// tallTag.value == true ? (tallTag.value = false) : (tallTag.value = true)
+		// EventBus.emit('closeInput', null, props.item.id)
+		//....
+		visible.value = false
+		// listUnpublishedView.value.setData(tableData.value)
+	}
+	const open = (data) => {
+		console.log('要 打开分享弹窗')
+		visible.value = true
+		// itemData.value = data
+		thisUrl.value = window.location.href
+	}
+	const copyLink = () => {
+		tool.writeText(thisUrl.value)
+		message.success('复制成功')
+	}
+	watch(
+		() => visible.value,
+		(val) => {
+			console.log('可见不可见', val)
+		}
+	)
+	const handerPublish = () => {
+		tallTag.value = false
+		emit('publish')
+
+		//....
+		// listUnpublishedView.value.setData(tableData.value)
+	}
+	const handleCloseInput = (data, tag) => {
+		if (props.item.id != tag) {
+			tallTag.value = false
+		}
+	}
+	onMounted(() => {
+		// getList()
+	})
+
+	defineExpose({
+		open
+	})
+</script>
+
+<style scoped>
+	.tab-switcher {
+		display: flex;
+		border-radius: 20px;
+		border: 1px solid #1e90ff;
+		overflow: hidden;
+	}
+
+	.tab-switcher div {
+		padding: 2px 20px;
+		background-color: #f5f5f5;
+
+		cursor: pointer;
+	}
+
+	.tab-switcher div.active {
+		background-color: #1e90ff;
+		color: white;
+	}
+
+	.tab-switcher div:not(:last-child) {
+	}
+
+	.user-info {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 200px;
+		border: 1px solid #dfe2e5;
+		padding: 20px;
+	}
+
+	.resource-container {
+		width: 850px;
+		margin: 0 auto;
+		padding: 20px;
+		border: 1px solid #dfe2e5;
+	}
+
+	.user-avatar {
+		width: 40px;
+		height: 40px;
+		background: #1e90ff;
+		border-radius: 50%;
+		margin-right: 10px;
+	}
+
+	.user-details {
+		flex: 1;
+	}
+
+	.user-name {
+		font-size: 13px;
+		font-weight: bold;
+	}
+
+	.publish-time {
+		font-size: 12px;
+		color: #999;
+		margin-top: 5px;
+	}
+
+	.metrics {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.metric-item {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding-left: 10px;
+		padding-right: 10px;
+	}
+
+	.metric-item span:first-child {
+		font-size: 18px;
+		font-weight: bold;
+	}
+
+	.metric-item span:last-child {
+		font-size: 12px;
+		color: #666;
+	}
+
+	.actions {
+		display: flex;
+	}
+
+	.share-btn,
+	.favorite-btn {
+		background-color: transparent;
+		border: none;
+		cursor: pointer;
+	}
+
+	.course-info {
+		margin-top: 20px;
+		line-height: 1.6;
+	}
+
+	.liene {
+		height: 35px;
+		width: 1px;
+		background: #00000018;
+	}
+
+	.resource-container {
+		width: 850px;
+		margin: 0 auto;
+		padding: 20px;
+		border: 1px solid #dfe2e5;
+	}
+
+	h1 {
+		text-align: center;
+		margin-bottom: 20px;
+	}
+
+	.ant-descriptions {
+		margin-top: 20px;
+	}
+
+	.ant-typography-title {
+		margin-top: 20px;
+	}
+
+	.ant-typography-paragraph {
+		margin-top: 10px;
+	}
+
+	.ant-space {
+		margin-top: 10px;
+	}
+	.video-info {
+		height: 100%; /* 确保填满容器高度 */
+	}
+	.resInfo {
+		margin-left: 10px;
+		width: 350px;
+		height: 570px;
+		border: 1px solid #dfe2e5;
+		padding: 10px;
+	}
+
+	.user-info-container {
+		display: flex;
+	}
+
+	.resInfoTitile {
+		width: 5px;
+		height: 14px;
+		background-color: cadetblue;
+		margin-right: 5px;
+	}
+
+	.tallList {
+		display: flex;
+		flex-direction: column;
+		width: 850px;
+		border: 1px solid #dfe2e5;
+		padding: 20px;
+		margin-top: 10px;
+	}
+
+	.tallListInfo {
+		color: rgba(0, 0, 0, 0.116);
+		font-size: 12px;
+	}
+
+	.line {
+		width: 100%;
+		height: 0.5px;
+		background-color: rgba(0, 0, 0, 0.075);
+		margin-top: 10px;
+		margin-bottom: 10px;
+	}
+
+	.itemLayou {
+		padding: 0px;
+		border: 1px solid #dfe2e5;
+		cursor: pointer;
+	}
+</style>

+ 62 - 13
src/views/resourceDetails/components/VideoDetails.vue

@@ -12,15 +12,15 @@
 						<div style="display: flex; align-items: center">
 							<div class="user-avatar"></div>
 							<div class="user-details">
-								<div class="user-name">作者名称</div>
-								<div class="publish-time">2025-07-25 10:17</div>
+								<div class="user-name">{{ itemData.resourceCreaterUserName }}</div>
+								<div class="publish-time">{{ itemData.uploadTime }}</div>
 							</div>
 						</div>
 
 						<div style="display: flex; align-items: center">
 							<div class="metrics">
 								<div class="metric-item">
-									<span>100000</span>
+									<span>{{ itemData.viewCount }}</span>
 									<span>播放量</span>
 								</div>
 								<div class="liene"></div>
@@ -36,13 +36,13 @@
 							</div>
 							<div style="width: 10px"></div>
 							<div class="actions">
-								<div style="display: flex; align-items: center">
+								<div style="display: flex; align-items: center; cursor: pointer" @click="handlerShareDialog">
 									<ExportOutlined />
 									<div style="width: 10px"></div>
 									<button class="share-btn">分享资源</button>
 								</div>
 								<div style="width: 10px"></div>
-								<div style="display: flex; align-items: center">
+								<div style="display: flex; align-items: center; cursor: pointer" @click="handlerCollection">
 									<StarOutlined />
 									<div style="width: 10px"></div>
 									<button class="favorite-btn">收藏资源</button>
@@ -52,9 +52,9 @@
 					</div>
 					<!-- 课程信息部分 -->
 					<div class="course-info">
-						<p>
-							课程信息:瑞幸即将展开裁员,裁员名单已经确定。瑞幸裁员的消息早在一周前传出。裁员过后,瑞幸的员工或许并不好找工作,瑞幸在厦门的待遇比较高,这些简历其他企业比较难接下。
-						</p>
+						<span>
+							{{ itemData.resourceDesc }}
+						</span>
 					</div>
 				</div>
 			</div>
@@ -110,12 +110,24 @@
 				</div>
 			</div>
 		</div>
+		<ShareDialog ref="ShareDialogRef"></ShareDialog>
 	</div>
 </template>
 
 <script setup>
 	import { ref } from 'vue'
 	import { Tag, Typography, Space } from 'ant-design-vue'
+	import ShareDialog from './ShareDialog.vue'
+	import { addViewCount, detail, add, cancel, queryList } from '@/api/portal'
+	import { useRoute } from 'vue-router'
+	// const props = defineProps({
+	// 	itemData: {
+	// 		type: Object,
+	// 		default: () => {}
+	// 	}
+	// })
+	const itemData = ref({})
+	const ShareDialogRef = ref(null)
 	const resName = ref('资源名称')
 
 	const teacherName = ref('王某某')
@@ -130,24 +142,59 @@
 		'“我们正步入一个数据或许比软件更重要的新时代。——Tim O’ Reilly” 运用数据是精准刻画事物、呈现发展规律的主要手段,分析数据展示规律,把思想变得更精细!——“弹指之间·享受创新”,通过4周学习,你将掌握利用Python语言表示、清洗、统计和展示数据的能力。'
 	)
 	const tags = ref(['标签名称1', '标签名称2', '标签名称3', '标签名称4', '标签名称5'])
-
+	const route = useRoute()
 	const emit = defineEmits(['selectTab'])
 	const listUnpublishedView = ref(null)
 
-	const onQuery = (form) => {
-		console.log('查询内容', form)
-		//....
+	const handlerShareDialog = () => {
+		console.log('打开分享弹窗')
+		ShareDialogRef.value.open(itemData.value)
+	}
+	const handlerCollection = () => {
+		console.log('打开收藏', itemData.value)
 
-		// listUnpublishedView.value.setData(tableData.value)
+		add({ resourceId: itemData.value.id })
+			.then((res) => {
+				console.log('收藏成功')
+			})
+			.catch((err) => {
+				console.log(err)
+			})
 	}
 
 	const getList = () => {
 		//....
 		// listUnpublishedView.value.setData(tableData.value)
 	}
+	const setData = (data) => {
+		itemData.value = data
+	}
+	const getData = (item) => {
+		detail({ id: item.id })
+			.then((res) => {
+				if (res.code == 200) {
+					itemData.value = res.data
 
+					// VideoDetailsRef.value.setData(res.data)
+				}
+			})
+			.catch((err) => {})
+	}
 	onMounted(() => {
 		getList()
+		const id = route.query.id
+		if (id != undefined && id != '') {
+			queryList({ resourceId: id })
+				.then((res) => {})
+				.catch((err) => {
+					console.log(err)
+				})
+			getData({ id: item.id })
+		}
+	})
+
+	defineExpose({
+		setData
 	})
 </script>
 
@@ -251,6 +298,8 @@
 	.course-info {
 		margin-top: 20px;
 		line-height: 1.6;
+		display: flex;
+		width: 100%;
 	}
 
 	.liene {

+ 74 - 5
src/views/resourceDetails/index.vue

@@ -1,21 +1,90 @@
 <template>
-	<div style="scroll-container">
-		<VideoDetails />
-		<TallList />
+	<div style="overflow-y: auto">
+		<a-layout>
+			<Header @onChangeCurrent="onChangeCurrent" />
+			<div style="width: 71%; margin-left: 10%">
+				<BreadCrumb />
+				<VideoDetails ref="VideoDetailsRef" />
+				<TallList />
+				<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
+			</div>
+		</a-layout>
+		<Footer />
 	</div>
 </template>
 
 <script setup>
+	import Header from '@/views/portal/components/Header.vue'
+	import BreadCrumb from '@/views/portal/components/BreadCrumb.vue'
+	import Footer from '@/views/portal/components/Footer.vue'
 	import VideoDetails from './components/VideoDetails.vue'
+	import { useRoute } from 'vue-router'
 	import TallList from './components/TallList.vue'
-
+	import { addViewCount, detail, add, queryList } from '@/api/portal'
+	const itemData = ref({})
+	const VideoDetailsRef = ref(null)
+	const route = useRoute()
+	//     {
+	//     "fileName": "Kettle文档",
+	//     "courseType": "0",
+	//     "courseTypeName": "必修",
+	//     "collegeAllId": "1938796923484962817,1938796975385280513,1938797957397676033",
+	//     "suffix": "doc",
+	//     "collegeTwoId": "1938796975385280513",
+	//     "verifyStatus": "2",
+	//     "collegeThreeIdName": "维修部",
+	//     "collegeThreeId": "1938797957397676033",
+	//     "collegeId": "1938796923484962817",
+	//     "resourceCreaterUserName": "超管",
+	//     "coverImage": "",
+	//     "coverImagePath": "",
+	//     "fileUrl": "upload/20250626/a37672e03659d06fa618842c9c443910.doc",
+	//     "courseIdName": "胸口碎大石2",
+	//     "id": "1938857816211292161",
+	//     "viewCount": 100,
+	//     "courseId": "1937326992873689091",
+	//     "collegeAllIdName": "汽车工程学院,汽车部门,维修部",
+	//     "FILESIZE": 1105920,
+	//     "majorId": "1",
+	//     "uploadTime": "2025-06-26 18:32:18",
+	//     "verifyStatusName": "已发布",
+	//     "resourceDesc": "大东北,是我的家乡,唢呐吹出了美美滴模样",
+	//     "collegeIdName": "汽车工程学院",
+	//     "majorIdName": "草台班子",
+	//     "collegeTwoIdName": "汽车部门",
+	//     "fileId": "1938183534250917888"
+	// }
 	const handlerItemSidebar = (item) => {
 		// emit('handlerItemSidebar', item)
 	}
 
-	const handlerItemCorrelation = (item) => {
+	const setData = (item) => {
 		// emit('handlerItemSidebar', item)
+
+		getData(item)
 	}
+	const getData = (item) => {
+		detail({ id: item.id })
+			.then((res) => {
+				if (res.code == 200) {
+					itemData.value = res.data
+
+					// VideoDetailsRef.value.setData(res.data)
+				}
+			})
+			.catch((err) => {})
+	}
+
+	onMounted(() => {
+		const id = route.query.id
+		if (id != undefined && id != '') {
+			addViewCount({ id: id })
+			getData({ id: id })
+		}
+	})
+	defineExpose({
+		setData
+	})
 </script>
 
 <style scoped>