lsc 2 tháng trước cách đây
mục cha
commit
a3d52744f3
3 tập tin đã thay đổi với 1162 bổ sung1136 xóa
  1. 2 2
      package.json
  2. 21 0
      pbl.js
  3. 1139 1134
      yarn.lock

+ 2 - 2
package.json

@@ -10,19 +10,19 @@
     "format": "prettier --write ."
   },
   "dependencies": {
+    "File": "^0.10.2",
     "axios": "^1.7.9",
     "bcryptjs": "^2.4.3",
     "crypto": "^1.0.1",
     "express": "^4.18.2",
     "file": "^0.2.2",
-    "File": "^0.10.2",
     "https": "^1.0.0",
     "morgan": "^1.10.0",
     "multer": "^1.4.5-lts.1",
     "mysql": "^2.18.1",
     "pg": "^8.13.1",
     "querystring": "^0.2.1",
-    "r2r-js": "^0.4.24",
+    "r2r-js": "^0.4.34",
     "r2r-webdev-template": "file:",
     "react": "^18",
     "react-dom": "^18",

+ 21 - 0
pbl.js

@@ -466,6 +466,27 @@ router.route("/deleteFile").all(async (req, res, next) => {
     }
 });
 
+//删除文件
+router.route("/deleteFileByFilter").all(async (req, res, next) => {
+    if (req.body[0]) {
+        let documentids = decodeURIComponent(req.body[0].documentids).split(",");
+        let ids = req.body[0].ids;
+
+        client.documents.deleteByFilter({ filters: {"document_id": { "$in": documentids }} }).then(() => {
+            console.log("文件删除成功");
+        }).catch(error => {
+            console.error("删除文件时发生错误:", error);
+        })
+
+        p = [ids];
+        p.unshift(_mysqlLabor[0], _mysqlLabor[1], "deleteFile");
+        mysql.usselect(p, async function (ret) {
+            res.end(JSON.stringify(ret));
+        });
+
+    }
+});
+
 router.route("/getFolder").all((req, res, next) => {
     getmysql2(req, res, "getFolder", req.body.uid);
 });

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1139 - 1134
yarn.lock


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác