Files
websopy-taro/.workbuddy/memory/2026-07-22.md
赵忠林 39d3b59434 refactor(user): 将VIP身份统一改为开发者标记
- 审核通过时不再新增角色,而是更新用户isDeveloper布尔标记
- 后端UserService新增markAsDeveloper方法,通过updateById设置isDeveloper
- UserController新增PUT接口更新开发者标记,权限使用sys:userRole:save
- 前端api新增setUserDeveloper调用新的审核接口
- vip-review页面移除角色相关代码,改为调用setUserDeveloper方法
- 约定开发者身份即sys_user.is_developer字段,不再依赖角色表记录
- app.config.ts追加开发者中心与平台管理相关页面路由
- 新增开发者中心、平台管理的多个API模块(apikey、appProduct、appDomain、developer请求等)
- 添加公共工具方法和复用组件用于开发者中心及平台管理功能
- 统一品牌名称为“威数谱软件”,更新文案及界面展现一致性
2026-07-22 14:57:03 +08:00

48 lines
4.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-07-22 工作日志
## 开发者登录弹窗 UI 美化
- 文件:`src/pages/user/about/index.tsx`
- 美化了 Input圆角12px、高度48px、柔和背景色、Button蓝色渐变、阴影、圆角14px、验证码按钮与输入框等高、倒计时优化
- 弹窗整体:圆角加大、内边距增加、宽度收窄
## 开发者登录弹窗样式改为红色系
- 文件:`src/pages/user/about/index.tsx`
- Input 边框:`transparent``#e53e3e`(红色),背景 `#f7f8fa``#fff5f5`(淡红)
- 获取验证码按钮:激活态添加 `backgroundColor: #e53e3e``borderColor: #e53e3e`
- 登录按钮:渐变从蓝色 `#4f8cff→#3b6fd4` 改为红色 `#fc5c5c→#e53e3e`,阴影同步改为红色
## 关于我们页面介绍内容改写
- 文件:`src/pages/user/about/index.tsx`
- 公司南宁市网宿信息科技有限公司品牌威数谱软件websopy
- 重写品牌故事三个段落、核心业务6项软件相关、联系我们公司名称/总部/电话/邮箱/官网)、版权信息
- 头部 Logo 文字「鑫」→「威」,版本号显示 websopy v1.0.0
## VIP 概念替换为「开发者」(文案统一)
- 起因:用户要求把 `pages/user/vip-upgrade/index` 的 VIP 概念换成「开发者」。后台审核页 `vip-review` 已定义 `VIP_ROLE_NAME='开发者'`,概念本就一致。
- 改动文件与要点:
- `vip-upgrade/index.tsx` + `index.config.ts`:导航栏/分享标题/主副标题/状态说明/温馨提示/权益区块标题及权益项描述全部「VIP会员」→「开发者」顶部图标 👑→🔰;表单标签「门店名称/门店地址」→「开发团队/公司地址」placeholder、toast 同步),底层字段 realName/address 不变。
- `user.tsx`用户中心入口「升级VIP会员」👑→「申请开发者」🔰。
- `store/center/index.tsx`门店中心入口「VIP会员审核/审核客户VIP会员申请」👑→「开发者审核/审核客户开发者申请」🔰。
- `vip-review/index.tsx`:导航栏标题、通过/驳回弹窗文案、审核说明、列表字段标签(门店名称/门店地址→开发团队/公司地址)统一为「开发者」。
- 注意:仅改可见文案与图标,**未重命名**页面路由/文件夹vip-upgrade、vip-review、变量名VIP_ROLE_CODE、pendingVipCount 等及定价逻辑dealerPrice/VIP 状态判断仍保留原标识符,因对应后端角色与缓存 key
- 用户确认方式:先给文案对照表,经 AskUserQuestion 确认表单标签与图标及范围后执行。
## VIP 升级页新增「所在城市」选择
- 文件:`src/pages/user/vip-upgrade/index.tsx``src/api/shop/shopDealerApply/model/index.ts`
- 在「办公地址」上方新增「所在城市 *」字段:复用微信原生 `Picker mode='region'`(省市区三级),与 `pages/user/address-edit.tsx` 风格一致。
- 状态:`cityValue: string[]` + 派生 `cityText`(以空格连接);`Picker``disabled` 跟随 `isReadonly`(审核中/已通过只读)。
- `ShopDealerApply` 模型新增 `city?: string`(注释:省 市 区,空格分隔)。
- 提交时 `addShopDealerApply` 增加 `city: cityText`;读取历史申请时 `setCityValue(latest.city.split(' '))`;保存校验增加「请选择所在城市」。
- 注意:仅前端扩展字段,后端是否落库 `city` 存疑(模型此前只有 address需后端 schema 支持才能真正持久化。
## vip-review 审核通过:改为「更新 user 为 developer」不新增角色
- 起因:用户要求 `pages/user/vip-review/index` 审核通过时直接把 user 标记为开发者,而不是往 `sys_user_role` 加 developer 角色。
- 后端(仓库 `/Users/gxwebsoft/JAVA/com.gxwebsoft.core`,已 `mvn -o compile` BUILD SUCCESS
- `User.isDeveloper``sys_user.is_developer`Boolean此前从未被写入正是开发者标记位。
- `UserService` 新增 `boolean markAsDeveloper(Integer userId)``UserServiceImpl` 用最小实体 `updateById``isDeveloper=true`,成功后再经 `syncMessageProducer` 同步 websopy复用 updateUser 的同步范式)。
- `UserController` 新增 `PUT /api/system/user/developer/{userId}``setDeveloper`),权限沿用 `sys:userRole:save`(与原 `addUserRole` 一致,避免店员 403 回归)。
- 前端:
- `@/api/system/user/index.ts` 新增 `setUserDeveloper(userId)``PUT /system/user/developer/{userId}`
- `vip-review/index.tsx`:移除 `addUserRole/listUserRole/listRoles/TenantId` 等角色相关 import 与 `VIP_ROLE_*``getCurrentTenantId``getVipRoleId``assignVipRole``formatDateTime``handleApprove``await assignVipRole(item.userId)` 替换为 `await setUserDeveloper(item.userId!)`
- 约定:**开发者身份 = `sys_user.is_developer` 布尔位,不是角色表记录**(已记项目 MEMORY.md