소스 검색

Merge branch 'dev' into 'master'

调整阿里云OSS上传后的文件名

See merge request motive-power/yxl/yxl-web-admin-frontend!19
梁展鹏 3 년 전
부모
커밋
6ccfb3037d
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/utils/ali-oss.js
  2. 1 1
      src/views/photographerManagement/photoVerify/modal/ali-oss-multi.vue

+ 1 - 1
src/utils/ali-oss.js

@@ -24,5 +24,5 @@ export const getFileNameUUID = () => {
     return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
   }
 
-  return `${+new Date()}_${rx()}${rx()}`
+  return `${rx()}${rx()}`
 }

+ 1 - 1
src/views/photographerManagement/photoVerify/modal/ali-oss-multi.vue

@@ -159,7 +159,7 @@ export default {
             temporary + 1,
             fileNameLength
           );
-          let fileName = getFileNameUUID() + '.' + fileFormat;
+          let fileName = _that.$moment(new Date()).format('YYYYMMDDHHmm') + '_' + getFileNameUUID() + '.' + fileFormat;
 
           // https://github.com/ali-sdk/ali-oss#multipartuploadname-file-options
           client(_that.dataObj)