feat(mini-user): add configurable home banner and footer
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
HQ system settings WeChat mini config with OSS swiper/footer uploads; client-config exposes miniHome. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { parseMiniHomeBanners } from '@dukang/shared-types';
|
||||
import { SystemConfigService } from '../../common/system-config/system-config.service';
|
||||
|
||||
@Controller('common')
|
||||
@@ -8,12 +9,18 @@ export class ClientConfigController {
|
||||
@Get('client-config')
|
||||
clientConfig() {
|
||||
const cfg = this.systemConfig.getAppConfig();
|
||||
const env = this.systemConfig.getMergedEnv();
|
||||
const footer = (env.MINI_HOME_FOOTER_URL ?? '').trim();
|
||||
return {
|
||||
mockPay: cfg.mockPay,
|
||||
wechatPayEnabled: cfg.wechatPayEnabled,
|
||||
mockSms: cfg.mockSms,
|
||||
mockWechat: cfg.mockWechat,
|
||||
wxAuthorize: cfg.wxAuthorize,
|
||||
miniHome: {
|
||||
banners: parseMiniHomeBanners(env.MINI_HOME_BANNERS),
|
||||
footerUrl: footer || null,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user