appUpload(tempFilePaths, tempFiles) { let _this = this; console.log("++++++++++++++++", tempFiles); var arr = []; arr = tempFiles; /* #ifdef H5 */ const tempImg = arr.map((item) => { return { name: "files", file: item, //后台用来截取的判断文件的类型 一般都是file 具体根据后台俩改变 }; }); console.log(tempImg); uni.uploadFile({ url: config.baseUrl + "/common/uploadMinio", // filePath: tempFilePaths[0], // name: "files", // 后端接收的文件名 files: tempImg, header: _this.header, complete: (resImg) => { console.log("++++++++++++++++"); console.warn(resImg.data); console.log("--------------"); }, }); /* #endif */ /*#ifdef APP-PLUS */ // 转成相对路径 // let absoluteF = plus.io.convertAbsoluteFileSystem(tempFilePaths[0]); const tempImg = arr.map((item, index) => { return { name: "files" + index, file: item, uri: item.path, }; }); // tempFilePaths.map((item) => { // console.warn("----------------"); console.warn(tempImg); // console.warn("----------------"); // }); uni.uploadFile({ url: config.baseUrl + "/common/appuploadMinio", // filePath: tempFilePaths, // name: "files", // 后端接收的文件名 files: tempImg, header: _this.header, complete: (resImg) => { console.log("++++++++++++++++"); console.warn(resImg); console.log("--------------"); }, }); // arr.map((item) => { // // var test = null; // // plus.io.resolveLocalFileSystemURL(item.path, function (entry) { // // // 可通过entry对象操作test.html文件 // // entry.file(function (file) { // // // console.log("getFile:" + JSON.stringify(file)); // // _this.test = file; // // }); // // }); // // console.log(test); // _this.pathToFile(item.path).then(function (value) { // // console.warn(JSON.stringify(value)); // let narr = []; // narr.push({ // name: "files", // file: value, // }); // _this.imagesList = narr; // }); // // return { // // name: "files", // // // file: , // // }; // }); // console.warn(_this.imagesList); /* #endif */ // uni.uploadFile({ // url: config.baseUrl + "/common/uploadMinio", // // filePath: tempFilePaths[0], // // name: "files", // 后端接收的文件名 // files: tempImg, // header: _this.header, // complete: (resImg) => { // console.log("++++++++++++++++"); // console.warn(resImg.data); // console.log("--------------"); // }, // }); },