From 7f976681e4ed1387154644e50c09ea0a72318fc1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 18 Jun 2023 21:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A7=92=E6=9D=80=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/promotion/seckill.js | 16 +- pages/activity/goods_seckill/index.vue | 220 ++++++++++-------- .../activity/goods_seckill_details/index.vue | 8 +- 3 files changed, 137 insertions(+), 107 deletions(-) diff --git a/api/promotion/seckill.js b/api/promotion/seckill.js index 25a56af5..5c5dde2b 100644 --- a/api/promotion/seckill.js +++ b/api/promotion/seckill.js @@ -1,12 +1,26 @@ import request from "@/utils/request.js"; +// 获得秒杀时间段列表 +export function getSeckillConfigList() { + return request.get("app-api/promotion/seckill-config/list", {}, { + noAuth: true // TODO 芋艿:后续要做调整 + }); +} + // 获得当前秒杀活动 -export function getNowSeckillActivity(id) { +export function getNowSeckillActivity() { return request.get("app-api/promotion/seckill-activity/get-now", {}, { noAuth: true // TODO 芋艿:后续要做调整 }); } +// 获得秒杀活动分页 +export function getSeckillActivityPage(data) { + return request.get("app-api/promotion/seckill-activity/page", data, { + noAuth: true // TODO 芋艿:后续要做调整 + }); +} + // 获得秒杀活动明细 export function getSeckillActivity(id) { return request.get("app-api/promotion/seckill-activity/get-detail", { diff --git a/pages/activity/goods_seckill/index.vue b/pages/activity/goods_seckill/index.vue index 47f2af7c..2b944554 100644 --- a/pages/activity/goods_seckill/index.vue +++ b/pages/activity/goods_seckill/index.vue @@ -5,18 +5,21 @@ + + - + - + - - + + + @@ -24,41 +27,45 @@ - - {{item.time.split(',')[0]}} - {{item.statusName}} + + {{ item.startTime }} + 即将开始 + 进行中 + 已结束 + + - + - {{item.title}} + {{item.name}} - {{item.price}} - ¥{{item.otPrice}} + {{ fen2yuan(item.seckillPrice ) }} + ¥{{ fen2yuan(item.marketPrice) }} - 限量 {{item.quota}} {{item.unitName}} + 限量 {{ item.stock}} {{item.unitName}} - - 已抢{{item.percent}}% + + 已抢{{ item.percent }}% - 马上抢 - 未开始 + 马上抢 + 未开始 已结束 - + @@ -66,114 +73,125 @@ -