sync: 同步总仓库 luoguang/monkey-ai weiyuan@bfdfb339 的 web/ 改动

同步基准:总仓库 a2ca13cb(= 本仓库初始导入 d8f3aee2)
范围:a2ca13cb..bfdfb339 中触及 web/ 的提交(不含 web/.claude/settings.local.json)

- 8490ac02 feat(aliyun): integrate Wan 3 and Qwen Image models
- 2aff08ec perf(analytics): 运营看板概览改读汇总表,首屏从 19s 降到 0.4s
- dc69335e feat(experience): 体验中心图像/视频创作升级(能力 schema、估价、新创作台)
- b059c657 fix(org): 下线 /org/create 自助加入企业页与 POST /api/org/join
- 4fcf47e6 fix(i18n): 修复中/英/韩/繁体多语言错乱,补齐日/越/泰译文
- e4c301d5 fix: merge enterprise task record date filters
- c9369b95 feat: expose enterprise image and video task records
- a410fee5 feat(claude): 无断点请求自动注入 cache_control 断点(方案 2)
- 521b3376 feat(claude): 缓存命中率优化——上游粘性路由 + 缓存时长强制改写
- 73b615dd feat(pricing): 企业成员不论登录身份均按所属企业等级计价与扣费
- f73f55c3 feat(client): 新增 WeyAi 版本说明管理与公开读取接口
- 8cdf1994 fix(topup): reset amount when switching from PayPal
- 93a4ac34 feat(baidu): configure Seedance liveness header by channel
- cb1818c5 fix(weyai): 按评审修正内容清理竞态、默认适用端与中文退回(M21)
- 04214d83 feat(weyai): WeyAi 内容管理与客户端内容接口(M21 第二部分)
- e3c4a57c feat(weyai): 设置页新增 WeyAi 页签与内容专用 COS 桶(M21 第一部分)
- b5ee8e70 fix(auth): 会话角色/状态以 DB 为准,修复提升管理员后管理接口报权限不足
- e4618fc2 fix: 修复企业看板日志聚合死循环导致 CPU 打满,并降低看板查询开销
- 584aad52 style(web): 个人中心侧边栏按 prettier 换行
- b8d87064 fix: 小程序教程隐藏充值后保留原步骤编号,企业充值判断直接用 isMiniProgramWebView
- eee7f5b2 fix: 小程序里企业首页不落到充值页,隐藏钱包入口与教程充值步骤
- 8b254d49 fix: 小程序里隐藏企业充值入口与页面
- a67661b4 fix(web): 小程序里个人中心默认页跳过充值和发票,避免来回跳转
- cff6c543 feat(web): WeyAi 小程序里打开个人中心时不出现充值和开票
- c6c99eb6 feat(billing): Claude 全部缓存写入统一按 1h 倍率计费
- 0699d1bf fix(web): 小程序 web-view 里注册页同样只显示站内方式
- 04853331 feat(web): WeyAi 小程序 web-view 里登录页只显示站内登录方式
This commit is contained in:
qiubaishen
2026-11-10 11:05:34 +08:00
parent d8f3aee261
commit 6160a23117
275 changed files with 38656 additions and 7694 deletions
@@ -225,7 +225,12 @@ export default function SettingsPaymentGatewayPayPal(props) {
if (!response.data.success)
throw new Error(response.data.message || t('查询失败'));
const data = response.data.data;
showSuccess(`${tradeNo}:PayPal 状态 ${data.remote_status}`);
showSuccess(
t('{{tradeNo}}:PayPal 状态 {{status}}', {
tradeNo,
status: data.remote_status,
}),
);
setSelectedOperationOrderKeys((keys) =>
keys.filter((key) => key !== String(tradeNo)),
);
@@ -326,7 +331,12 @@ export default function SettingsPaymentGatewayPayPal(props) {
(item) => !item.success,
);
showSuccess(
`批量${operation === 'inspect' ? '查询' : '对账'}完成:成功 ${data.succeeded || 0} 笔,失败 ${data.failed || 0} 笔`,
t(
operation === 'inspect'
? t('批量查询完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔')
: '批量对账完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔',
{ succeeded: data.succeeded || 0, failed: data.failed || 0 },
),
);
if (failedResults.length > 0) {
showError(
@@ -356,8 +366,8 @@ export default function SettingsPaymentGatewayPayPal(props) {
setBatchForceConfirmed(false);
setBatchExpireReason(
force
? '管理员确认远端状态无法核验,强制关闭所选 PayPal 订单'
: '确认所选 PayPal 订单均未完成支付',
? t('管理员确认远端状态无法核验,强制关闭所选 PayPal 订单')
: t('确认所选 PayPal 订单均未完成支付'),
);
};
@@ -390,7 +400,12 @@ export default function SettingsPaymentGatewayPayPal(props) {
(item) => !item.success,
);
showSuccess(
`批量${batchExpire.force ? '强制' : ''}过期完成:成功 ${data.succeeded || 0} 笔,失败 ${data.failed || 0} 笔`,
t(
batchExpire.force
? t('批量强制过期完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔')
: '批量过期完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔',
{ succeeded: data.succeeded || 0, failed: data.failed || 0 },
),
);
if (failedResults.length > 0) {
showError(
@@ -527,7 +542,9 @@ export default function SettingsPaymentGatewayPayPal(props) {
<Form.Section text={t('PayPal 设置')}>
<Banner
type='info'
description={`${t('Webhook 地址')}:${webhookBase}/api/paypal/webhook`}
description={t('Webhook 地址:{{url}}', {
url: `${webhookBase}/api/paypal/webhook`,
})}
/>
{isRoot() && (
<>
@@ -614,12 +631,13 @@ export default function SettingsPaymentGatewayPayPal(props) {
type={operations?.pending_count ? 'warning' : 'success'}
description={
operations
? `配置切换预检:${operations.pending_count || 0} 笔 PayPal pending 订单;${
? t(
operations.can_change_config
? '可以切换环境或应用配置'
: '请先隐藏新订单并完成历史订单排空'
}`
: '正在读取 PayPal 配置切换预检状态'
? t('配置切换预检:{{n}} 笔 PayPal pending 订单;可以切换环境或应用配置')
: '配置切换预检:{{n}} 笔 PayPal pending 订单;请先隐藏新订单并完成历史订单排空',
{ n: operations.pending_count || 0 },
)
: t('正在读取 PayPal 配置切换预检状态')
}
style={{ marginTop: 16 }}
/>
@@ -629,7 +647,9 @@ export default function SettingsPaymentGatewayPayPal(props) {
style={{ marginTop: 12 }}
>
<Text type='tertiary'>
已选 {selectedOperationOrderKeys.length} 笔
{t('已选 {{n}} 笔', {
n: selectedOperationOrderKeys.length,
})}
</Text>
<Button
size='small'
@@ -637,7 +657,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
disabled={selectedOperationOrderKeys.length === 0}
onClick={() => runBatchOperation('inspect')}
>
批量查询远端状态
{t('批量查询远端状态')}
</Button>
<Button
size='small'
@@ -646,7 +666,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
disabled={selectedOperationOrderKeys.length === 0}
onClick={() => runBatchOperation('reconcile')}
>
批量触发对账
{t('批量触发对账')}
</Button>
<Button
size='small'
@@ -655,7 +675,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
disabled={selectedOperationOrderKeys.length === 0}
onClick={() => openBatchExpire(false)}
>
批量确认过期
{t('批量确认过期')}
</Button>
<Button
size='small'
@@ -664,7 +684,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
disabled={selectedOperationOrderKeys.length === 0}
onClick={() => openBatchExpire(true)}
>
批量强制过期
{t('批量强制过期')}
</Button>
</div>
)}
@@ -691,17 +711,17 @@ export default function SettingsPaymentGatewayPayPal(props) {
scroll={{ x: 900 }}
style={{ marginTop: 12 }}
columns={[
{ title: '本地订单号', dataIndex: 'trade_no' },
{ title: t('本地订单号'), dataIndex: 'trade_no' },
{ title: 'PayPal Order ID', dataIndex: 'third_trade_no' },
{ title: '环境', dataIndex: 'payment_environment' },
{ title: t('环境'), dataIndex: 'payment_environment' },
{
title: '创建时间',
title: t('创建时间'),
dataIndex: 'create_time',
render: (value) =>
value ? new Date(value * 1000).toLocaleString() : '-',
},
{
title: '操作',
title: t('操作'),
render: (_, row) => (
<div className='flex flex-wrap gap-2'>
<Button
@@ -709,7 +729,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
htmlType='button'
onClick={() => inspectOperationOrder(row.trade_no)}
>
查询远端状态
{t('查询远端状态')}
</Button>
<Button
size='small'
@@ -720,7 +740,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
}
disabled={!row.third_trade_no}
>
触发对账
{t('触发对账')}
</Button>
<Button
size='small'
@@ -730,10 +750,10 @@ export default function SettingsPaymentGatewayPayPal(props) {
setExpireOrder(row);
setForceExpire(false);
setForceExpireConfirmed(false);
setExpireReason('确认该订单未完成 PayPal 支付');
setExpireReason(t('确认该订单未完成 PayPal 支付'));
}}
>
确认未付款并过期
{t('确认未付款并过期')}
</Button>
<Button
size='small'
@@ -744,11 +764,13 @@ export default function SettingsPaymentGatewayPayPal(props) {
setForceExpire(true);
setForceExpireConfirmed(false);
setExpireReason(
'管理员确认远端状态无法核验,强制关闭该 PayPal 订单',
t(
'管理员确认远端状态无法核验,强制关闭该 PayPal 订单',
),
);
}}
>
强制过期
{t('强制过期')}
</Button>
</div>
),
@@ -763,7 +785,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
onClick={() => refreshOperations(operationsPage)}
style={{ marginTop: 12 }}
>
刷新配置切换预检
{t('刷新配置切换预检')}
</Button>
</>
)}
@@ -848,7 +870,9 @@ export default function SettingsPaymentGatewayPayPal(props) {
type={fxStatus?.latest_valid ? 'success' : 'warning'}
description={
fxStatus?.latest_valid
? `${t('当前市场汇率')}:1 USD = ${fxStatus.latest_valid.market_rate} CNY`
? t('当前市场汇率:1 USD = {{rate}} CNY', {
rate: fxStatus.latest_valid.market_rate,
})
: t('暂无可用的市场汇率快照')
}
style={{ marginTop: 16 }}
@@ -868,25 +892,25 @@ export default function SettingsPaymentGatewayPayPal(props) {
</Form>
<Modal
title={
forceExpire ? '确认强制过期 PayPal 订单' : '确认 PayPal 订单过期'
forceExpire ? t('确认强制过期 PayPal 订单') : t('确认 PayPal 订单过期')
}
visible={Boolean(expireOrder)}
onCancel={() => setExpireOrder(null)}
onOk={expireOperationOrder}
okText='确认过期'
cancelText='取消'
okText={t('确认过期')}
cancelText={t('取消')}
>
{expireOrder && (
<div className='space-y-3'>
<Text>
订单:<strong>{expireOrder.trade_no}</strong>
{t('订单')}:<strong>{expireOrder.trade_no}</strong>
</Text>
<Banner
type={forceExpire ? 'danger' : 'warning'}
description={
forceExpire
? '强制过期会绕过远端查询失败或仍可支付状态,可能导致 PayPal 后续付款无法入账。已确认完成支付的订单仍会被拒绝。'
: '系统会再次查询 PayPal 远端状态;如果已完成支付,将拒绝过期操作。请确认未付款后再提交。'
? t('强制过期会绕过远端查询失败或仍可支付状态,可能导致 PayPal 后续付款无法入账。已确认完成支付的订单仍会被拒绝。')
: t('系统会再次查询 PayPal 远端状态;如果已完成支付,将拒绝过期操作。请确认未付款后再提交。')
}
/>
{forceExpire && (
@@ -898,7 +922,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
)
}
>
我确认已核对 PayPal 后台或业务记录,同意强制关闭该订单
{t('我确认已核对 PayPal 后台或业务记录,同意强制关闭该订单')}
</Checkbox>
)}
<TextArea
@@ -911,7 +935,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
)
}
rows={3}
placeholder='填写处置原因,至少 6 个字符'
placeholder={t('填写处置原因,至少 6 个字符')}
/>
</div>
)}
@@ -919,24 +943,28 @@ export default function SettingsPaymentGatewayPayPal(props) {
<Modal
title={
batchExpire?.force
? '确认批量强制过期 PayPal 订单'
: '确认批量 PayPal 订单过期'
? t('确认批量强制过期 PayPal 订单')
: t('确认批量 PayPal 订单过期')
}
visible={Boolean(batchExpire)}
onCancel={() => setBatchExpire(null)}
onOk={confirmBatchExpire}
okText='确认批量过期'
cancelText='取消'
okText={t('确认批量过期')}
cancelText={t('取消')}
>
{batchExpire && (
<div className='space-y-3'>
<Text>已选择 {batchExpire.tradeNos.length} 笔 PayPal 订单。</Text>
<Text>
{t('已选择 {{n}} 笔 PayPal 订单。', {
n: batchExpire.tradeNos.length,
})}
</Text>
<Banner
type={batchExpire.force ? 'danger' : 'warning'}
description={
batchExpire.force
? '批量强制过期会绕过远端查询失败或仍可支付状态;已确认完成支付的订单仍会逐笔拒绝。'
: '系统会逐笔查询 PayPal 远端状态,已完成或仍可支付的订单会逐笔失败并返回原因。'
? t('批量强制过期会绕过远端查询失败或仍可支付状态;已确认完成支付的订单仍会逐笔拒绝。')
: t('系统会逐笔查询 PayPal 远端状态,已完成或仍可支付的订单会逐笔失败并返回原因。')
}
/>
{batchExpire.force && (
@@ -948,7 +976,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
)
}
>
我确认已核对所选订单,同意批量强制关闭
{t('我确认已核对所选订单,同意批量强制关闭')}
</Checkbox>
)}
<TextArea
@@ -961,7 +989,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
)
}
rows={3}
placeholder='填写处置原因,至少 6 个字符'
placeholder={t('填写处置原因,至少 6 个字符')}
/>
</div>
)}