fix(frontend): 统一计数缩写口径并将流水号改为订单号
前台各处评论、浏览、点赞、收藏、已售数量统一走 aksrt_format_number() 缩写(≥10000 → 1.2W+,≥1000 → 1.5K), 缩写后缀统一为大写 K,与既有 W+ 保持一致。PHP 渲染缩写文本的 同时保留 data-base-count 原始整数,JS 增量计算不受影响; article.js / comment-ajax.js 内的 formatStatCount / formatCount 与 PHP 规则保持同一套,避免点赞收藏后文本回跳成全量数字。 文章详情页购买信息卡、用户中心创作者收益明细、后台分成与提现 管理页、支付设置页以及四封订单/提现邮件模板中,面向用户展示的 「流水号」字样统一改为「订单号」;代码注释、内部错误码与 WP_Error 文案保留原表述。 验证:node --test "tests/*/*.test.cjs" 508 项全部通过; php -l 检查全部改动文件无语法错误;重新构建 admin SPA 与 前台 runtime bundle。
This commit is contained in:
1 parent
fe57022550
commit
2595bb02db
23 files changed
+136
-37
No files matched your search
@@ -1379,7 +1379,8 @@ if (!function_exists('aksrt_get_paywall_html')) {
|
||||
$price = aksrt_get_show_pay_price_html($meta, $priced);
|
||||
$vip = aksrt_get_posts_vip_price($meta);
|
||||
$attrs = aksrt_get_pay_attributes_html($post, 'pay-attr');
|
||||
$count = $sales > 0 ? '<badge class="img-badge hot jb-blue px12">' . esc_html(sprintf(__('已售 %s', 'aksrt'), $sales)) . '</badge>' : '';
|
||||
$sales_label = function_exists('aksrt_format_number') ? aksrt_format_number($sales) : number_format_i18n($sales);
|
||||
$count = $sales > 0 ? '<badge class="img-badge hot jb-blue px12">' . esc_html(sprintf(__('已售 %s', 'aksrt'), $sales_label)) . '</badge>' : '';
|
||||
$service = aksrt_get_pay_service_html('muted-2-color');
|
||||
$widget_service = $service !== '' ? '<div class="px12 muted-2-color">' . $service . '</div>' : '';
|
||||
$article_service = $service !== '' ? '<div class="px12 muted-2-color mt10 text-right">' . $service . '</div>' : '';
|
||||
@@ -1538,7 +1539,8 @@ if (!function_exists('aksrt_get_paid_box_html')) {
|
||||
$title = get_the_title($post);
|
||||
$sales = max(0, (int) ($meta['virtual_sales'] ?? 0));
|
||||
$sales += max(0, (int) get_post_meta($post->ID, \AKSRT\Core\DomainModel::RESOURCE_SALES_VOLUME_KEY, true));
|
||||
$count = $sales > 0 ? '<badge class="img-badge hot jb-blue px12">' . esc_html(sprintf(__('已售 %s', 'aksrt'), $sales)) . '</badge>' : '';
|
||||
$sales_label = function_exists('aksrt_format_number') ? aksrt_format_number($sales) : number_format_i18n($sales);
|
||||
$count = $sales > 0 ? '<badge class="img-badge hot jb-blue px12">' . esc_html(sprintf(__('已售 %s', 'aksrt'), $sales_label)) . '</badge>' : '';
|
||||
$order = aksrt_get_current_content_paid_order($post);
|
||||
$priced = aksrt_get_user_pay_price($post);
|
||||
$vip_level = max(0, min(2, (int) ($priced['vip_level'] ?? 0)));
|
||||
@@ -1561,7 +1563,7 @@ if (!function_exists('aksrt_get_paid_box_html')) {
|
||||
}
|
||||
$amount_text = $cash_symbol . aksrt_format_price($order_amount);
|
||||
}
|
||||
$paid_info = '<div class="flex jsb"><span>' . esc_html__('流水号', 'aksrt') . '</span><span>' . esc_html($order_number) . '</span></div>';
|
||||
$paid_info = '<div class="flex jsb"><span>' . esc_html__('订单号', 'aksrt') . '</span><span>' . esc_html($order_number) . '</span></div>';
|
||||
if ($paid_at !== '') {
|
||||
$paid_info .= '<div class="flex jsb"><span>' . esc_html__('支付时间', 'aksrt') . '</span><span>' . esc_html($paid_at) . '</span></div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user