Commit b41048ba by Sxy

fix: 路径映射

parent 38860c4f
......@@ -24,7 +24,7 @@ module.exports = function (app) {
if (!channel) {
next()
} else {
let rtn = await chnelapi.channelHandle(channel, req.path + "/" + req.body.actionType, req.body)
let rtn = await chnelapi.channelHandle(channel, req.path + "/" + ((req.body && req.body.actionType) || ''), req.body)
if (rtn != null) {
res.end(JSON.stringify(rtn));
} else {
......@@ -36,11 +36,11 @@ module.exports = function (app) {
res.end(JSON.stringify({ status: -1, message: e }));
}
})
app.post("/login/getpiccode", async (req, res, next) => {
let captchaSve = System.getObject("service.auth.captchaSve");
let data = await captchaSve.apiGenerate({})
res.end(JSON.stringify(data));
});
app.post("/login/getpiccode", async (req, res, next) => {
let captchaSve = System.getObject("service.auth.captchaSve");
let data = await captchaSve.apiGenerate({})
res.end(JSON.stringify(data));
});
app.get('/api/:gname/:qname/:method', function (req, res) {
// var classPath = req.params["qname"];
var methodName = req.params["method"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment