From 66c6463f4441a51871c97c186a754db8633ca4f8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 5 May 2024 11:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E5=95=86?= =?UTF-8?q?=E5=9F=8E=EF=BC=9Aseckill=20=E5=AF=BC=E8=87=B4=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/promotion/seckill/seckillConfig.ts | 5 +++++ src/views/mall/promotion/seckill/activity/index.vue | 2 +- .../mall/promotion/seckill/activity/seckillActivity.data.ts | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) 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