Commit 2404c6dc by 王昆

gsb

parent c8c62653
......@@ -40,7 +40,7 @@ module.exports = function (app) {
if (settings.env == "dev") {
app.use(session(
{
name: 'xggadminsid',
name: 'xggpjbadminsid',
cookie: { maxAge: 3600000 },
rolling: true,
resave: false,
......@@ -53,7 +53,7 @@ module.exports = function (app) {
} else {
app.use(session(
{
name: 'xggadminsid',
name: 'xggpjbadminsid',
cookie: { maxAge: 3600000 },
rolling: true,
resave: false,
......
......@@ -11,7 +11,6 @@ module.exports = function (app) {
var user = await userSve.authByCode(opencode);
req.session.user = user;
console.log(req.session.id);
res.redirect(settings.indexPage());
});
app.get('/api/:gname/:qname/:method', function (req, res) {
......
......@@ -6,7 +6,6 @@ const redisClient = system.getObject("util.redisClient");
module.exports = function (app) {
app.all("/web/*", async function (req, res, next) {
// var xggadminsid = req.headers["xggadminsid"] || "";
// var jsonUser = await redisClient.get(xggadminsid);
var jsonUser = req.session.user;
......@@ -29,7 +28,6 @@ module.exports = function (app) {
res.end(JSON.stringify({ status: -99, msg: "no login" }));
return;
}
req.session.user = jsonUser;
req.loginUser = jsonUser;
next();
});
......
......@@ -50,7 +50,7 @@ var settings = {
},
indexPage: function() {
if(this.env == "dev") {
return "http://192.168.18.237:4001/";
return "https://xggpjb.gongsibao.com";
} else {
return "https://xggpjb.gongsibao.com";
}
......
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