feat(cms): 新增广告位查询接口和主题字段支持
- 新增根据code查询广告位的API接口 - 在网站字段模型中添加theme主题字段 - 实现启动时自动设置用户主题功能 - 移除调试用的邀请信息打印逻辑 -优化导入路径引用方式
This commit is contained in:
@@ -100,3 +100,16 @@ export async function getCmsAd(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询广告位
|
||||
*/
|
||||
export async function getCmsAdByCode(code: string) {
|
||||
const res = await request.get<ApiResult<CmsAd>>(
|
||||
'/cms/cms-ad/getByCode/' + code
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ export interface Config {
|
||||
loginBgImg?: string;
|
||||
address?: string;
|
||||
tel?: string;
|
||||
theme?: string;
|
||||
workDay?: string;
|
||||
kefu2?: string;
|
||||
kefu1?: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
|
||||
Reference in New Issue
Block a user