|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-07-07 17:27:04
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-07-11 17:34:08
|
|
|
|
|
* @LastEditTime: 2022-07-11 17:47:42
|
|
|
|
|
* @Description: file content
|
|
|
|
|
*/
|
|
|
|
|
import { ElMessage } from '@/plugins/element-plus';
|
|
|
|
@ -30,7 +30,7 @@ export function payCenterSign() {
|
|
|
|
|
export async function upload(serviceName, configId, file, cancelToken, suffix) {
|
|
|
|
|
const _suffix = file.name.substring(file.name.lastIndexOf('.'));
|
|
|
|
|
const suffixObj = typeof suffix === 'string' ? suffix.split(',') : suffix;
|
|
|
|
|
if (!suffixObj.includes(_suffix)) {
|
|
|
|
|
if (suffixObj && !suffixObj.includes(_suffix)) {
|
|
|
|
|
ElMessage.error('上传文件类型错误');
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|