lex 1 рік тому
батько
коміт
4d8a5decef

+ 1 - 1
dev-dist/sw.js

@@ -82,7 +82,7 @@ define(['./workbox-5357ef54'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
-    "revision": "0.8dehmh0kiv8"
+    "revision": "0.cu1t6bfj3j8"
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{ "version": 1709113599649 }
+{"version":1709302861444}

+ 3 - 11
src/views/home/components/trainData.tsx

@@ -39,15 +39,7 @@ export default defineComponent({
       width: '100%',
       studentNum: 0,
       paymentAmount: 0,
-      dateList: [
-        '2022-10-10',
-        '2022-10-11',
-        '2022-10-12',
-        '2022-10-13',
-        '2022-10-14',
-        '2022-10-15',
-        '2022-10-16'
-      ],
+      dateList: [],
       studentList: [],
       payInfoList: []
     });
@@ -241,8 +233,8 @@ export default defineComponent({
           type: 'category',
           boundaryGap: true,
           axisLabel: {
-            show: true,
-            interval: 0
+            show: true
+            // interval: 0
           },
           data: payForm.dateList
           // splitLine: {

+ 20 - 24
src/views/natural-resources/components/my-resources/save-modal/index.tsx

@@ -9,16 +9,16 @@ import {
   UploadFileInfo,
   useMessage
 } from 'naive-ui';
-import iconUploadAdd from '../../../images/icon-upload-add.png';
+// import iconUploadAdd from '../../../images/icon-upload-add.png';
 import { NaturalTypeEnum, PageEnum } from '/src/enums/pageEnum';
-import { policy } from '/src/components/upload-file/api';
+// import { policy } from '/src/components/upload-file/api';
 import { formatUrlType } from '../upload-modal';
-import axios from 'axios';
+// import axios from 'axios';
 import {
   getUploadSign,
   onFileUpload,
-  onOnlyFileUpload,
-  ossSwitch
+  onOnlyFileUpload
+  // ossSwitch
 } from '/src/helpers/oss-file-upload';
 
 export default defineComponent({
@@ -216,27 +216,22 @@ export default defineComponent({
         // let dataURL = '';
         const videoElement = document.createElement('video');
         videoElement.currentTime = 1;
+        videoElement.setAttribute('crossOrigin', 'Anonymous'); // 处理跨域
+        videoElement.setAttribute('preload', 'auto'); // auto|metadata|none
         videoElement.src = URL.createObjectURL(file);
-        videoElement.addEventListener('loadedmetadata', function () {
-          console.log('loaded in');
-          videoElement.currentTime = 1;
+        // Listen for 'canplay' to ensure the video is ready for frame capture
+        videoElement.addEventListener('canplay', function () {
+          console.log('Video can play');
+          const canvas: any = document.createElement('canvas'),
+            width = videoElement.videoWidth,
+            height = videoElement.videoHeight;
 
-          // Listen for 'canplay' to ensure the video is ready for frame capture
-          videoElement.addEventListener('canplay', function () {
-            console.log('Video can play');
-            const canvas: any = document.createElement('canvas'),
-              width = videoElement.videoWidth,
-              height = videoElement.videoHeight;
+          canvas.width = width;
+          canvas.height = height;
+          canvas.getContext('2d').drawImage(videoElement, 0, 0, width, height);
 
-            canvas.width = width;
-            canvas.height = height;
-            canvas
-              .getContext('2d')
-              .drawImage(videoElement, 0, 0, width, height);
-
-            canvas.toBlob((blob: any) => {
-              resolve(blob);
-            });
+          canvas.toBlob((blob: any) => {
+            resolve(blob);
           });
         });
         videoElement.addEventListener('error', function (e) {
@@ -327,6 +322,7 @@ export default defineComponent({
           list.push(item);
         }
       });
+      console.log(fileListRef.value, uploadList.value);
       emit('confrim', list);
     };
 
@@ -372,7 +368,7 @@ export default defineComponent({
           <NButton
             round
             type="primary"
-            disabled={uploadStatus.value}
+            disabled={uploadStatus.value || btnLoading.value}
             onClick={onSubmit}>
             确定
           </NButton>

+ 3 - 3
src/views/notation/index.tsx

@@ -24,9 +24,9 @@ export default defineComponent({
       src: `${
         /(192|localhost)/.test(location.origin)
           ? // ?
-            // 'https://test.lexiaoya.cn'
-            'http://localhost:3050'
-          : location.origin
+            'https://test.lexiaoya.cn'
+          : // 'http://localhost:3050'
+            location.origin
       }/notation/?t=${Date.now()}#/create?v=${Date.now()}&Authorization=${Authorization}${openCreateUrl}`
       //   src: `http://localhost:3050/#/create?Authorization=${Authorization}`
     });