Browse Source

添加文件类型

xiaohaizhao 2 tháng trước cách đây
mục cha
commit
ab0037d869
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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({