refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* User center ticket (工单) panel.
|
||||
*
|
||||
* 数据全部来自 /aksrt/v1/tickets* REST;本文件只输出容器、筛选控件与首屏骨架,
|
||||
* 交互在 assets/js/ticket-center.js(附件 / 公告 / 催单配置取自 aksrtData.ticket)。
|
||||
* 数据全部来自 /jio/v1/tickets* REST;本文件只输出容器、筛选控件与首屏骨架,
|
||||
* 交互在 assets/js/ticket-center.js(附件 / 公告 / 催单配置取自 jioData.ticket)。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -14,84 +14,84 @@ $context = is_array($args['context'] ?? null) ? $args['context'] : [];
|
||||
$user_id = (int) ($context['user_id'] ?? get_current_user_id());
|
||||
|
||||
if ($user_id <= 0) {
|
||||
echo '<div class="uc-panel-empty muted-2-color">' . esc_html__('请先登录', 'aksrt') . '</div>';
|
||||
echo '<div class="uc-panel-empty muted-2-color">' . esc_html__('请先登录', 'jio') . '</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
$enabled = class_exists('\AKSRT\Ticket\TicketSettings') && \AKSRT\Ticket\TicketSettings::enabled();
|
||||
$enabled = class_exists('\Jio\Ticket\TicketSettings') && \Jio\Ticket\TicketSettings::enabled();
|
||||
if (!$enabled) {
|
||||
echo '<div class="uc-panel-empty muted-2-color">' . esc_html__('工单功能暂未开启', 'aksrt') . '</div>';
|
||||
echo '<div class="uc-panel-empty muted-2-color">' . esc_html__('工单功能暂未开启', 'jio') . '</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
$statuses = class_exists('\AKSRT\Ticket\TicketStatusService')
|
||||
? \AKSRT\Ticket\TicketStatusService::all()
|
||||
$statuses = class_exists('\Jio\Ticket\TicketStatusService')
|
||||
? \Jio\Ticket\TicketStatusService::all()
|
||||
: [];
|
||||
$types = class_exists('\AKSRT\Ticket\TicketTypeService')
|
||||
? \AKSRT\Ticket\TicketTypeService::public_list()
|
||||
$types = class_exists('\Jio\Ticket\TicketTypeService')
|
||||
? \Jio\Ticket\TicketTypeService::public_list()
|
||||
: [];
|
||||
?>
|
||||
<div class="aksrt-tickets-page uc-tickets-panel" data-aksrt-ticket-center>
|
||||
<div class="jio-tickets-page uc-tickets-panel" data-jio-ticket-center>
|
||||
<header class="uc-tickets-panel__head">
|
||||
<div class="uc-tickets-panel__title-wrap">
|
||||
<p class="aksrt-tickets-page__eyebrow"><?php esc_html_e('我的服务', 'aksrt'); ?></p>
|
||||
<p class="jio-tickets-page__eyebrow"><?php esc_html_e('我的服务', 'jio'); ?></p>
|
||||
<div class="uc-tickets-panel__title font-bold em12">
|
||||
<i class="fa fas fa-headset uc-tickets-panel__title-icon" aria-hidden="true"></i>
|
||||
<?php esc_html_e('工单中心', 'aksrt'); ?>
|
||||
<?php esc_html_e('工单中心', 'jio'); ?>
|
||||
</div>
|
||||
<p class="muted-2-color em09 mt3"><?php esc_html_e('提交问题工单,跟踪处理进度并与客服沟通。', 'aksrt'); ?></p>
|
||||
<p class="muted-2-color em09 mt3"><?php esc_html_e('提交问题工单,跟踪处理进度并与客服沟通。', 'jio'); ?></p>
|
||||
</div>
|
||||
<button class="btn-primary aksrt-tickets-page__create" type="button" data-aksrt-ticket-create>
|
||||
<i class="fa fas fa-plus" aria-hidden="true"></i><?php esc_html_e('提交工单', 'aksrt'); ?>
|
||||
<button class="btn-primary jio-tickets-page__create" type="button" data-jio-ticket-create>
|
||||
<i class="fa fas fa-plus" aria-hidden="true"></i><?php esc_html_e('提交工单', 'jio'); ?>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<?php // 统计卡同时是状态快捷筛选:点击按该状态过滤,再次点击取消。 ?>
|
||||
<div class="aksrt-tickets-page__stats" data-aksrt-ticket-stats role="group" aria-label="<?php esc_attr_e('按状态筛选', 'aksrt'); ?>">
|
||||
<button type="button" class="aksrt-tickets-page__stat is-active" data-aksrt-ticket-stat="" aria-pressed="true">
|
||||
<span><?php esc_html_e('全部', 'aksrt'); ?></span><strong>0</strong>
|
||||
<div class="jio-tickets-page__stats" data-jio-ticket-stats role="group" aria-label="<?php esc_attr_e('按状态筛选', 'jio'); ?>">
|
||||
<button type="button" class="jio-tickets-page__stat is-active" data-jio-ticket-stat="" aria-pressed="true">
|
||||
<span><?php esc_html_e('全部', 'jio'); ?></span><strong>0</strong>
|
||||
</button>
|
||||
<?php foreach ($statuses as $status) : ?>
|
||||
<button
|
||||
type="button"
|
||||
class="aksrt-tickets-page__stat"
|
||||
data-aksrt-ticket-stat="<?php echo esc_attr((string) $status['status_key']); ?>"
|
||||
style="--aksrt-ticket-color: <?php echo esc_attr((string) $status['color']); ?>"
|
||||
class="jio-tickets-page__stat"
|
||||
data-jio-ticket-stat="<?php echo esc_attr((string) $status['status_key']); ?>"
|
||||
style="--jio-ticket-color: <?php echo esc_attr((string) $status['color']); ?>"
|
||||
aria-pressed="false"
|
||||
>
|
||||
<span><i class="aksrt-tickets-page__stat-dot" aria-hidden="true"></i><?php echo esc_html((string) $status['name']); ?></span><strong>0</strong>
|
||||
<span><i class="jio-tickets-page__stat-dot" aria-hidden="true"></i><?php echo esc_html((string) $status['name']); ?></span><strong>0</strong>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<form class="aksrt-tickets-page__search" data-aksrt-tickets-search role="search">
|
||||
<label class="aksrt-tickets-page__search-box">
|
||||
<span class="screen-reader-text"><?php esc_html_e('按工单号或标题查找', 'aksrt'); ?></span>
|
||||
<form class="jio-tickets-page__search" data-jio-tickets-search role="search">
|
||||
<label class="jio-tickets-page__search-box">
|
||||
<span class="screen-reader-text"><?php esc_html_e('按工单号或标题查找', 'jio'); ?></span>
|
||||
<i class="fa fas fa-search" aria-hidden="true"></i>
|
||||
<input type="search" maxlength="60" autocomplete="off" placeholder="<?php esc_attr_e('搜索工单号或标题', 'aksrt'); ?>">
|
||||
<input type="search" maxlength="60" autocomplete="off" placeholder="<?php esc_attr_e('搜索工单号或标题', 'jio'); ?>">
|
||||
</label>
|
||||
<select data-aksrt-ticket-filter="status" aria-label="<?php esc_attr_e('工单状态', 'aksrt'); ?>">
|
||||
<option value=""><?php esc_html_e('全部状态', 'aksrt'); ?></option>
|
||||
<select data-jio-ticket-filter="status" aria-label="<?php esc_attr_e('工单状态', 'jio'); ?>">
|
||||
<option value=""><?php esc_html_e('全部状态', 'jio'); ?></option>
|
||||
<?php foreach ($statuses as $status) : ?>
|
||||
<option value="<?php echo esc_attr((string) $status['status_key']); ?>"><?php echo esc_html((string) $status['name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php if ($types !== []) : ?>
|
||||
<select data-aksrt-ticket-filter="ticket_type_id" aria-label="<?php esc_attr_e('工单部门', 'aksrt'); ?>">
|
||||
<option value=""><?php esc_html_e('全部部门', 'aksrt'); ?></option>
|
||||
<select data-jio-ticket-filter="ticket_type_id" aria-label="<?php esc_attr_e('工单部门', 'jio'); ?>">
|
||||
<option value=""><?php esc_html_e('全部部门', 'jio'); ?></option>
|
||||
<?php foreach ($types as $type) : ?>
|
||||
<option value="<?php echo esc_attr((string) $type['id']); ?>"><?php echo esc_html((string) $type['name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
<button class="aksrt-tickets-page__reset" type="button" data-aksrt-ticket-reset hidden><?php esc_html_e('清除筛选', 'aksrt'); ?></button>
|
||||
<button class="jio-tickets-page__reset" type="button" data-jio-ticket-reset hidden><?php esc_html_e('清除筛选', 'jio'); ?></button>
|
||||
</form>
|
||||
|
||||
<div class="aksrt-tickets-page__list" data-aksrt-ticket-list aria-live="polite" aria-busy="true">
|
||||
<div class="jio-tickets-page__list" data-jio-ticket-list aria-live="polite" aria-busy="true">
|
||||
<?php // 首屏骨架:沿用全站 .post_ajax_loader + .is-loading 契约,JS 拿到数据后整体替换。 ?>
|
||||
<div class="post_ajax_loader is-loading" aria-hidden="true">
|
||||
<?php for ($i = 0; $i < 3; $i++) : ?>
|
||||
<div class="aksrt-tickets-page__card is-placeholder">
|
||||
<div class="jio-tickets-page__card is-placeholder">
|
||||
<div class="placeholder s1"></div>
|
||||
<div class="placeholder k1"></div>
|
||||
<div class="placeholder k3" style="width: 42%;"></div>
|
||||
@@ -100,14 +100,14 @@ $types = class_exists('\AKSRT\Ticket\TicketTypeService')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="aksrt-tickets-page__pagination" data-aksrt-ticket-pagination aria-label="<?php esc_attr_e('工单分页', 'aksrt'); ?>" hidden></nav>
|
||||
<nav class="jio-tickets-page__pagination" data-jio-ticket-pagination aria-label="<?php esc_attr_e('工单分页', 'jio'); ?>" hidden></nav>
|
||||
|
||||
<?php
|
||||
// 人机验证挂载点(提交工单 / 回复):场景未启用时 aksrt_render_captcha 无输出,
|
||||
// 人机验证挂载点(提交工单 / 回复):场景未启用时 jio_render_captcha 无输出,
|
||||
// ticket-center.js 以挂载点存在与否决定是否先过验证。
|
||||
if (function_exists('aksrt_render_captcha')) {
|
||||
aksrt_render_captcha('ticket_create');
|
||||
aksrt_render_captcha('ticket_reply');
|
||||
if (function_exists('jio_render_captcha')) {
|
||||
jio_render_captcha('ticket_create');
|
||||
jio_render_captcha('ticket_reply');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
Reference in new issue
Block a user