Sfoglia il codice sorgente

不能观看的页面完成

于添 7 mesi fa
parent
commit
6a4d01e83a

+ 2 - 0
src/api/portal/index.js

@@ -43,3 +43,5 @@ export const getQueryTreeAll = (p) => request('disk/type/treeAll', p, 'get')
 export const getTalkPageList = (p) => request('disk/comment/pageList', p, 'get')
 //筛查文件格式
 export const getAllListFileFormat = (p) => request('disk/fileformat/allList', p, 'get')
+
+export const checkAuth = (p) => request('disk/fileformat/allList', p, 'get')

+ 6 - 0
src/router/portal.js

@@ -54,6 +54,12 @@ const portal = [
 				component: () => import('@/views/myResources/resourceManagement/index.vue')
 			}
 		]
+	},
+	{
+		path: '/notLook',
+		name: 'notLook',
+		component: () => import('@/views/notLook/index.vue'),
+		children: []
 	}
 ]
 /**

+ 8 - 0
src/router/whiteList.js

@@ -51,6 +51,14 @@ const constRouters = [
 			title: '微信JSAPI支付'
 		}
 	},
+	{
+		path: '/notLook',
+		name: 'notLook',
+		component: () => import('@/views/notLook/index.vue'),
+		meta: {
+			title: '无权限访问'
+		}
+	},
 	{
 		path: '/share/:shareBatchNum',
 		name: 'Share',

+ 7 - 0
src/views/myResources/UploadModal.vue

@@ -97,6 +97,13 @@
 		category: [{ required: true, message: '请选择分类', trigger: 'change' }]
 	}
 
+	watch(
+		() => props.fileList,
+		(val) => {
+			console.log('参数都有什么啊', val)
+		}
+	)
+
 	// 上传相关数据
 	const options = ref({
 		target: `${proxy.$RESOURCE_CONFIG.baseContext}/resourceFile/uploadfile`,

+ 62 - 0
src/views/notLook/index.vue

@@ -0,0 +1,62 @@
+<template>
+	<a-result status="error" title="没有访问权限" sub-title="如有疑问请联系管理员">
+		<template #extra>
+			<!-- <a-button key="console" type="primary">Go Console</a-button> -->
+		</template>
+		<!-- <template #extra>
+			<a-button key="console" type="primary">Go Console</a-button>
+			<a-button key="buy">Buy Again</a-button>
+		</template> -->
+
+		<!-- <div class="desc">
+			<p style="font-size: 16px">
+				<strong>The content you submitted has the following error:</strong>
+			</p>
+			<p>
+				<close-circle-outlined :style="{ color: 'red' }" />
+				Your account has been frozen
+				<a>Thaw immediately &gt;</a>
+			</p>
+			<p>
+				<close-circle-outlined :style="{ color: 'red' }" />
+				Your account is not yet eligible to apply
+				<a>Apply Unlock &gt;</a>
+			</p>
+		</div> -->
+	</a-result>
+</template>
+
+<script setup>
+	import { ref, onMounted } from 'vue'
+	import { CloseCircleOutlined } from '@ant-design/icons-vue'
+	import tool from '@/utils/tool'
+	//发布按钮状态
+	const releaseVisible = ref(false)
+	const loading = ref(false) // 列表loading
+
+	const isState = ref(0) // 列表loading
+
+	// 搜索值
+	const searchValue = ref('')
+
+	const pagination = reactive({
+		pageSize: 10,
+		pageNum: 1,
+		total: 0
+	})
+	const publishedData = ref()
+	//发布确定
+
+	// 上传资源模态框
+	const uploadModalVisible = ref(false)
+
+	onMounted(() => {
+		// getListData()
+	})
+</script>
+
+<style scoped>
+	.desc p {
+		margin-bottom: 1em;
+	}
+</style>

+ 2 - 2
src/views/portal/components/Header.vue

@@ -17,12 +17,12 @@
 
 			<div class="header-right">
 				<!-- <a-input-search placeholder="输入关键词搜索" style="width: 200px" /> -->
-				<div style="display: flex">
+				<!-- <div style="display: flex">
 					<SearchOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
 					<div style="width: 5px"></div>
 					<span style="font-size: 12px; color: #00000083">搜索</span>
 				</div>
-				<div style="width: 20px"></div>
+				<div style="width: 20px"></div> -->
 				<div style="display: flex">
 					<UserOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
 					<div style="width: 5px"></div>

+ 65 - 57
src/views/resourceCenter/components/ResourceList.vue

@@ -17,68 +17,69 @@
 				@search="onSearch"
 			/>
 		</div>
-		<a-row :gutter="[16, 16]">
-			<a-col :span="8" v-for="(item, index) in resources" :key="index">
-				<div style="border-radius: 10px 10px 5px 5px; border: 1px solid #dcdcdc">
-					<div style="display: flex; position: relative">
-						<div
-							class="resource"
-							@click="handleItem(item)"
-							:style="{
-								backgroundSize: 'cover',
-								backgroundPosition: 'center',
-								backgroundImage:
-									'url(' +
-									(item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
-										? sysConfig.FILE_URL + item.coverImagePath
-										: '') +
-									')'
-							}"
-						>
-							<!-- <a-image
-								style="width: 100%; height: 100%"
-								:src="
-									item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
-										? sysConfig.FILE_URL + item.coverImagePath
-										: ''
-								"
-								alt=""
-								:preview="false"
-							></a-image> -->
-							<PlayCircleOutlined
-								:style="{ fontSize: '40px', color: 'white' }"
-								style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%)"
-							/>
-						</div>
-					</div>
-					<div style="display: flex; flex-direction: column; padding: 5px 10px">
-						<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">{{ item.uploadTime }}</span>
+		<a-spin :spinning="loading" tip="">
+			<a-row :gutter="[16, 16]">
+				<a-col :span="8" v-for="(item, index) in resources" :key="index">
+					<div style="border-radius: 10px 10px 5px 5px; border: 1px solid #dcdcdc">
+						<div style="display: flex; position: relative">
+							<div
+								class="resource"
+								@click="handleItem(item)"
+								:style="{
+									backgroundSize: 'cover',
+									backgroundPosition: 'center',
+									backgroundImage:
+										'url(' +
+										(item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
+											? sysConfig.FILE_URL + item.coverImagePath
+											: '') +
+										')'
+								}"
+							>
+								<!-- <a-image
+                                    style="width: 100%; height: 100%"
+                                    :src="
+                                        item.coverImagePath != '' && sysConfig.FILE_URL + item.coverImagePath
+                                            ? sysConfig.FILE_URL + item.coverImagePath
+                                            : ''
+                                    "
+                                    alt=""
+                                    :preview="false"
+                                ></a-image> -->
+								<PlayCircleOutlined
+									:style="{ fontSize: '40px', color: 'white' }"
+									style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%)"
+								/>
 							</div>
+						</div>
+						<div style="display: flex; flex-direction: column; padding: 5px 10px">
+							<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">{{ item.uploadTime }}</span>
+								</div>
 
-							<div style="display: flex; justify-content: center; align-items: center">
-								<EyeOutlined />
-								<div style="width: 5px"></div>
-								<span style="font-size: 12px">{{ item.viewCount }}</span>
+								<div style="display: flex; justify-content: center; align-items: center">
+									<EyeOutlined />
+									<div style="width: 5px"></div>
+									<span style="font-size: 12px">{{ item.viewCount }}</span>
+								</div>
 							</div>
 						</div>
-					</div>
-
-					<!-- <a-card-meta :title="item.title">
-						<template #description>
-							<p>{{ item.description }}</p>
-						</template>
-					</a-card-meta> -->
-				</div>
-			</a-col>
-		</a-row>
 
+						<!-- <a-card-meta :title="item.title">
+                            <template #description>
+                                <p>{{ item.description }}</p>
+                            </template>
+                        </a-card-meta> -->
+					</div>
+				</a-col>
+			</a-row>
+		</a-spin>
 		<div style="height: 20px"></div>
 		<div style="display: flex; width: 100%; align-items: center; justify-content: center">
 			<a-pagination
@@ -101,6 +102,7 @@
 	import sysConfig from '@/config/index'
 	const queryData = ref({})
 	const total = ref(0)
+	const loading = ref(false)
 	const tabKey = ref(0)
 	const currentPage = reactive({
 		current: 1,
@@ -159,6 +161,7 @@
 	// })
 
 	const getList = () => {
+		loading.value = true
 		list({ ...currentPage, ...queryData.value })
 			.then((res) => {
 				console.log('下面列表获取', res)
@@ -167,9 +170,11 @@
 					total.value = res.data.total
 					currentPage.current = res.data.current
 				}
+				loading.value = false
 			})
 			.catch((err) => {
 				console.log(err)
+				loading.value = false
 			})
 	}
 
@@ -177,6 +182,7 @@
 		currentPage.current = 1
 		currentPage.size = 12
 		queryData.value = data
+		loading.value = true
 		list({ ...currentPage, ...queryData.value })
 			.then((res) => {
 				// console.log('外面控制的刷新列表', res)
@@ -185,9 +191,11 @@
 					total.value = res.data.total
 					currentPage.current = res.data.current
 				}
+				loading.value = false
 			})
 			.catch((err) => {
 				console.log(err)
+				loading.value = false
 			})
 	}
 	onMounted(() => {

+ 3 - 0
src/views/resourceDetails/components/VideoDetails.vue

@@ -315,6 +315,9 @@
 		getList()
 		const id = route.query.id
 		if (id != undefined && id != '') {
+			// isHaveAuth : 0 1
+			// checkAuth
+
 			queryList({ resourceId: id })
 				.then((res) => {
 					if (res.data == true) {