feat(user-center): 用户中心前台 1:1 列表/URL/关注/身份
补齐 orders/cart/revenue/messages 页面 URL helper,修复私有中心商务与消息死链,公共主页商品/关注接入真实数据,开启身份 chips governance,并注册消息中心页面模板。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
458df7e487
commit
a86649946a
10 files changed
+206
-49
No files matched your search
@@ -82,17 +82,25 @@ if (!function_exists('aksrt_get_user_home_page_context')) {
|
||||
$forum_instance = class_exists('AKSRT_Forum') ? AKSRT_Forum::get_instance() : null;
|
||||
$forum_stats = $forum_instance ? $forum_instance->get_user_forum_stats($user_id) : [];
|
||||
$forum_topic_count = (int) ($forum_stats['topic_count'] ?? 0);
|
||||
$forum_followed_count = (int) ($forum_stats['followed_plate_count'] ?? 0);
|
||||
$product_count = 0;
|
||||
if (class_exists('AKSRT_Shop')) {
|
||||
$product_count = (int) AKSRT_Shop::get_instance()->count_author_products($user_id);
|
||||
}
|
||||
|
||||
$follow_count = 0;
|
||||
if (class_exists('AKSRT_Follow')) {
|
||||
$follow_count = (int) AKSRT_Follow::get_instance()->get_following_count($user_id);
|
||||
}
|
||||
|
||||
$tab_counts = [
|
||||
'posts' => $post_count,
|
||||
'comments' => $comment_count,
|
||||
'favorites' => $favorite_count,
|
||||
'credits' => $credits_enabled && $is_own_profile ? (int) round((float) $credit_balance) : 0,
|
||||
'product' => 0,
|
||||
'product' => $product_count,
|
||||
'plate' => 0,
|
||||
'forum' => $forum_topic_count,
|
||||
'follow' => $forum_followed_count,
|
||||
'follow' => $follow_count,
|
||||
];
|
||||
|
||||
$tab_labels = [
|
||||
|
||||
Reference in new issue
Block a user