From c70765bdf688e374341f73800149489b99505456 Mon Sep 17 00:00:00 2001 From: "lenovo008\\lenovo" Date: Thu, 18 Jul 2024 14:19:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(mall):=20=E6=B7=BB=E5=8A=A0=E6=8A=BD?= =?UTF-8?q?=E5=A5=96=E5=8A=9F=E8=83=BD=E5=8F=8A=E9=83=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=92=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增奖品领取页面及其相关接口。 - 添加抽奖页面及中奖结果展示页面。 - 实现抽奖规则和已获奖品的展示功能。 - 相应地在pages.json中注册了新增的页面。 - 调整了.env.development中的API基础URL。 - 优化了部分页面的样式和布局。 - 代码中删除了未使用的奖品图片资源。 BREAKING CHANGE: 删除了部分奖品图片资源,如果前端仍然引用这些图片,需要做相应的调整。 --- yudao-mall-uniapp-master/.env.development | 3 +- yudao-mall-uniapp-master/pages.json | 36 ++ .../pages/user/ActivityRules.vue | 39 ++ .../pages/user/PrizesWon.vue | 186 ++++++++ yudao-mall-uniapp-master/pages/user/prize.vue | 421 ++++++++++++++++++ .../sheep/api/prize/index.js | 43 ++ .../sheep/platform/share.js | 1 - 7 files changed, 727 insertions(+), 2 deletions(-) create mode 100644 yudao-mall-uniapp-master/pages/user/ActivityRules.vue create mode 100644 yudao-mall-uniapp-master/pages/user/PrizesWon.vue create mode 100644 yudao-mall-uniapp-master/pages/user/prize.vue create mode 100644 yudao-mall-uniapp-master/sheep/api/prize/index.js diff --git a/yudao-mall-uniapp-master/.env.development b/yudao-mall-uniapp-master/.env.development index 829ede0..def1cc3 100644 --- a/yudao-mall-uniapp-master/.env.development +++ b/yudao-mall-uniapp-master/.env.development @@ -1 +1,2 @@ - SHOPRO_DEV_BASE_URL = https://yanghaodong.51vip.biz \ No newline at end of file + # SHOPRO_DEV_BASE_URL = https://yanghaodong.51vip.biz + SHOPRO_DEV_BASE_URL = http://192.168.1.129:48080 \ No newline at end of file diff --git a/yudao-mall-uniapp-master/pages.json b/yudao-mall-uniapp-master/pages.json index 1e14b74..a1499c8 100644 --- a/yudao-mall-uniapp-master/pages.json +++ b/yudao-mall-uniapp-master/pages.json @@ -261,6 +261,42 @@ "group": "用户中心" } }, + { + "path": "prize", + "style": { + "navigationBarTitleText": "抽奖" + }, + "meta": { + "auth": true, + "sync": true, + "title": "抽奖活动", + "group": "用户中心" + } + }, + { + "path": "PrizesWon", + "style": { + "navigationBarTitleText": "已获奖品" + }, + "meta": { + "auth": true, + "sync": true, + "title": "抽奖活动", + "group": "用户中心" + } + }, + { + "path": "ActivityRules", + "style": { + "navigationBarTitleText": "活动规则" + }, + "meta": { + "auth": true, + "sync": true, + "title": "活动规则", + "group": "用户中心" + } + }, { "path": "goods-collect", "style": { diff --git a/yudao-mall-uniapp-master/pages/user/ActivityRules.vue b/yudao-mall-uniapp-master/pages/user/ActivityRules.vue new file mode 100644 index 0000000..955d7c1 --- /dev/null +++ b/yudao-mall-uniapp-master/pages/user/ActivityRules.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/yudao-mall-uniapp-master/pages/user/PrizesWon.vue b/yudao-mall-uniapp-master/pages/user/PrizesWon.vue new file mode 100644 index 0000000..2f3cd5a --- /dev/null +++ b/yudao-mall-uniapp-master/pages/user/PrizesWon.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/yudao-mall-uniapp-master/pages/user/prize.vue b/yudao-mall-uniapp-master/pages/user/prize.vue new file mode 100644 index 0000000..8b0b277 --- /dev/null +++ b/yudao-mall-uniapp-master/pages/user/prize.vue @@ -0,0 +1,421 @@ + + + + + diff --git a/yudao-mall-uniapp-master/sheep/api/prize/index.js b/yudao-mall-uniapp-master/sheep/api/prize/index.js new file mode 100644 index 0000000..6210c2c --- /dev/null +++ b/yudao-mall-uniapp-master/sheep/api/prize/index.js @@ -0,0 +1,43 @@ +import request from '@/sheep/request'; + +const PayOrderApi = { + + // 开始抽奖 + lottery: (id) => { + return request({ + url: '/promotion/prize-draw/lottery', + method: 'GET', + params: { activityId: id }, + }); + }, + // 已获奖品 + PrizesWon: (id) => { + return request({ + url: '/promotion/prize-draw/getMyPrizeLogDO', + method: 'GET', + params: { activityId: id }, + }); + }, + + + + +// 获得抽奖照片 + prizeImg: (id) => { + return request({ + url: '/promotion/prize-draw/activity-prize/list-by-activity-id', + method: 'GET', + params: { activityId:id }, + }); + }, + // 规则 + ActivityRules: (params) => { + return request({ + url: '/promotion/prize-draw/getOne', + method: 'GET', + params, + }); + }, +}; + +export default PayOrderApi; diff --git a/yudao-mall-uniapp-master/sheep/platform/share.js b/yudao-mall-uniapp-master/sheep/platform/share.js index d7b638e..d693804 100644 --- a/yudao-mall-uniapp-master/sheep/platform/share.js +++ b/yudao-mall-uniapp-master/sheep/platform/share.js @@ -68,7 +68,6 @@ const getShareInfo = ( // 构造spm分享参数 const buildSpmQuery = (params) => { const user = $store('user'); - console.log(user, 'user123'); let shareId = '0'; // 设置分享者用户ID if (typeof params.shareId === 'undefined') { if (user.isLogin) {