From ecb9144a2ec9bae1ab6a29fc550b31409e68851e Mon Sep 17 00:00:00 2001 From: "lenovo008\\lenovo" Date: Thu, 25 Jul 2024 09:01:51 +0800 Subject: [PATCH] feat(prize): add lucky five selection page and API - Add new pages for lucky five selection in user center. - Implement API endpoints for getting today's lucky five results and ranking. - Update menu list in user/discounts page to include lucky five selection. - Refactor prize API to include new endpoints for lucky five functionality. --- yudao-mall-uniapp-master/pages.json | 24 +++ .../pages/user/alternative.vue | 152 ++++++++++++++++++ .../pages/user/discounts.vue | 81 ++++++++++ .../sheep/api/prize/index.js | 29 +++- 4 files changed, 279 insertions(+), 7 deletions(-) create mode 100644 yudao-mall-uniapp-master/pages/user/alternative.vue create mode 100644 yudao-mall-uniapp-master/pages/user/discounts.vue diff --git a/yudao-mall-uniapp-master/pages.json b/yudao-mall-uniapp-master/pages.json index 77c041b..9761d30 100644 --- a/yudao-mall-uniapp-master/pages.json +++ b/yudao-mall-uniapp-master/pages.json @@ -273,6 +273,30 @@ "group": "用户中心" } }, + { + "path": "discounts", + "style": { + "navigationBarTitleText": "活动" + }, + "meta": { + "auth": true, + "sync": true, + "title": "活动", + "group": "用户中心" + } + }, + { + "path": "alternative", + "style": { + "navigationBarTitleText": "幸运五选一" + }, + "meta": { + "auth": true, + "sync": true, + "title": "幸运五选一", + "group": "用户中心" + } + }, { "path": "PrizesWon", "style": { diff --git a/yudao-mall-uniapp-master/pages/user/alternative.vue b/yudao-mall-uniapp-master/pages/user/alternative.vue new file mode 100644 index 0000000..c0faf10 --- /dev/null +++ b/yudao-mall-uniapp-master/pages/user/alternative.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/yudao-mall-uniapp-master/pages/user/discounts.vue b/yudao-mall-uniapp-master/pages/user/discounts.vue new file mode 100644 index 0000000..b510b1a --- /dev/null +++ b/yudao-mall-uniapp-master/pages/user/discounts.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/yudao-mall-uniapp-master/sheep/api/prize/index.js b/yudao-mall-uniapp-master/sheep/api/prize/index.js index 6210c2c..6c3daac 100644 --- a/yudao-mall-uniapp-master/sheep/api/prize/index.js +++ b/yudao-mall-uniapp-master/sheep/api/prize/index.js @@ -1,7 +1,6 @@ import request from '@/sheep/request'; const PayOrderApi = { - // 开始抽奖 lottery: (id) => { return request({ @@ -18,16 +17,12 @@ const PayOrderApi = { params: { activityId: id }, }); }, - - - - -// 获得抽奖照片 + // 获得抽奖照片 prizeImg: (id) => { return request({ url: '/promotion/prize-draw/activity-prize/list-by-activity-id', method: 'GET', - params: { activityId:id }, + params: { activityId: id }, }); }, // 规则 @@ -38,6 +33,26 @@ const PayOrderApi = { params, }); }, + + // 五占一接口-------------------------------- + + // 今日已出线列表 + wzyycx: (params) => { + return request({ + url: '/member/distribution-log/outTodaypage', + method: 'GET', + params, + }); + }, + + // 排名 + ranking: (params) => { + return request({ + url: '/member/distribution-log/getUserId', + method: 'GET', + params, + }); + }, }; export default PayOrderApi;