Ver código fonte

Merge branch 'dev' into 'master'

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

See merge request motive-power/yxl/yxl-web-admin-frontend!19
梁展鹏 3 anos atrás
pai
commit
6ccfb3037d

+ 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)