mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 14:10:29 +08:00
优化html参数
This commit is contained in:
parent
4c9ae93d21
commit
ac0b0f2740
@ -49,10 +49,12 @@ export class BaseSysParamService extends BaseService {
|
||||
* @param key
|
||||
*/
|
||||
async htmlByKey(key) {
|
||||
let html = '<html><body>@content</body></html>';
|
||||
let html = '<html><title>@title</title><body>@content</body></html>';
|
||||
let result: any = await this.cacheManager.get(`param:${key}`);
|
||||
if (result) {
|
||||
html = html.replace('@content', result.data);
|
||||
html = html
|
||||
.replace('@content', result.data)
|
||||
.replace('@title', result.name);
|
||||
} else {
|
||||
html = html.replace('@content', 'key notfound');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user