Explorar el Código

添加文件类型

xiaohaizhao hace 2 meses
padre
commit
ab0037d869
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      components/Yl_Upload/index.js

+ 1 - 1
components/Yl_Upload/index.js

@@ -88,7 +88,7 @@ Component({
                 method: "PUT",
                 data: data,
                 header: {
-                    'content-type': 'application/octet-stream'
+                    'content-type': res.filetype == 'pdf' ? "application/pdf" : 'application/octet-stream'
                 },
                 success(a) {
                     _Http.basic({