Browse Source

分配案例

zengyicheng 2 năm trước cách đây
mục cha
commit
2d1fdf8093
1 tập tin đã thay đổi với 12 bổ sung2 xóa
  1. 12 2
      pbl.js

+ 12 - 2
pbl.js

@@ -113,7 +113,7 @@ router.route('/phoneLogin').all((req, res, next) => {
         _password.unshift(_mysqluser[0], _mysqluser[1], "selectPassword");
 
         mysql.usselect(_password, function(ret) {
-            if(ret[0].length){
+            if (ret[0].length) {
                 var _ret = ret
                 var paJ = _ret[0][0].password
                 let uid = _ret[0][0].userid
@@ -131,7 +131,7 @@ router.route('/phoneLogin').all((req, res, next) => {
                         res.end(JSON.stringify([{ status: "0" }]));
                     }
                 })
-            }else{
+            } else {
                 res.end(JSON.stringify([{ status: "0" }]));
             }
         });
@@ -1603,6 +1603,16 @@ router.route('/selectAnliList').all((req, res, next) => {
     getmysql(req, res, "selectAnliList", json["typea"], json["typeb"], json["typec"], json["typed"], json["typeE"], json["cn"], json["page"], 10);
 });
 
+//分配案例
+router.route('/insertCase').all((req, res, next) => {
+    if (req.body[0]) {
+        p = [req.body[0].uid, req.body[0].box];
+        p.unshift(_mysqlLabor[0], _mysqlLabor[1], "insertCase"); //執行存儲過程
+        mysql.usselect(p, function(ret) {
+            res.end(JSON.stringify({ success: 1 }));
+        });
+    }
+});