|
@@ -8672,6 +8672,11 @@ router.route("/localPost").all((req,res,next)=>{
|
|
|
postmysqlLocal(req, res);
|
|
|
})
|
|
|
|
|
|
+//本地调用
|
|
|
+router.route("/onlinePost").all((req,res,next)=>{
|
|
|
+ postmysqlOnline(req, res);
|
|
|
+})
|
|
|
+
|
|
|
function generateAPIKey(username) {
|
|
|
let timeStamp = new Date().getTime();
|
|
|
|
|
@@ -8806,4 +8811,16 @@ postmysqlLocal = function(req, res) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+postmysqlOnline = function(req, res) {
|
|
|
+ //mode的處理
|
|
|
+ if (req.body[0]) {
|
|
|
+ p = Object.values(req.body[0]);
|
|
|
+ p.unshift(_mysqlLabor[0], _mysqlLabor[1]);
|
|
|
+ //執行存儲過程
|
|
|
+ mysql.usselect(p, function(ret) {
|
|
|
+ res.end(JSON.stringify(ret));
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
module.exports = router;
|