feat: 重构后台管理界面样式并新增商户/帖子审核功能
- 重构后台所有管理页面工具栏,移除图标改用纯文字按钮 - 新增商户管理的批量审核功能与商家详情/审核页面 - 新增帖子管理的批量审核/上下架功能与帖子详情/审核页面 - 新增多媒体相册字段的前后台处理逻辑 - 新增微信订阅消息兼容导出层 - 更新站点版本号并优化品牌色变量 - 新增商户/帖子控制器的详情与审核方法 - 新增 .sql 文件忽略规则
这个提交包含在:
@@ -118,6 +118,31 @@ export function catIcon(cat) {
|
||||
return categoryIconUrl(cat.id)
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求微信订阅消息授权(需在用户点击事件中调用)
|
||||
*
|
||||
* 模板 ID 由后台「系统配置 → 小程序配置」下发(/setting/ui 的 subscribe 字段)。
|
||||
* 未配置 / 非小程序环境时静默跳过,不阻断业务。
|
||||
*
|
||||
* @param {'audit'|'transfer'} scene 订阅场景标识
|
||||
* @returns {Promise<string>} 授权结果状态:accepted | reject | none | unsupported
|
||||
*/
|
||||
export function requestSubscribe(scene) {
|
||||
const id = (uiState.subscribe && uiState.subscribe[scene]) || ''
|
||||
if (!id) return Promise.resolve('none')
|
||||
if (typeof uni === 'undefined' || !uni.requestSubscribeMessage) {
|
||||
return Promise.resolve('unsupported')
|
||||
}
|
||||
|
||||
return new Promise((resolve) => {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: [id],
|
||||
success: (res) => resolve((res && res[id]) || 'accepted'),
|
||||
fail: () => resolve('reject'),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
uiState,
|
||||
applyUiConfig,
|
||||
@@ -126,4 +151,5 @@ export default {
|
||||
logoUrl,
|
||||
categoryIconUrl,
|
||||
catIcon,
|
||||
requestSubscribe,
|
||||
}
|
||||
|
||||
@@ -1,30 +1,10 @@
|
||||
/**
|
||||
* 微信订阅消息授权
|
||||
* 微信订阅消息授权(兼容导出层)
|
||||
*
|
||||
* 模板 ID 由后台「系统配置 → 小程序配置」下发(/setting/ui 的 subscribe 字段)。
|
||||
* 未配置 / 非小程序环境时静默跳过,不阻断业务。
|
||||
* 核心逻辑由 @/common/store/ui.js 统一承载。
|
||||
* 本文件保留以兼容历史模块路径导入。
|
||||
*/
|
||||
import { uiState } from '../store/ui.js'
|
||||
|
||||
/**
|
||||
* 请求订阅授权(需在用户点击事件中调用)
|
||||
* @param {'audit'|'transfer'} scene
|
||||
* @returns {Promise<string>} accepted | reject | none | unsupported
|
||||
*/
|
||||
export function requestSubscribe(scene) {
|
||||
const id = (uiState.subscribe && uiState.subscribe[scene]) || ''
|
||||
if (!id) return Promise.resolve('none')
|
||||
if (typeof uni === 'undefined' || !uni.requestSubscribeMessage) {
|
||||
return Promise.resolve('unsupported')
|
||||
}
|
||||
|
||||
return new Promise((resolve) => {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: [id],
|
||||
success: (res) => resolve((res && res[id]) || 'accepted'),
|
||||
fail: () => resolve('reject'),
|
||||
})
|
||||
})
|
||||
}
|
||||
import { requestSubscribe } from '../store/ui.js'
|
||||
|
||||
export { requestSubscribe }
|
||||
export default { requestSubscribe }
|
||||
|
||||
@@ -296,8 +296,7 @@ import distributionApi from '@/common/api/distribution.js'
|
||||
import authApi from '@/common/api/auth.js'
|
||||
import { WITHDRAW_TEXT } from '@/common/constants/ui.js'
|
||||
import { fromNow } from '@/common/utils/format.js'
|
||||
import { requestSubscribe } from '@/common/utils/subscribe.js'
|
||||
import { iconUrl, loadUiConfig, uiState } from '@/common/store/ui.js'
|
||||
import { iconUrl, loadUiConfig, uiState, requestSubscribe } from '@/common/store/ui.js'
|
||||
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
|
||||
|
||||
export default {
|
||||
@@ -1205,7 +1204,7 @@ export default {
|
||||
padding: 6rpx 18rpx;
|
||||
border-radius: 24rpx;
|
||||
background: $fc-primary;
|
||||
color: $fc-on-primary;
|
||||
color: $fc-primary-ink;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -286,9 +286,8 @@ import FcAreaPicker from '@/components/fc-area-picker/fc-area-picker.vue'
|
||||
import homeApi from '@/common/api/home.js'
|
||||
import postApi from '@/common/api/post.js'
|
||||
import { useUserStore } from '@/common/store/index.js'
|
||||
import { iconUrl, categoryIconUrl, loadUiConfig } from '@/common/store/ui.js'
|
||||
import { iconUrl, categoryIconUrl, loadUiConfig, requestSubscribe } from '@/common/store/ui.js'
|
||||
import { pay } from '@/common/utils/pay.js'
|
||||
import { requestSubscribe } from '@/common/utils/subscribe.js'
|
||||
import { assetUrl } from '@/common/utils/format.js'
|
||||
import config from '@/common/config/index.js'
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ $uni-font-size-paragraph:15px;
|
||||
|
||||
/* 品牌主色 · 春绿(Spring Green = 设计稿 #00E070) */
|
||||
$fc-primary: #00e070; // 品牌亮绿(面:按钮底 / 选中态 / 徽章 / 装饰)
|
||||
$fc-primary-ink: #04301e; // 亮绿面上的字(8.2:1,替代白字)
|
||||
$fc-primary-ink: #04301e; // 亮绿面上的字(8.2:1,替代白字)
|
||||
$fc-on-primary: $fc-primary-ink; // 兼容别名:亮绿面上的字(#04301E)
|
||||
$fc-primary-text: #04874a; // 白底上的绿字 / 强调文字(4.6:1)
|
||||
$fc-primary-light: #5cf3a6; // 主色浅(描边 / 次级强调 / 图标高光)
|
||||
$fc-primary-lighter: #e4fdf0; // 主色极浅(浅底块 / 选中底)
|
||||
|
||||
在新工单中引用
屏蔽一个用户