|
|
@@ -5,6 +5,8 @@
|
|
|
|
|
|
import BaseController from "../../common/base/base_controller";
|
|
|
const projectModel = require("../../pm/models/project_model");
|
|
|
+import OptionsDao from '../../options/models/optionsModel';
|
|
|
+import optionSetting from '../../options/models/optionTypes';
|
|
|
let config = require("../../../config/config.js");
|
|
|
module.exports =function (app) {
|
|
|
const baseController = new BaseController();
|
|
|
@@ -22,6 +24,11 @@ module.exports =function (app) {
|
|
|
//允许协作的项目允许编辑,非只读
|
|
|
projectReadOnly = !projectCooperate;
|
|
|
}
|
|
|
+ let optionsDao = new OptionsDao();
|
|
|
+ let options = await optionsDao.getOptions(req.session.sessionUser.id, req.session.sessionCompilation._id);
|
|
|
+ if(options){
|
|
|
+ options = await optionsDao.saveOptions(req.session.sessionUser.id, req.session.sessionCompilation._id, optionSetting);
|
|
|
+ }
|
|
|
res.render('building_saas/main/html/main.html',
|
|
|
{
|
|
|
userAccount: req.session.userAccount,
|
|
|
@@ -32,6 +39,7 @@ module.exports =function (app) {
|
|
|
projectReadOnly: projectReadOnly,
|
|
|
projectCooperate: projectCooperate,
|
|
|
LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
|
|
|
+ options:JSON.stringify(options),
|
|
|
overWriteUrl:req.session.sessionCompilation.overWriteUrl
|
|
|
});
|
|
|
} else {
|