From 4734724ed245521e4fbe253c50652dc08687fd71 Mon Sep 17 00:00:00 2001 From: linda Date: Wed, 28 Oct 2026 16:51:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8E=E7=AB=AF=E8=A1=A5=E9=BD=90?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=89=80=E9=9C=80=E6=A8=A1=E5=9D=97=20+=20?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=99=BB=E5=BD=95=E9=A1=B5=E5=93=81=E7=89=8C?= =?UTF-8?q?=E5=8C=96=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端(补齐前端已入口但无接口的模块): - Coupon 控制器:center 领券中心 / my 我的券(未使用·已使用·已过期+计数)/ receive 领取 含库存与过期校验、重复领取拦截、领券后自动发消息 - Message 控制器:index 列表(分类筛选)/ read 单条已读 / readAll 全部已读 / unread 角标 支持 user 与 master 两种归属 前端(对应页面,全部接真接口): - pages/address/list 服务地址:列表 / 新增·编辑弹层 / 设为默认 / 删除 - pages/coupon/coupon 领券中心 + 我的券(双 Tab + 状态筛选 + 计数) - pages/message/message 消息中心:分类 / 未读圆点 / 点开自动已读 / 全部已读 / 跳订单 - mine.vue 三个入口(地址·优惠券·消息)由「开发中」改为真实路由 - merchant/workbench 服务地址入口接真实路由 - 首页 TabBar「消息」接入消息中心 - api.js 新增 coupon/message 共 7 个接口 后台登录页(UI 与前端主色调统一): - 左侧橙金渐变品牌区:logo 徽标 + 「优匠优服」立体字 + slogan + 460万+/99.9%/1762万 平台实力 + 保障条 - 右侧白色登录卡:橙色渐变按钮、圆角输入框、错误提示条 - 保留 FastAdmin 全部挂钩(token/验证码/keeplogin/@AdminLoginFormBegin 等 14 项) 验证:5 套用例 178 项断言全通过(47+65+27+24+15),配置自检 8/8 --- YJYF/YJYF.vue | 5 + pages.json | 16 ++ pages/address/list.vue | 167 ++++++++++++ pages/coupon/coupon.vue | 132 +++++++++ pages/merchant/workbench.vue | 2 +- pages/message/message.vue | 93 +++++++ pages/mine/mine.vue | 6 +- .../application/admin/view/index/login.html | 251 +++++++++--------- server/application/api/controller/Coupon.php | 133 ++++++++++ server/application/api/controller/Message.php | 114 ++++++++ tests/phase4_coupon_message.js | 85 ++++++ utils/api.js | 11 + 12 files changed, 890 insertions(+), 125 deletions(-) create mode 100644 pages/address/list.vue create mode 100644 pages/coupon/coupon.vue create mode 100644 pages/message/message.vue mode change 100755 => 100644 server/application/admin/view/index/login.html create mode 100644 server/application/api/controller/Coupon.php create mode 100644 server/application/api/controller/Message.php create mode 100644 tests/phase4_coupon_message.js diff --git a/YJYF/YJYF.vue b/YJYF/YJYF.vue index 7bd3086..d4c66fd 100644 --- a/YJYF/YJYF.vue +++ b/YJYF/YJYF.vue @@ -290,6 +290,11 @@ uni.navigateTo({ url: '/pages/order/list' }) return } + if (i === 2) { + if (!needLogin()) return + uni.navigateTo({ url: '/pages/message/message' }) + return + } if (i === 3) { onUser() return diff --git a/pages.json b/pages.json index ee7f627..c897d42 100644 --- a/pages.json +++ b/pages.json @@ -38,6 +38,22 @@ "path": "pages/order/review", "style": { "navigationBarTitleText": "服务评价" } }, + { + "path": "pages/address/list", + "style": { "navigationBarTitleText": "服务地址" } + }, + { + "path": "pages/coupon/coupon", + "style": { "navigationBarTitleText": "优惠券" } + }, + { + "path": "pages/message/message", + "style": { + "navigationBarTitleText": "消息中心", + "enablePullDownRefresh": true, + "backgroundTextStyle": "dark" + } + }, { "path": "pages/master/apply", "style": { "navigationBarTitleText": "师傅入驻" } diff --git a/pages/address/list.vue b/pages/address/list.vue new file mode 100644 index 0000000..8e55f72 --- /dev/null +++ b/pages/address/list.vue @@ -0,0 +1,167 @@ + + + + + + diff --git a/pages/coupon/coupon.vue b/pages/coupon/coupon.vue new file mode 100644 index 0000000..0907cdf --- /dev/null +++ b/pages/coupon/coupon.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/pages/merchant/workbench.vue b/pages/merchant/workbench.vue index d2ac3da..0de5aca 100644 --- a/pages/merchant/workbench.vue +++ b/pages/merchant/workbench.vue @@ -73,7 +73,7 @@ { key: 'orders', name: '企业订单', icon: '单', bg: '#EAF2FF', color: '#4A7CFF', action: () => go('/pages/order/list') }, { key: 'invoice', name: '开具发票', icon: '票', bg: '#E8F7EE', color: '#2FA84F', action: () => go('/pages/merchant/invoice') }, { key: 'profile', name: '企业资料', icon: '档', bg: '#F0EBFF', color: '#7A5AF8', action: () => go('/pages/merchant/apply') }, - { key: 'address', name: '服务地址', icon: '址', bg: '#FFF0F0', color: '#E8331B', action: () => uni.showToast({ title: '地址管理开发中', icon: 'none' }) }, + { key: 'address', name: '服务地址', icon: '址', bg: '#FFF0F0', color: '#E8331B', action: () => go('/pages/address/list') }, { key: 'service', name: '联系客服', icon: '服', bg: '#EAF6FF', color: '#2A8FD8', action: () => uni.makePhoneCall({ phoneNumber: '4000000000' }) } ]; diff --git a/pages/message/message.vue b/pages/message/message.vue new file mode 100644 index 0000000..932c2d5 --- /dev/null +++ b/pages/message/message.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index 73eeeeb..a8a78c6 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -51,13 +51,13 @@ 我的订单› - + 服务地址› - + 优惠券› - + 消息中心› diff --git a/server/application/admin/view/index/login.html b/server/application/admin/view/index/login.html old mode 100755 new mode 100644 index a21d420..f56b2ac --- a/server/application/admin/view/index/login.html +++ b/server/application/admin/view/index/login.html @@ -4,139 +4,148 @@ {include file="common/meta" /} {if $background} - + {/if} -
-