| | |
| | | import floatingWindow from "./floatingWindow.vue"; |
| | | import yearWindow from "./yearWindow.vue"; |
| | | import { nextTick } from "vue"; |
| | | |
| | | import fileApi from "@/assets/js/middleGround/api/file"; |
| | | import { requestCtx, appRefCode } from "@/assets/js/config"; |
| | | export default { |
| | | components: { |
| | | floatingWindow, |
| | |
| | | }, |
| | | }) |
| | | .then(async (res) => { |
| | | console.log(res, "res"); |
| | | for (let i = 0; i < res.datas.length; i++) { |
| | | const item = res.datas[i]; |
| | | this.$set(item, "showDetail", false); |
| | |
| | | } |
| | | } |
| | | |
| | | console.log(this.contentList, "this.contentList"); |
| | | this.contentList = res.datas; |
| | | this.showList = true; |
| | | }); |
| | |
| | | const filterList = yearDataList.datas.filter((item) => { |
| | | return item.cmsItemType != "chronology" && item.cmsItemType != "AWARD"; |
| | | }); |
| | | |
| | | if (filterList && filterList.length > 0) { |
| | | for (let i = 0; i < filterList.length; i++) { |
| | | const item = filterList[i]; |
| | | if (item.file) { |
| | | const requestCtx = |
| | | this.config.requestCtx + `/file/api/ApiDownload?md5=${item.file}`; |
| | | const requestCtx = await this.getResourcePath(item.file); |
| | | console.log(requestCtx, "requestCtx"); |
| | | this.$set(item, "fileLink", requestCtx); |
| | | } |
| | | this.$set(item, "showDetail", false); |
| | |
| | | } |
| | | return filterList; |
| | | }, |
| | | |
| | | // 获取阿里云加速地址 (视频,音频) |
| | | async getResourcePath(md5) { |
| | | try { |
| | | // 如果返回的数据为空或未定义,则拼接默认下载路径 |
| | | return requestCtx + "/file/api/ApiDownload?md5=" + md5; |
| | | } catch (error) { |
| | | // 捕获异常并打印错误日志 |
| | | console.error("获取资源路径失败:", error); |
| | | // 返回一个默认值或抛出错误(根据业务需求) |
| | | return requestCtx + "/file/api/ApiDownload?md5=" + md5; |
| | | } |
| | | }, |
| | | |
| | | closeDetail(index, cindex, type) { |
| | | for (let i = 0; i < this.contentList.length; i++) { |
| | | const item = this.contentList[i]; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | font-family: Source Han Sans; |
| | | } |
| | | |
| | | .pageBox { |
| | |
| | | border: 2px solid #cbbeaa; |
| | | box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); |
| | | } |
| | | |
| | | video { |
| | | border-radius: 10px; |
| | | border: 1px solid #dcdcdc; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); |
| | | } |
| | | .yaerWindow { |
| | | position: absolute; |
| | | left: -54px; |
| | |
| | | |
| | | ::v-deep .el-loading-spinner { |
| | | .el-loading-text { |
| | | |
| | | font-size: 14px; |
| | | color: #937950; |
| | | } |
| | |
| | | color: #937950; |
| | | } |
| | | } |
| | | |
| | | </style> |