feat(ux): after-sale multi-step, ban appeal, message types, coupon wallet
Orders center gains after-sale tickets (return ship/cancel/timeline), coupon wallet list, ban-appeal page, and expanded message center tabs.
This commit is contained in:
1 parent
3a883bc3d0
commit
1337664ed3
15 files changed
+999
-37
No files matched your search
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - 禁封申诉
|
||||
* Template Post Type: page
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
use AKSRT\User\BanAppeal;
|
||||
use AKSRT\User\Restriction;
|
||||
|
||||
get_header();
|
||||
|
||||
if (!is_user_logged_in()) {
|
||||
$login = function_exists('aksrt_get_login_url') ? aksrt_get_login_url(get_permalink()) : wp_login_url(get_permalink());
|
||||
wp_safe_redirect($login);
|
||||
exit;
|
||||
}
|
||||
|
||||
$user_id = get_current_user_id();
|
||||
$settings = class_exists(BanAppeal::class) ? BanAppeal::settings() : ['enabled' => true, 'desc' => '', 'keys' => []];
|
||||
$ban = class_exists(Restriction::class) ? Restriction::get_instance()->get_active_ban($user_id) : null;
|
||||
$status = class_exists(BanAppeal::class) ? BanAppeal::get_status($user_id) : '';
|
||||
$payload = class_exists(BanAppeal::class) ? BanAppeal::get_payload($user_id) : [];
|
||||
?>
|
||||
<main class="container page-template-ban-appeal">
|
||||
<div class="content-wrap">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="theme-box radius8 main-bg main-shadow box-body mb20">
|
||||
<h1 class="article-title"><?php echo esc_html(get_the_title() ?: __('禁封申诉', 'aksrt')); ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="theme-box radius8 main-bg main-shadow box-body aksrt-ban-appeal">
|
||||
<?php if (!$ban) : ?>
|
||||
<div class="muted-2-color text-center" style="padding:40px 0;">
|
||||
<i class="fa fa-check-circle em2x" aria-hidden="true"></i>
|
||||
<p class="mt10"><?php esc_html_e('当前账号未处于禁封状态。', 'aksrt'); ?></p>
|
||||
</div>
|
||||
<?php elseif (empty($settings['enabled'])) : ?>
|
||||
<div class="c-red"><i class="fa fa-info-circle mr6" aria-hidden="true"></i><?php esc_html_e('申诉功能暂未开启', 'aksrt'); ?></div>
|
||||
<?php elseif ($status === 'pending') : ?>
|
||||
<div class="c-red mb10"><?php esc_html_e('您的申诉正在审核中,请耐心等待。', 'aksrt'); ?></div>
|
||||
<?php if (!empty($payload['reason'])) : ?>
|
||||
<div class="muted-2-color"><?php echo esc_html(sprintf(__('申诉内容:%s', 'aksrt'), (string) $payload['reason'])); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($payload['time'])) : ?>
|
||||
<div class="muted-2-color mt6"><?php echo esc_html(sprintf(__('提交时间:%s', 'aksrt'), (string) $payload['time'])); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php if (!empty($ban['reason'])) : ?>
|
||||
<div class="muted-box mb20">
|
||||
<strong><?php esc_html_e('禁封原因', 'aksrt'); ?>:</strong>
|
||||
<?php echo esc_html((string) $ban['reason']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($settings['desc'])) : ?>
|
||||
<div class="muted-color mb20"><?php echo wp_kses_post(nl2br(esc_html((string) $settings['desc']))); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($status === 'rejected') : ?>
|
||||
<div class="c-red mb15"><?php esc_html_e('上次申诉未通过,可修改后重新提交。', 'aksrt'); ?></div>
|
||||
<?php endif; ?>
|
||||
<form class="aksrt-ban-appeal-form">
|
||||
<?php if (!empty($settings['keys'])) : ?>
|
||||
<div class="mb15">
|
||||
<label class="em09 muted-2-color"><?php esc_html_e('申诉类型', 'aksrt'); ?></label>
|
||||
<select name="reason_key" class="form-control">
|
||||
<?php foreach ($settings['keys'] as $key) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>"><?php echo esc_html($key); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="mb15">
|
||||
<label class="em09 muted-2-color"><?php esc_html_e('申诉说明', 'aksrt'); ?> *</label>
|
||||
<textarea name="reason" class="form-control" rows="5" required placeholder="<?php esc_attr_e('请说明误封原因或补充材料说明', 'aksrt'); ?>"><?php echo esc_textarea((string) ($payload['reason'] ?? '')); ?></textarea>
|
||||
</div>
|
||||
<?php wp_nonce_field('aksrt_ban_appeal', '_wpnonce', false); ?>
|
||||
<input type="hidden" name="action" value="aksrt_ban_appeal_submit">
|
||||
<button type="submit" class="but c-blue padding-lg">
|
||||
<i class="fa fa-paper-plane" aria-hidden="true"></i> <?php esc_html_e('提交申诉', 'aksrt'); ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
get_footer();
|
||||
Reference in new issue
Block a user