diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts index e3d618f7..66857df8 100644 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -17,6 +17,11 @@ export const SeckillConfigApi = { return await request.get({ url: `/promotion/seckill-config/page`, params }) }, + // 查询秒杀时段列表 + getSimpleSeckillConfigList: async () => { + return await request.get({ url: `/promotion/seckill-config/simple-list` }) + }, + // 查询秒杀时段详情 getSeckillConfig: async (id: number) => { return await request.get({ url: `/promotion/seckill-config/get?id=` + id }) diff --git a/src/views/mall/promotion/seckill/activity/index.vue b/src/views/mall/promotion/seckill/activity/index.vue index d7686688..bffe265a 100644 --- a/src/views/mall/promotion/seckill/activity/index.vue +++ b/src/views/mall/promotion/seckill/activity/index.vue @@ -157,7 +157,7 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity' -import * as SeckillConfigApi from '@/api/mall/promotion/seckill/seckillConfig' +import { SeckillConfigApi } from '@/api/mall/promotion/seckill/seckillConfig' import SeckillActivityForm from './SeckillActivityForm.vue' import { formatDate } from '@/utils/formatTime' import { fenToYuanFormat } from '@/utils/formatter' diff --git a/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts b/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts index 3cb8ccfb..b6e64225 100644 --- a/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts +++ b/src/views/mall/promotion/seckill/activity/seckillActivity.data.ts @@ -1,6 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' -import { getSimpleSeckillConfigList } from '@/api/mall/promotion/seckill/seckillConfig' +import { dateFormatter2 } from '@/utils/formatTime' +import { SeckillConfigApi } from '@/api/mall/promotion/seckill/seckillConfig' // 表单校验 export const rules = reactive({ @@ -88,7 +88,7 @@ const crudSchemas = reactive([ valueField: 'id' } }, - api: getSimpleSeckillConfigList + api: SeckillConfigApi.getSimpleSeckillConfigList }, table: { width: 300