video.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
  5. <cHead :is_menu="false" :is_head="false">
  6. <template v-slot:info>
  7. <div class="w_1200">
  8. <el-col :span="24" class="one">
  9. <el-col :span="24" class="name">{{ info.title || '暂无标题' }}</el-col>
  10. <el-col :span="24" class="time"><span>发布时间</span> {{ info.time || '暂无发布时间' }}</el-col>
  11. <el-col :span="24" class="video">
  12. <cVideo :src="info.file" :second="3" />
  13. </el-col>
  14. </el-col>
  15. </div>
  16. </template>
  17. </cHead>
  18. </el-col>
  19. </el-row>
  20. </div>
  21. </template>
  22. <script setup lang="ts">
  23. // 基础
  24. import type { Ref } from 'vue';
  25. import { onMounted, getCurrentInstance, ref } from 'vue';
  26. // 图片引入
  27. import home from '@/assets/home.mp4';
  28. // 接口
  29. // import { ToolsStore } from '@/stores/tool';
  30. // import type { IQueryResult } from '@/util/types.util';
  31. // const toolsAxios = ToolsStore();
  32. const { proxy } = getCurrentInstance() as any;
  33. // 加载中
  34. const loading: Ref<any> = ref(false);
  35. const info: Ref<any> = ref({
  36. file: home,
  37. title: '2022年杭州市技术经纪人培训班-第1课',
  38. time: '2024-01-05 09:12:23'
  39. });
  40. // 请求
  41. onMounted(async () => {
  42. loading.value = true;
  43. await searchOther();
  44. await search();
  45. loading.value = false;
  46. });
  47. const search = async () => {
  48. // const res: IQueryResult = await userCheckAxios.query(info);
  49. // if (res.errcode == '0') {
  50. // list.value = res.data;
  51. // total.value = res.total;
  52. // }
  53. };
  54. // 查询其他信息
  55. const searchOther = async () => {
  56. // let res: IQueryResult;
  57. // // 性别
  58. // res = await dictAxios.query({ type: 'common_gender' });
  59. // if (res.errcode == '0') genderList.value = res.data;
  60. };
  61. </script>
  62. <style scoped lang="scss">
  63. .main {
  64. background: url(@/assets/videobg.png) right top no-repeat;
  65. background-size: 100%;
  66. .one {
  67. .name {
  68. font-size: 24px;
  69. font-weight: 600;
  70. padding: 12px 0;
  71. color: #ffffff;
  72. }
  73. .time {
  74. font-size: 14px;
  75. color: rgb(108, 127, 163);
  76. span {
  77. padding: 0 10px;
  78. line-height: 24px;
  79. border-radius: 10px;
  80. text-align: center;
  81. background-color: rgb(120, 137, 162);
  82. color: white;
  83. }
  84. }
  85. .video {
  86. width: 100%;
  87. margin: 20px 0;
  88. }
  89. }
  90. }
  91. </style>