cgserver 8.9.4 → 8.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -128,11 +128,11 @@ class Engine {
|
|
|
128
128
|
stop() {
|
|
129
129
|
}
|
|
130
130
|
getRenderHtml(req, res, datas) {
|
|
131
|
-
let
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
tmpl = "modules/" + req.module.toLowerCase() + "/" + tmpl;
|
|
131
|
+
let rootview = this._cfg.rootview || "view";
|
|
132
|
+
if (!rootview.endsWith("/")) {
|
|
133
|
+
rootview += "/";
|
|
135
134
|
}
|
|
135
|
+
let tmpl = rootview + req.controller.toLowerCase() + "/" + req.action.toLowerCase();
|
|
136
136
|
let html = this._getRenderHtml(req, res, tmpl, datas);
|
|
137
137
|
return html;
|
|
138
138
|
}
|
|
@@ -18,5 +18,5 @@ export declare class Engine {
|
|
|
18
18
|
protected _all(_req: Express.Request, _res: Express.Response): Promise<void>;
|
|
19
19
|
stop(): void;
|
|
20
20
|
getRenderHtml(req: Request, res: Response, datas: any): any;
|
|
21
|
-
protected _getRenderHtml(req: Request, res: Response, tmpl:
|
|
21
|
+
protected _getRenderHtml(req: Request, res: Response, tmpl: string, params: any): any;
|
|
22
22
|
}
|