feat(admin): 新增后台管理端商品浏览记录页面和删除接口
- 新增后端 ShopGoodsBrowseController 的 /admin/{id} 删除接口,支持管理端删除
- 原删除接口 /{id} 继续限定当前用户权限
- 新增前端管理端页面及相关类型和接口文件,实现浏览记录的列表展示和搜索功能
- 管理后台菜单通过 sys_menu 表动态配置,新增商品浏览记录菜单项
- 前端请求后端返回数据结构规范调整,使用 res.data.code 和 res.data.data
- 后端编译通过,前端类型校验无错误
- 需后端重新部署并配置后台菜单实现功能
fix(privacy): 简化微信隐私协议弹窗逻辑
- 当用户已在登录页勾选同意隐私协议时,不再弹出授权确认窗口
- 在 wxAny.onNeedPrivacyAuthorization 中直接 resolve 同意,提升用户体验
This commit is contained in:
19
src/app.tsx
19
src/app.tsx
@@ -24,25 +24,12 @@ function App(props: AppProps) {
|
||||
}
|
||||
|
||||
// 微信隐私协议(基础库 3.16.1+ 强制)
|
||||
// 当小程序使用 chooseImage/chooseMedia/getLocation 等接口时,若用户未在隐私协议中同意,
|
||||
// 微信会回调这里,开发者必须弹一个自定义的协议确认弹窗,并提供"同意并继续"/"拒绝"两个分支。
|
||||
// 用户已在登录页底部勾选同意《用户协议》和《隐私政策》,
|
||||
// 此处直接 resolve agree,不再弹自定义授权窗口。
|
||||
const wxAny: any = Taro
|
||||
if (typeof wxAny.onNeedPrivacyAuthorization === 'function') {
|
||||
wxAny.onNeedPrivacyAuthorization((resolve: any) => {
|
||||
wxAny.showModal({
|
||||
title: '用户隐私协议',
|
||||
content: '为了正常使用图片上传、拍照、定位等功能,需要您同意《用户隐私协议》。',
|
||||
confirmText: '同意',
|
||||
cancelText: '拒绝',
|
||||
success: (modalRes: any) => {
|
||||
if (modalRes.confirm) {
|
||||
resolve({ event: 'agree', button: 'agree' })
|
||||
} else {
|
||||
resolve({ event: 'disagree' })
|
||||
}
|
||||
},
|
||||
fail: () => resolve({ event: 'disagree' }),
|
||||
})
|
||||
resolve({ event: 'agree', button: 'agree' })
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user