From f7b195b226308e4f016817a1bba5ca1a52921906 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 19 Jun 2023 10:20:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E4=BA=8B=E7=A7=92=E6=9D=80?= =?UTF-8?q?=E6=97=B6=E6=AE=B5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/seckill/seckillConfig.ts | 14 ++++++-- .../seckill/config/SeckillConfigForm.vue | 6 +--- .../mall/promotion/seckill/config/index.vue | 35 ++++++++++++++----- .../seckill/config/seckillConfig.data.ts | 14 -------- 4 files changed, 39 insertions(+), 30 deletions(-) diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts index d941ed4d..fb72936b 100644 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -3,9 +3,8 @@ import request from '@/config/axios' export interface SeckillConfigVO { id: number name: string - startTime: Date - endTime: Date - seckillActivityCount: number + startTime: string + endTime: string picUrl: string status: number } @@ -30,6 +29,15 @@ export const updateSeckillConfig = async (data: SeckillConfigVO) => { return await request.put({ url: '/promotion/seckill-config/update', data }) } +// 修改时段配置状态 +export const updateSeckillConfigStatus = (id: number, status: number) => { + const data = { + id, + status + } + return request.put({ url: '/promotion/seckill-config/update-status', data: data }) +} + // 删除秒杀时段配置 export const deleteSeckillConfig = async (id: number) => { return await request.delete({ url: '/promotion/seckill-config/delete?id=' + id }) diff --git a/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue b/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue index a4675f71..e25f8fce 100644 --- a/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue +++ b/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue @@ -8,9 +8,8 @@