feat: 完成20260315用户管理3全部5个功能
1. 链接人和事:补充CKB_OPEN_API_KEY/ACCOUNT配置,新增fix-ckb批量创建获客计划API 2. 规则配置:打通DB规则与ruleEngine,新增/api/miniprogram/user-rules接口, ruleEngine改为从API动态加载规则并按enabled状态执行 3. 获客计划:修复获客数统计中personId/token不匹配导致永远为0的bug, 管理端新增"修复CKB密钥"按钮 4. 支付问题:修复钱包充值和代付分享中openId缺失导致400错误, 添加getOpenId()兜底逻辑 5. 朋友圈分享:shareToMoments改为复制文章前200字+省略号+手指箭头emoji Made-with: Cursor
This commit is contained in:
@@ -2454,17 +2454,37 @@ export function ContentPage() {
|
||||
<CardContent className="space-y-3">
|
||||
<div className="flex justify-between items-center">
|
||||
<p className="text-xs text-gray-500">添加人物时同步创建存客宝场景获客计划,配置与存客宝 API 获客一致</p>
|
||||
<Button
|
||||
size="sm"
|
||||
className="bg-[#38bdac] hover:bg-[#2da396] text-white"
|
||||
onClick={() => {
|
||||
setEditingPerson(null)
|
||||
setPersonModalOpen(true)
|
||||
}}
|
||||
>
|
||||
<Plus className="w-4 h-4 mr-2" />
|
||||
添加
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="border-amber-600 text-amber-400 hover:bg-amber-900/30 bg-transparent"
|
||||
onClick={async () => {
|
||||
try {
|
||||
const res = await post<{ success?: boolean; fixed?: number; total?: number; results?: { personId: string; name: string; apiKey?: string; error?: string }[] }>('/api/db/persons/fix-ckb', {})
|
||||
if (res?.success) {
|
||||
alert(`修复完成:${res.fixed}/${res.total} 个人物已补充 CKB 密钥`)
|
||||
loadPersons()
|
||||
} else {
|
||||
alert('修复失败')
|
||||
}
|
||||
} catch { alert('修复请求失败') }
|
||||
}}
|
||||
>
|
||||
修复 CKB 密钥
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
className="bg-[#38bdac] hover:bg-[#2da396] text-white"
|
||||
onClick={() => {
|
||||
setEditingPerson(null)
|
||||
setPersonModalOpen(true)
|
||||
}}
|
||||
>
|
||||
<Plus className="w-4 h-4 mr-2" />
|
||||
添加
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-1 max-h-[400px] overflow-y-auto">
|
||||
{persons.length > 0 && (
|
||||
|
||||
Reference in New Issue
Block a user