瀏覽代碼

添加文件类型

xiaohaizhao 2 月之前
父節點
當前提交
ab0037d869
共有 1 個文件被更改,包括 1 次插入1 次删除
  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({