From c6dbd6d62b7a27cfa23023cd390f966188c01003 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Fri, 26 Sep 2025 10:55:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api/member.js | 27 + components/coupon-modal.vue | 318 ++ framework/0-conf.js | 8 +- package.json | 1 + pages/index/index.vue | 1010 +++--- pages/product/index.vue | 4344 ++++++++++++------------- pages/user/components/coupon-icon.vue | 127 + pages/user/coupon.vue | 192 +- pnpm-lock.yaml | 7 + 9 files changed, 3263 insertions(+), 2771 deletions(-) create mode 100644 components/coupon-modal.vue create mode 100644 pages/user/components/coupon-icon.vue diff --git a/common/api/member.js b/common/api/member.js index 9074f90..44101b9 100644 --- a/common/api/member.js +++ b/common/api/member.js @@ -112,4 +112,31 @@ export const APIshopUsercode = (data) => { method: 'get', data: data }) +} + +// 获取当前店铺会员信息 +export const getCouponShops = (data) => { + return request({ + url: urlMarket + '/user/coupon/shops', + method: 'get', + data: data + }) +} + +// 优惠券弹窗 +export const getCouponPopup = (data) => { + return request({ + url: urlMarket + '/user/coupon/popUp', + method: 'get', + data: data + }) +} + +// 优惠券弹窗领取 +export const receivePopUp = (data) => { + return request({ + url: urlMarket + '/user/coupon/receivePopUp', + method: 'get', + data: data + }) } \ No newline at end of file diff --git a/components/coupon-modal.vue b/components/coupon-modal.vue new file mode 100644 index 0000000..da316d8 --- /dev/null +++ b/components/coupon-modal.vue @@ -0,0 +1,318 @@ + + + + + + diff --git a/framework/0-conf.js b/framework/0-conf.js index 6186f4e..0031c6f 100644 --- a/framework/0-conf.js +++ b/framework/0-conf.js @@ -5,16 +5,16 @@ const proxyApi = "/api" // #endif // #ifdef MP-WEIXIN || APP || MP-ALIPAY -const proxyApi = 'http://192.168.0.71' // 调试地址 -const proxyApiwws = 'ws://192.168.0.71:2348' // 调试地址 +const proxyApi = 'http://192.168.1.42' // 调试地址 +const proxyApiwws = 'ws://192.168.1.42:2348' // 调试地址 // 测试 // const proxyApi = "https://fv901fw8033.vicp.fun" // const proxyApiwws = 'wss://sockets.sxczgkj.com/wss' // #endif // #ifdef H5 -const baseUrl = debug ? proxyApi : "http://192.168.0.71" -const baseUrlwws = 'ws://192.168.0.71:2348' +const baseUrl = debug ? proxyApi : "http://192.168.1.42" +const baseUrlwws = 'ws://192.168.1.42:2348' // #endif // #ifdef APP || MP-WEIXIN || MP-ALIPAY diff --git a/package.json b/package.json index 0c4b779..1f364de 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "@dcloudio/uni-app": "^2.0.2-4040520250103001", "dayjs": "^1.11.13", "jsbarcode": "^3.11.6", + "lodash": "^4.17.21", "pinia": "^2.3.1", "pinia-plugin-unistorage": "^0.1.2" } diff --git a/pages/index/index.vue b/pages/index/index.vue index 83b3903..18632b3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -3,14 +3,13 @@