fix: 注册 user-rules 和 shensheshou 路由,修复规则配置保存失败
- 将 /api/db/user-rules 的 GET/POST/PUT/DELETE 路由注册到 db 组 - 将 /api/admin/shensheshou/* 的 4 个路由注册到 admin 组 - 包含上次对话的头像 URL 修复(normalizeImageUrl 全栈) Made-with: Cursor
This commit is contained in:
@@ -151,6 +151,15 @@ const hideLoading = () => {
|
||||
wx.hideLoading()
|
||||
}
|
||||
|
||||
// 修复图片 URL 中 protocol 缺少冒号的问题(如 "https//..." → "https://...")
|
||||
const normalizeImageUrl = (url) => {
|
||||
if (!url || typeof url !== 'string') return ''
|
||||
let s = url.trim()
|
||||
if (!s) return ''
|
||||
s = s.replace(/^(https?)\/\//, '$1://')
|
||||
return s
|
||||
}
|
||||
|
||||
// 显示确认框
|
||||
const showConfirm = (title, content) => {
|
||||
return new Promise((resolve) => {
|
||||
@@ -174,6 +183,7 @@ module.exports = {
|
||||
isValidWechat,
|
||||
deepClone,
|
||||
getQueryParams,
|
||||
normalizeImageUrl,
|
||||
storage,
|
||||
showToast,
|
||||
showLoading,
|
||||
|
||||
Reference in New Issue
Block a user