仰望星辰工作室

feat: 新增TDesign风格用户中心SPA页面

Y yang1145 提交于 2026-08-10 14:02 · 94a7ec7 ·父提交 c613731
feat: 新增TDesign风格用户中心SPA页面

- 新增登录、注册、个人信息、修改密码等用户中心页面
- 重构用户中心路由与API请求封装
- 新增首页用户中心入口跳转链接
- 优化用户信息提交与消息提示逻辑
- 添加余额与主机商城插件支持
35 个文件变更 +3691 -13 13172193298@163.com
•app_plugins/user_info/bootstrap.php +11 -6
•app_plugins/user_info/lib/auth.php +39 -0
•app_plugins/user_info/views/dashboard.php +26 -0
•app_plugins/user_info/views/login.php +1 -1
•app_plugins/user_info/views/password.php +2 -2
•app_plugins/user_info/views/profile.php +1 -1
•app_plugins/user_info/views/register.php +1 -1
•templates/tdesign/account/_spa_boot.php +102 -0
•templates/tdesign/account/index.php +4 -0
•templates/tdesign/account/login.php +4 -0
•templates/tdesign/account/password.php +4 -0
•templates/tdesign/account/profile.php +4 -0
•templates/tdesign/account/register.php +4 -0
•templates/tdesign/spa/account.html +33 -0
•templates/tdesign/spa/package.json +2 -1
•templates/tdesign/spa/src/App-account.vue +6 -0
•templates/tdesign/spa/src/account/api/auth.js +46 -0
•templates/tdesign/spa/src/account/api/http.js +114 -0
•templates/tdesign/spa/src/account/api/plugins.js +93 -0
•templates/tdesign/spa/src/account/layouts/AccountLayout.vue +677 -0
•templates/tdesign/spa/src/account/router/index.js +104 -0
•templates/tdesign/spa/src/account/views/BalanceView.vue +239 -0
•templates/tdesign/spa/src/account/views/DashboardView.vue +425 -0
•templates/tdesign/spa/src/account/views/HostingView.vue +170 -0
•templates/tdesign/spa/src/account/views/LoginView.vue +287 -0
•templates/tdesign/spa/src/account/views/OrdersView.vue +192 -0
•templates/tdesign/spa/src/account/views/PasswordView.vue +84 -0
•templates/tdesign/spa/src/account/views/ProfileView.vue +86 -0
•templates/tdesign/spa/src/account/views/RechargeView.vue +175 -0
•templates/tdesign/spa/src/account/views/RegisterView.vue +341 -0
•templates/tdesign/spa/src/account/views/ShopView.vue +338 -0
•templates/tdesign/spa/src/home/layouts/HomeLayout.vue +7 -1
•templates/tdesign/spa/src/home/styles/home.scss +21 -0
•templates/tdesign/spa/src/main-account.js +11 -0
•templates/tdesign/spa/vite.account.config.js +37 -0
变更内容
diff --git a/app_plugins/user_info/bootstrap.php b/app_plugins/user_info/bootstrap.php
index 7d0a845..11be832 100644
--- a/app_plugins/user_info/bootstrap.php
+++ b/app_plugins/user_info/bootstrap.php
@@ -22,11 +22,16 @@ mnbt_plugin_register('user_info', [
  *  页面路由
  * ============================================================ */
 
+// 控制面板(要求登录)
+mnbt_register_route('GET', '/account', function ($params, $ctx) {
+	user_info_render('dashboard', ['page_title' => '控制面板']);
+}, 10, function () { return (bool)user_info_auth_current(); });
+
 // 登录页
 mnbt_register_route('GET', '/account/login', function ($params, $ctx) {
 	$user = user_info_auth_current();
 	if ($user) {
-		header('Location: ' . user_info_url('account/profile'));
+		header('Location: ' . user_info_url('account'));
 		exit;
 	}
 	user_info_render('login', ['page_title' => '登录']);
@@ -36,7 +41,7 @@ mnbt_register_route('GET', '/account/login', function ($params, $ctx) {
 mnbt_register_route('GET', '/account/register', function ($params, $ctx) {
 	$user = user_info_auth_current();
 	if ($user) {
-		header('Location: ' . user_info_url('account/profile'));
+		header('Location: ' . user_info_url('account'));
 		exit;
 	}
 	user_info_render('register', ['page_title' => '注册']);
@@ -108,7 +113,7 @@ mnbt_register_route('POST', '/account/api/login', function ($params, $ctx) {
 	}
 
 	user_info_auth_login($user['id'], $user['password_hash']);
-	user_info_json('登录成功', ['redirect' => user_info_url('account/profile')]);
+	user_info_json('ok', ['message' => '登录成功', 'redirect' => user_info_url('account')]);
 });
 
 // 注册 API
@@ -163,7 +168,7 @@ mnbt_register_route('POST', '/account/api/register', function ($params, $ctx) {
 	$new_row = $DB->get_row_prepare("SELECT id FROM MN_plugin_user WHERE username=? LIMIT 1", [$username]);
 	$new_id = $new_row ? (int)$new_row['id'] : 0;
 	user_info_auth_login($new_id, $hash);
-	user_info_json('注册成功', ['redirect' => user_info_url('account/profile')]);
+	user_info_json('ok', ['message' => '注册成功', 'redirect' => user_info_url('account')]);
 });
 
 // 更新个人信息 API
@@ -191,7 +196,7 @@ mnbt_register_route('POST', '/account/api/update_profile', function ($params, $c
 	if (!$ok) {
 		user_info_json('保存失败');
 	}
-	user_info_json('保存成功');
+	user_info_json('ok', ['message' => '保存成功']);
 }, 10, function () { return (bool)user_info_auth_current(); });
 
 // 修改密码 API
@@ -226,7 +231,7 @@ mnbt_register_route('POST', '/account/api/change_password', function ($params, $
 	}
 
 	user_info_auth_login($user['id'], $hash);
-	user_info_json('修改成功');
+	user_info_json('ok', ['message' => '修改成功']);
 }, 10, function () { return (bool)user_info_auth_current(); });
 
 /* ============================================================
diff --git a/app_plugins/user_info/lib/auth.php b/app_plugins/user_info/lib/auth.php
index 7a3f50c..27e5a85 100644
--- a/app_plugins/user_info/lib/auth.php
+++ b/app_plugins/user_info/lib/auth.php
@@ -113,9 +113,39 @@ function user_info_auth_require()
 	return $user;
 }
 
+/**
+ * 解析主题提供的 account 入口文件(如 tdesign 主题的 SPA 入口)。
+ * 当前用户主题下存在 templates/{theme}/account/{view}.php 时返回路径,否则返回 null。
+ *
+ * @param string $view  views 名称:login/register/profile/password/dashboard
+ * @return string|null
+ */
+function user_info_theme_entry($view)
+{
+	if (!function_exists('mnbt_theme_name') || !defined('MNBT_THEME_ROOT')) {
+		return null;
+	}
+	$map = [
+		'login' => 'login.php',
+		'register' => 'register.php',
+		'profile' => 'profile.php',
+		'password' => 'password.php',
+		'dashboard' => 'index.php',
+	];
+	if (!isset($map[$view])) {
+		return null;
+	}
+	$theme = mnbt_theme_name('user');
+	$file = MNBT_THEME_ROOT . $theme . '/account/' . $map[$view];
+	return is_file($file) ? $file : null;
+}
+
 /**
  * 渲染视图文件(带布局)。
  *
+ * 当前用户主题若提供 account 入口(如 tdesign SPA),优先交给主题渲染;
+ * 否则回退到插件自带 Layui 布局。
+ *
  * @param string $view  views 目录下的文件名(不含 .php)
  * @param array  $vars  传给视图的变量
  */
@@ -125,6 +155,15 @@ function user_info_render($view, $vars = [])
 	$vars['asset_url'] = user_info_asset_url();
 	$vars['url'] = 'user_info_url';
 	extract($vars, EXTR_SKIP);
+
+	$themeEntry = user_info_theme_entry($view);
+	if ($themeEntry !== null) {
+		// 主题入口在函数作用域内 include,需要展开全局变量($conf/$DB/$date 等)
+		extract($GLOBALS, EXTR_SKIP);
+		include $themeEntry;
+		return;
+	}
+
 	$viewFile = mnbt_plugin_path('user_info') . 'views/' . $view . '.php';
 	if (!is_file($viewFile)) {
 		http_response_code(500);
diff --git a/app_plugins/user_info/views/dashboard.php b/app_plugins/user_info/views/dashboard.php
new file mode 100644
index 0000000..96030d4
--- /dev/null
+++ b/app_plugins/user_info/views/dashboard.php
@@ -0,0 +1,26 @@
+<?php
+if (!defined('IN_CRONLITE')) { exit; }
+$page_title = $page_title ?? '控制面板';
+$u = $current_user;
+ob_start();
+?>
+<div class="ly-msg" id="msg"></div>
+
+<div style="padding:6px 0 20px;">
+  <h1 style="font-size:22px;margin:0 0 6px;">你好,<?= htmlspecialchars($u['username']) ?>!</h1>
+  <p style="color:#999;font-size:14px;margin:0;">欢迎回到用户中心,在这里管理你的个人信息与账号安全。</p>
+</div>
+
+<div class="ly-info-row"><span class="ly-info-label">用户名</span><span class="ly-info-value"><?= htmlspecialchars($u['username']) ?></span></div>
+<div class="ly-info-row"><span class="ly-info-label">邮箱</span><span class="ly-info-value"><?= htmlspecialchars($u['email']) ?: '未绑定' ?></span></div>
+<div class="ly-info-row"><span class="ly-info-label">QQ</span><span class="ly-info-value"><?= htmlspecialchars($u['qq']) ?: '未绑定' ?></span></div>
+<div class="ly-info-row"><span class="ly-info-label">注册时间</span><span class="ly-info-value"><?= htmlspecialchars($u['created_at']) ?></span></div>
+
+<div style="margin-top:24px;display:flex;gap:10px;flex-wrap:wrap;">
+  <a href="<?= user_info_url('account/profile') ?>" class="layui-btn">个人信息</a>
+  <a href="<?= user_info_url('account/password') ?>" class="layui-btn layui-btn-primary">修改密码</a>
+  <a href="<?= user_info_url('account/logout') ?>" class="layui-btn layui-btn-danger">退出登录</a>
+</div>
+<?php
+$content = ob_get_clean();
+include __DIR__ . '/layout.php';
diff --git a/app_plugins/user_info/views/login.php b/app_plugins/user_info/views/login.php
index 58fc69d..a0eb0d6 100644
--- a/app_plugins/user_info/views/login.php
+++ b/app_plugins/user_info/views/login.php
@@ -41,7 +41,7 @@ ob_start();
     fetch('<?= user_info_url('account/api/login') ?>', { method: 'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: body.toString() })
       .then(function (r) { return r.json(); })
       .then(function (res) {
-        if (res.redirect) { showMsg(res.code || '登录成功', 'success'); setTimeout(function(){window.location.href=res.redirect;},300); }
+        if (res.code === 'ok') { showMsg(res.message || '登录成功', 'success'); setTimeout(function(){window.location.href=res.redirect;},300); }
         else { showMsg(res.code || '登录失败', 'error'); btn.disabled = false; btn.textContent = '登录'; }
       })
       .catch(function () { showMsg('网络错误,请重试', 'error'); btn.disabled = false; btn.textContent = '登录'; });
diff --git a/app_plugins/user_info/views/password.php b/app_plugins/user_info/views/password.php
index a3d3033..93b7990 100644
--- a/app_plugins/user_info/views/password.php
+++ b/app_plugins/user_info/views/password.php
@@ -46,8 +46,8 @@ ob_start();
     fetch('<?= user_info_url('account/api/change_password') ?>', { method: 'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: body.toString() })
       .then(function (r) { return r.json(); })
       .then(function (res) {
-        showMsg(res.code || '操作失败', res.code === '修改成功' ? 'success' : 'error');
-        if (res.code === '修改成功') form.reset();
+        showMsg(res.code === 'ok' ? (res.message || '修改成功') : (res.code || '操作失败'), res.code === 'ok' ? 'success' : 'error');
+        if (res.code === 'ok') form.reset();
         btn.disabled = false; btn.textContent = '确认修改';
       })
       .catch(function () { showMsg('网络错误,请重试', 'error'); btn.disabled = false; btn.textContent = '确认修改'; });
diff --git a/app_plugins/user_info/views/profile.php b/app_plugins/user_info/views/profile.php
index 4f629b7..7191f25 100644
--- a/app_plugins/user_info/views/profile.php
+++ b/app_plugins/user_info/views/profile.php
@@ -45,7 +45,7 @@ ob_start();
     fetch('<?= user_info_url('account/api/update_profile') ?>', { method: 'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: body.toString() })
       .then(function (r) { return r.json(); })
       .then(function (res) {
-        showMsg(res.code || '操作失败', res.code === '保存成功' ? 'success' : 'error');
+        showMsg(res.code === 'ok' ? (res.message || '保存成功') : (res.code || '操作失败'), res.code === 'ok' ? 'success' : 'error');
         btn.disabled = false; btn.textContent = '保存';
       })
       .catch(function () { showMsg('网络错误,请重试', 'error'); btn.disabled = false; btn.textContent = '保存'; });
diff --git a/app_plugins/user_info/views/register.php b/app_plugins/user_info/views/register.php
index 7dd2f82..83e281a 100644
--- a/app_plugins/user_info/views/register.php
+++ b/app_plugins/user_info/views/register.php
@@ -56,7 +56,7 @@ ob_start();
     fetch('<?= user_info_url('account/api/register') ?>', { method: 'POST', headers: {'Content-Type':'application/x-www-form-urlencoded'}, body: body.toString() })
       .then(function (r) { return r.json(); })
       .then(function (res) {
-        if (res.redirect) { showMsg(res.code || '注册成功', 'success'); setTimeout(function(){window.location.href=res.redirect;},300); }
+        if (res.code === 'ok') { showMsg(res.message || '注册成功', 'success'); setTimeout(function(){window.location.href=res.redirect;},300); }
         else { showMsg(res.code || '注册失败', 'error'); btn.disabled = false; btn.textContent = '注册'; }
       })
       .catch(function () { showMsg('网络错误,请重试', 'error'); btn.disabled = false; btn.textContent = '注册'; });
diff --git a/templates/tdesign/account/_spa_boot.php b/templates/tdesign/account/_spa_boot.php
new file mode 100644
index 0000000..a81def0
--- /dev/null
+++ b/templates/tdesign/account/_spa_boot.php
@@ -0,0 +1,102 @@
+<?php
+/**
+ * TDesign 用户中心(user_info 插件)SPA 公共启动片段
+ *
+ * 由 app_plugins/user_info 的 user_info_render() 在检测到当前用户主题为
+ * tdesign 时 include。入口页面(index/login/register/profile/password)
+ * 设置 $td_entry / $td_hash 后 include 本文件。
+ */
+if (!defined('IN_CRONLITE')) {
+	exit('Access Denied');
+}
+
+if (!function_exists('user_info_auth_current')) {
+	echo 'user_info 插件未加载';
+	exit;
+}
+
+$td_dist = __DIR__ . '/dist';
+$td_js   = $td_dist . '/assets/index.js';
+$td_css  = $td_dist . '/assets/index.css';
+$td_ver  = is_file($td_js) ? (string)@filemtime($td_js) : (string)time();
+
+$td_user = user_info_auth_current();
+
+$td_base = function_exists('mnbt_home_base') ? mnbt_home_base() : '';
+$td_theme = function_exists('mnbt_theme_name') ? mnbt_theme_name('user') : 'tdesign';
+$td_dist_url = $td_base . '/templates/' . $td_theme . '/account/dist/';
+
+$boot = [
+	'siteName'    => $conf['name'] ?? 'MNBT',
+	'footer'      => $conf['hxp'] ?? '',
+	'loggedIn'    => $td_user ? true : false,
+	'accountUser' => $td_user ? [
+		'id'         => (int)$td_user['id'],
+		'username'   => (string)$td_user['username'],
+		'email'      => (string)($td_user['email'] ?? ''),
+		'qq'         => (string)($td_user['qq'] ?? ''),
+		'status'     => (int)($td_user['status'] ?? 1),
+		'created_at' => (string)($td_user['created_at'] ?? ''),
+	] : null,
+	// 路由 API 入口(user_info 插件通过 P2 通用路由暴露 /account/api/*)
+	'routeBase'   => $td_base . '/index.php?_r=',
+	// 插件能力标志(account SPA 依据此决定是否展示余额/商城功能)
+	'plugins'     => [
+		'balance'      => function_exists('mnbt_plugin_enabled') ? mnbt_plugin_enabled('balance') : false,
+		'hosting_shop' => function_exists('mnbt_plugin_enabled') ? mnbt_plugin_enabled('hosting_shop') : false,
+	],
+	// 主机管理面板入口(核心 user scope)
+	'panelUrl'    => $td_base . '/user/',
+	// 官网首页入口
+	'homeUrl'     => $td_base . '/',
+	'theme'       => $td_theme,
+	'version'     => '0.3.0',
+	'entry'       => $td_entry ?? 'dashboard',
+	'hash'        => $td_hash ?? '',
+];
+?>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+<meta charset="UTF-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+<title><?= htmlspecialchars(($title ?? '用户中心') . ' · ' . ($conf['name'] ?? 'MNBT'), ENT_QUOTES, 'UTF-8') ?></title>
+<link rel="icon" href="<?= htmlspecialchars(mnbt_asset_url('images/logo-ico.png'), ENT_QUOTES, 'UTF-8') ?>" type="image/ico" />
+<link rel="stylesheet" href="<?= htmlspecialchars(mnbt_asset_url('css/materialdesignicons.min.css'), ENT_QUOTES, 'UTF-8') ?>" />
+<?php if (is_file($td_css)): ?>
+<link rel="stylesheet" href="<?= htmlspecialchars($td_dist_url . 'assets/index.css', ENT_QUOTES, 'UTF-8') ?>?v=<?= $td_ver ?>" />
+<?php endif; ?>
+<style>
+  html, body, #app { margin: 0; padding: 0; height: 100%; background: #f2f3f5; }
+  .td-boot-missing { max-width: 540px; margin: 12vh auto; padding: 32px; border-radius: 12px; background: #fff; border: 1px solid #e7e7e7; font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1a2e28; }
+  .td-boot-missing h2 { margin: 0 0 12px; font-size: 18px; color: #d54941; }
+  .td-boot-missing code { background: #f3f3f3; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
+  .td-boot-missing p { margin: 10px 0; line-height: 1.7; font-size: 14px; }
+</style>
+</head>
+<body>
+<div id="app">
+<?php if (!is_file($td_js)): ?>
+  <div class="td-boot-missing">
+    <h2>用户中心尚未构建</h2>
+    <p>请在服务器或本机执行:</p>
+    <p><code>cd templates/tdesign/spa &amp;&amp; npm install &amp;&amp; npm run build:account</code></p>
+    <p>构建产物应位于 <code>templates/tdesign/account/dist/</code></p>
+  </div>
+<?php endif; ?>
+</div>
+<script>
+window.__TD_BOOT__ = <?= json_encode($boot, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>;
+<?php if (!empty($td_hash)): ?>
+if (window.__TD_BOOT__.hash) {
+  if (!location.hash || location.hash === '#' || location.hash === '#/') {
+    location.hash = window.__TD_BOOT__.hash;
+  }
+}
+<?php endif; ?>
+</script>
+<?php if (is_file($td_js)): ?>
+<script type="module" src="<?= htmlspecialchars($td_dist_url . 'assets/index.js', ENT_QUOTES, 'UTF-8') ?>?v=<?= $td_ver ?>"></script>
+<?php endif; ?>
+</body>
+</html>
diff --git a/templates/tdesign/account/index.php b/templates/tdesign/account/index.php
new file mode 100644
index 0000000..c5eaa6f
--- /dev/null
+++ b/templates/tdesign/account/index.php
@@ -0,0 +1,4 @@
+<?php
+$td_entry = 'dashboard';
+$td_hash = '#/dashboard';
+include __DIR__ . '/_spa_boot.php';
diff --git a/templates/tdesign/account/login.php b/templates/tdesign/account/login.php
new file mode 100644
index 0000000..e65e4ab
--- /dev/null
+++ b/templates/tdesign/account/login.php
@@ -0,0 +1,4 @@
+<?php
+$td_entry = 'login';
+$td_hash = '#/login';
+include __DIR__ . '/_spa_boot.php';
diff --git a/templates/tdesign/account/password.php b/templates/tdesign/account/password.php
new file mode 100644
index 0000000..ba94200
--- /dev/null
+++ b/templates/tdesign/account/password.php
@@ -0,0 +1,4 @@
+<?php
+$td_entry = 'password';
+$td_hash = '#/password';
+include __DIR__ . '/_spa_boot.php';
diff --git a/templates/tdesign/account/profile.php b/templates/tdesign/account/profile.php
new file mode 100644
index 0000000..e3c3e8a
--- /dev/null
+++ b/templates/tdesign/account/profile.php
@@ -0,0 +1,4 @@
+<?php
+$td_entry = 'profile';
+$td_hash = '#/profile';
+include __DIR__ . '/_spa_boot.php';
diff --git a/templates/tdesign/account/register.php b/templates/tdesign/account/register.php
new file mode 100644
index 0000000..6f00fb2
--- /dev/null
+++ b/templates/tdesign/account/register.php
@@ -0,0 +1,4 @@
+<?php
+$td_entry = 'register';
+$td_hash = '#/register';
+include __DIR__ . '/_spa_boot.php';
diff --git a/templates/tdesign/spa/account.html b/templates/tdesign/spa/account.html
new file mode 100644
index 0000000..7a13dca
--- /dev/null
+++ b/templates/tdesign/spa/account.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>TDesign 用户中心 · 开发模式</title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <script>
+      // 开发模式注入最小 boot,真实字段由 PHP 入口注入
+      window.__TD_BOOT__ = {
+        siteName: 'MNBT(开发)',
+        footer: '',
+        loggedIn: true,
+        accountUser: {
+          id: 1,
+          username: 'testuser',
+          email: 'test@example.com',
+          qq: '123456789',
+          created_at: '2026-08-10 00:00:00',
+        },
+        routeBase: '/index.php?_r=',
+        plugins: { balance: true, hosting_shop: true },
+        theme: 'tdesign',
+        version: '0.3.0',
+        entry: 'dashboard',
+        hash: '#/dashboard',
+      }
+    </script>
+    <script type="module" src="/src/main-account.js"></script>
+  </body>
+</html>
diff --git a/templates/tdesign/spa/package.json b/templates/tdesign/spa/package.json
index 295783d..8fee9b5 100644
--- a/templates/tdesign/spa/package.json
+++ b/templates/tdesign/spa/package.json
@@ -11,7 +11,8 @@
     "build:user": "vite build --config vite.user.config.js",
     "build:docker": "vite build --config vite.docker.config.js",
     "build:home": "vite build --config vite.home.config.js",
-    "build": "npm run build:admin && npm run build:user && npm run build:docker && npm run build:home",
+    "build:account": "vite build --config vite.account.config.js",
+    "build": "npm run build:admin && npm run build:user && npm run build:docker && npm run build:home && npm run build:account",
     "preview": "vite preview"
   },
   "dependencies": {
diff --git a/templates/tdesign/spa/src/App-account.vue b/templates/tdesign/spa/src/App-account.vue
new file mode 100644
index 0000000..d372e96
--- /dev/null
+++ b/templates/tdesign/spa/src/App-account.vue
@@ -0,0 +1,6 @@
+<template>
+  <router-view />
+</template>
+
+<script setup>
+</script>
diff --git a/templates/tdesign/spa/src/account/api/auth.js b/templates/tdesign/spa/src/account/api/auth.js
new file mode 100644
index 0000000..180e6e7
--- /dev/null
+++ b/templates/tdesign/spa/src/account/api/auth.js
@@ -0,0 +1,46 @@
+import { apiGet, apiPost } from './http'
+
+/** 获取当前登录用户信息(未登录返回 ok=false + code=not_login) */
+export function getMe() {
+  return apiGet('/account/api/me', {}, { silent: true })
+}
+
+/** 登录:username + password */
+export function accountLogin(username, password) {
+  return apiPost('/account/api/login', { username, password })
+}
+
+/** 注册:username + password + password2 + email(可选) + qq(可选) */
+export function accountRegister(data) {
+  return apiPost('/account/api/register', {
+    username: data.username,
+    password: data.password,
+    password2: data.password2,
+    email: data.email || '',
+    qq: data.qq || '',
+  })
+}
+
+/** 更新个人信息:email + qq */
+export function updateProfile(data) {
+  return apiPost('/account/api/update_profile', {
+    email: data.email || '',
+    qq: data.qq || '',
+  })
+}
+
+/** 修改密码:old_password + new_password + new_password2 */
+export function changePassword(data) {
+  return apiPost('/account/api/change_password', {
+    old_password: data.old_password,
+    new_password: data.new_password,
+    new_password2: data.new_password2,
+  })
+}
+
+/** 退出登录地址(服务端清 cookie 后回登录页) */
+export function logoutUrl() {
+  const boot = window.__TD_BOOT__ || {}
+  const base = boot.routeBase || '/index.php?_r='
+  return base + 'account/logout'
+}
diff --git a/templates/tdesign/spa/src/account/api/http.js b/templates/tdesign/spa/src/account/api/http.js
new file mode 100644
index 0000000..a2774cf
--- /dev/null
+++ b/templates/tdesign/spa/src/account/api/http.js
@@ -0,0 +1,114 @@
+import axios from 'axios'
+import { MessagePlugin } from 'tdesign-vue-next'
+
+/**
+ * MNBT 用户中心(user_info 插件)路由 API 封装
+ *
+ * user_info 插件通过 P2 通用路由暴露 JSON API:
+ *   POST/GET {routeBase}/account/api/login 等
+ * routeBase 由 PHP 入口注入(index.php?_r=),响应为 { code, ...extra } 结构:
+ *   - code === 'ok'         → 成功,extra 为数据载荷
+ *   - code === 'not_login'  → 未登录(前端跳登录页)
+ *   - 其他 code             → 失败消息
+ */
+
+function getBoot() {
+  return window.__TD_BOOT__ || {}
+}
+
+/** 读取 CSRF token(meta 优先,回退 cookie) */
+export function getCsrfToken() {
+  const meta = document.querySelector('meta[name="csrf-token"]')
+  if (meta && meta.content) return meta.content
+  try {
+    const cookies = document.cookie.split('; ')
+    for (const c of cookies) {
+      const idx = c.indexOf('=')
+      if (idx > -1 && c.slice(0, idx) === 'MNBT_CSRF_TOKEN') {
+        return decodeURIComponent(c.slice(idx + 1))
+      }
+    }
+  } catch { /* ignore */ }
+  return ''
+}
+
+const http = axios.create({ timeout: 60000 })
+
+/** 构造完整 API URL */
+export function apiUrl(path) {
+  const boot = getBoot()
+  const base = boot.routeBase || '/index.php?_r='
+  return base + path.replace(/^\//, '')
+}
+
+/**
+ * 发送路由 API 请求
+ * @param {string} method GET|POST
+ * @param {string} path   路由路径(/account/api/me)
+ * @param {object} data   POST 表单数据
+ * @param {{silent?:boolean}} opts
+ * @returns {Promise<{ok:boolean, code:string, message:string, data:object, raw:object}>}
+ */
+export async function routeRequest(method, path, data = {}, { silent = false } = {}) {
+  try {
+    let res
+    if (method === 'GET') {
+      res = await http.get(apiUrl(path), { params: data })
+    } else {
+      const body = new URLSearchParams()
+      Object.keys(data || {}).forEach((k) => {
+        const v = data[k]
+        if (v === undefined || v === null) return
+        body.append(k, String(v))
+      })
+      const token = getCsrfToken()
+      if (token && !body.get('_csrf')) body.append('_csrf', token)
+      res = await http.post(apiUrl(path), body, {
+        headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' },
+      })
+    }
+    const raw = res.data
+    if (raw && typeof raw === 'object' && typeof raw.code === 'string') {
+      if (raw.code === 'ok') {
+        return { ok: true, code: 'ok', message: 'ok', data: raw, raw }
+      }
+      if (raw.code === 'not_login') {
+        return { ok: false, code: 'not_login', message: '请先登录', data: raw, raw }
+      }
+      return { ok: false, code: raw.code, message: raw.code || '请求失败', data: raw, raw }
+    }
+    // 兼容 { success:true, ... } 风格
+    if (raw && typeof raw === 'object' && raw.success === true) {
+      return { ok: true, code: 'ok', message: raw.msg || 'ok', data: raw, raw }
+    }
+    if (raw && typeof raw === 'object' && raw.success === false) {
+      const msg = raw.msg || raw.code || raw.message || '请求失败'
+      return { ok: false, code: msg, message: msg, data: raw, raw }
+    }
+    return { ok: true, code: 'ok', message: 'ok', data: raw ?? {}, raw }
+  } catch (e) {
+    let msg = e.message || '网络错误'
+    const body = e?.response?.data
+    if (typeof body === 'string' && body.trim()) {
+      const plain = body.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim()
+      if (plain) msg = plain.slice(0, 160)
+    } else if (body && typeof body === 'object') {
+      msg = body.code || body.msg || body.message || msg
+    }
+    console.error(`[accountApi] ${method} ${path} 异常:`, e, body)
+    if (!silent) MessagePlugin.error(msg)
+    return { ok: false, code: msg, message: msg, data: null, raw: body ?? null }
+  }
+}
+
+/** GET 快捷方法 */
+export async function apiGet(path, params = {}, opts = {}) {
+  return routeRequest('GET', path, params, opts)
+}
+
+/** POST 快捷方法 */
+export async function apiPost(path, data = {}, opts = {}) {
+  return routeRequest('POST', path, data, opts)
+}
+
+export default http
diff --git a/templates/tdesign/spa/src/account/api/plugins.js b/templates/tdesign/spa/src/account/api/plugins.js
new file mode 100644
index 0000000..5990c38
--- /dev/null
+++ b/templates/tdesign/spa/src/account/api/plugins.js
@@ -0,0 +1,93 @@
+import { apiGet, apiPost } from './http'
+
+/**
+ * balance + hosting_shop 插件路由 API 封装
+ *
+ * 插件通过 P2 通用路由(routeBase)暴露 JSON API:
+ *   balance:      /balance/api/info、/balance/api/methods、/balance/api/create_recharge
+ *   hosting_shop: /shop/api/plans、/shop/api/assets、/shop/api/orders、/shop/api/create_order
+ *
+ * 路由是否可用由插件是否启用决定,前端依据 boot.plugins 标志按需展示。
+ */
+
+/** 插件能力检测:boot.plugins.balance / boot.plugins.hosting_shop */
+export function pluginEnabled(name) {
+  const boot = window.__TD_BOOT__ || {}
+  return !!(boot.plugins && boot.plugins[name])
+}
+
+/** 当前余额(分)格式化 → 元(保留 2 位小数) */
+export function centsToYuan(cents) {
+  const n = Number(cents || 0)
+  return (n / 100).toFixed(2)
+}
+
+/**
+ * 处理支付跳转响应(create_recharge / create_order 通用)
+ * @returns {boolean} 是否已触发跳转(html 弹窗 / redirect 跳转)
+ */
+export function goPay(res) {
+  const data = res?.data || {}
+  if (data.html) {
+    const win = window.open('', '_blank')
+    if (win) {
+      win.document.open()
+      win.document.write(data.html)
+      win.document.close()
+    }
+    return true
+  }
+  if (data.redirect) {
+    window.location.href = data.redirect
+    return true
+  }
+  return false
+}
+
+/* ============================================================
+ *  balance 插件
+ * ============================================================ */
+
+/** 余额信息 + 流水分页:{ balance_cents, balance_yuan, logs } */
+export function getBalanceInfo(page = 1, perPage = 15) {
+  return apiGet('/balance/api/info', { page, per_page: perPage })
+}
+
+/** 可用支付方式(排除余额自身) */
+export function getBalanceMethods() {
+  return apiGet('/balance/api/methods')
+}
+
+/** 创建充值订单:amount(元) + type(如 epay__alipay) → 返回支付 HTML */
+export function createRecharge(amount, type) {
+  return apiPost('/balance/api/create_recharge', { amount, type })
+}
+
+/* ============================================================
+ *  hosting_shop 插件
+ * ============================================================ */
+
+/** 上架套餐列表 */
+export function getShopPlans() {
+  return apiGet('/shop/api/plans')
+}
+
+/** 我的主机资产 */
+export function getShopAssets() {
+  return apiGet('/shop/api/assets')
+}
+
+/** 我的订单(分页) */
+export function getShopOrders(page = 1, perPage = 15) {
+  return apiGet('/shop/api/orders', { page, per_page: perPage })
+}
+
+/** 可用支付方式(hosting_shop 下单用,含余额支付等全部方式) */
+export function getShopMethods() {
+  return apiGet('/shop/api/methods')
+}
+
+/** 创建购买订单:plan_id + period + type → 返回支付 HTML / 0 元直接 redirect */
+export function createShopOrder(planId, period, type) {
+  return apiPost('/shop/api/create_order', { plan_id: planId, period, type })
+}
diff --git a/templates/tdesign/spa/src/account/layouts/AccountLayout.vue b/templates/tdesign/spa/src/account/layouts/AccountLayout.vue
new file mode 100644
index 0000000..7e25a26
--- /dev/null
+++ b/templates/tdesign/spa/src/account/layouts/AccountLayout.vue
@@ -0,0 +1,677 @@
+<template>
+  <div class="td-layout" :class="{ collapsed: sidebarCollapsed, 'mobile-open': mobileOpen }">
+    <!-- 侧栏 -->
+    <aside class="td-sidebar">
+      <!-- 品牌区 -->
+      <div class="td-side-brand">
+        <div v-show="!sidebarCollapsed || isMobile" class="brand-text">
+          <strong>{{ siteName }}</strong>
+          <span>用户中心</span>
+        </div>
+        <button v-show="sidebarCollapsed && !isMobile" class="brand-collapsed-btn" @click="toggleSidebar" title="展开侧栏">
+          <i class="mdi mdi-menu"></i>
+        </button>
+      </div>
+
+      <!-- 导航区 -->
+      <div class="td-side-scroll">
+        <!-- 概览 -->
+        <div class="td-side-group" v-show="!sidebarCollapsed || isMobile">
+          <div class="td-side-group-label">
+            <i class="mdi mdi-view-dashboard-outline"></i>
+            <span>概览</span>
+          </div>
+        </div>
+        <ul class="td-side-menu">
+          <li class="td-side-item">
+            <router-link to="/dashboard" custom v-slot="{ navigate, isActive }">
+              <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                <i class="mdi mdi-home"></i><span>控制面板</span>
+              </a>
+            </router-link>
+          </li>
+        </ul>
+
+        <!-- 账户 -->
+        <div class="td-side-group" v-show="!sidebarCollapsed || isMobile">
+          <div class="td-side-group-label">
+            <i class="mdi mdi-account-circle-outline"></i>
+            <span>账户</span>
+          </div>
+        </div>
+        <ul class="td-side-menu">
+          <li class="td-side-item">
+            <router-link to="/profile" custom v-slot="{ navigate, isActive }">
+              <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                <i class="mdi mdi-account-details"></i><span>个人信息</span>
+              </a>
+            </router-link>
+          </li>
+          <li class="td-side-item">
+            <router-link to="/password" custom v-slot="{ navigate, isActive }">
+              <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                <i class="mdi mdi-lock-outline"></i><span>修改密码</span>
+              </a>
+            </router-link>
+          </li>
+        </ul>
+
+        <!-- 余额 -->
+        <template v-if="hasBalance">
+          <div class="td-side-group" v-show="!sidebarCollapsed || isMobile">
+            <div class="td-side-group-label">
+              <i class="mdi mdi-wallet-outline"></i>
+              <span>余额</span>
+            </div>
+          </div>
+          <ul class="td-side-menu">
+            <li class="td-side-item">
+              <router-link to="/balance" custom v-slot="{ navigate, isActive }">
+                <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                  <i class="mdi mdi-wallet"></i><span>我的余额</span>
+                </a>
+              </router-link>
+            </li>
+            <li class="td-side-item">
+              <router-link to="/balance/recharge" custom v-slot="{ navigate, isActive }">
+                <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                  <i class="mdi mdi-cash"></i><span>余额充值</span>
+                </a>
+              </router-link>
+            </li>
+          </ul>
+        </template>
+
+        <!-- 商城 -->
+        <template v-if="hasShop">
+          <div class="td-side-group" v-show="!sidebarCollapsed || isMobile">
+            <div class="td-side-group-label">
+              <i class="mdi mdi-cart-outline"></i>
+              <span>商城</span>
+            </div>
+          </div>
+          <ul class="td-side-menu">
+            <li class="td-side-item">
+              <router-link to="/shop" custom v-slot="{ navigate, isActive }">
+                <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                  <i class="mdi mdi-cart"></i><span>主机商城</span>
+                </a>
+              </router-link>
+            </li>
+            <li class="td-side-item">
+              <router-link to="/hosting" custom v-slot="{ navigate, isActive }">
+                <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                  <i class="mdi mdi-server"></i><span>我的主机</span>
+                </a>
+              </router-link>
+            </li>
+            <li class="td-side-item">
+              <router-link to="/orders" custom v-slot="{ navigate, isActive }">
+                <a href="javascript:;" :class="{ active: isActive }" @click="navigate">
+                  <i class="mdi mdi-receipt"></i><span>我的订单</span>
+                </a>
+              </router-link>
+            </li>
+          </ul>
+        </template>
+      </div>
+
+      <!-- 底部用户卡 -->
+      <div v-show="!sidebarCollapsed || isMobile" class="td-side-user">
+        <div class="td-side-user-avatar">
+          <i class="mdi mdi-account-circle"></i>
+        </div>
+        <div class="td-side-user-info">
+          <strong>{{ userName }}</strong>
+          <span>已登录</span>
+        </div>
+        <button class="td-side-user-logout" title="退出登录" @click="onLogout">
+          <i class="mdi mdi-logout-variant"></i>
+        </button>
+      </div>
+      <a v-show="!sidebarCollapsed || isMobile" :href="panelUrl || 'javascript:;'" class="td-side-panel-link">
+        <i class="mdi mdi-server"></i><span>进入主机管理面板</span>
+      </a>
+    </aside>
+
+    <!-- 主区 -->
+    <div class="td-main">
+      <header class="td-header">
+        <div class="td-header-left">
+          <button class="td-icon-btn" @click="toggleSidebar" :title="sidebarCollapsed ? '展开侧栏' : '收起侧栏'">
+            <i class="mdi" :class="sidebarCollapsed ? 'mdi-menu' : 'mdi-backburger'"></i>
+          </button>
+          <button class="td-icon-btn" @click="refreshCurrent" title="刷新当前页">
+            <i class="mdi mdi-refresh"></i>
+          </button>
+          <div class="td-header-title">
+            <span class="td-header-crumb">{{ pageTitle }}</span>
+          </div>
+        </div>
+        <div class="td-header-right">
+          <a class="td-header-home" :href="homeUrl || 'javascript:;'" title="返回官网首页">
+            <i class="mdi mdi-home-outline"></i>
+          </a>
+          <t-tag theme="success" variant="light" shape="round" size="small" class="user-tag">
+            <i class="mdi mdi-account-circle"></i>
+            {{ userName }}
+          </t-tag>
+          <t-dropdown :options="userMenuOptions" @click="onUserMenuClick">
+            <button class="td-icon-btn">
+              <i class="mdi mdi-dots-vertical"></i>
+            </button>
+          </t-dropdown>
+        </div>
+      </header>
+
+      <main class="td-content">
+        <router-view v-slot="{ Component, route }">
+          <keep-alive :include="cachedViews">
+            <component :is="Component" :key="route.fullPath" />
+          </keep-alive>
+        </router-view>
+      </main>
+    </div>
+
+    <!-- 移动端遮罩 -->
+    <div v-if="mobileOpen" class="td-mask" @click="mobileOpen = false"></div>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref, onMounted, onUnmounted, nextTick, watch } from 'vue'
+import { useRoute, useRouter } from 'vue-router'
+import { DialogPlugin } from 'tdesign-vue-next'
+import { logoutUrl } from '@/account/api/auth'
+import { pluginEnabled } from '@/account/api/plugins'
+
+const route = useRoute()
+const router = useRouter()
+const boot = window.__TD_BOOT__ || {}
+
+const siteName = boot.siteName || 'MNBT'
+const panelUrl = boot.panelUrl || ''
+const homeUrl = boot.homeUrl || ''
+const userName = boot.accountUser?.username || boot.user || 'user'
+
+const hasBalance = pluginEnabled('balance')
+const hasShop = pluginEnabled('hosting_shop')
+
+const sidebarCollapsed = ref(false)
+const mobileOpen = ref(false)
+const isMobile = ref(false)
+
+const cachedViews = ref([])
+
+const pageTitle = computed(() => route.meta.title || '用户中心')
+
+const userMenuOptions = computed(() => {
+  const list = [
+    { content: '控制面板', value: 'dashboard' },
+    { content: '个人信息', value: 'profile' },
+    { content: '修改密码', value: 'password' },
+  ]
+  if (hasBalance) list.push({ content: '余额中心', value: 'balance' })
+  if (hasShop) list.push({ content: '主机商城', value: 'shop' })
+  list.push({ content: '退出登录', value: 'logout', theme: 'error' })
+  return list
+})
+
+function checkMobile() {
+  isMobile.value = window.innerWidth < 992
+  if (!isMobile.value) mobileOpen.value = false
+}
+
+function toggleSidebar() {
+  if (isMobile.value) {
+    mobileOpen.value = !mobileOpen.value
+  } else {
+    sidebarCollapsed.value = !sidebarCollapsed.value
+  }
+}
+
+function refreshCurrent() {
+  const key = cachedViews.value.length
+  cachedViews.value = [`__refresh_${key}_${Date.now()}`]
+  nextTick(() => {
+    cachedViews.value = []
+  })
+}
+
+function onLogout() {
+  const dialog = DialogPlugin.confirm({
+    header: '退出登录',
+    body: '确定要退出当前账号吗?',
+    confirmBtn: { content: '退出', theme: 'danger' },
+    onConfirm: async () => {
+      dialog.destroy()
+      window.location.href = logoutUrl()
+    },
+    onClose: () => dialog.destroy(),
+  })
+}
+
+function onUserMenuClick(item) {
+  const v = item?.value
+  if (v === 'logout') {
+    onLogout()
+    return
+  }
+  const targets = {
+    dashboard: '/dashboard',
+    profile: '/profile',
+    password: '/password',
+    balance: '/balance',
+    shop: '/shop',
+  }
+  if (targets[v]) router.push(targets[v])
+}
+
+watch(
+  () => route.path,
+  () => {
+    if (isMobile.value) mobileOpen.value = false
+  },
+  { immediate: true },
+)
+
+onMounted(() => {
+  checkMobile()
+  window.addEventListener('resize', checkMobile)
+})
+onUnmounted(() => {
+  window.removeEventListener('resize', checkMobile)
+})
+</script>
+
+<style scoped>
+.td-layout {
+  display: flex;
+  min-height: 100vh;
+  background: var(--td-bg);
+}
+
+/* ============== 侧栏 ============== */
+.td-sidebar {
+  width: var(--td-sidebar-width);
+  flex-shrink: 0;
+  background: var(--td-sidebar-bg);
+  color: var(--td-sidebar-text);
+  display: flex;
+  flex-direction: column;
+  border-right: 1px solid var(--td-sidebar-border);
+  transition: width var(--td-dur-lg) var(--td-ease-out);
+  z-index: 30;
+  position: relative;
+}
+.td-layout.collapsed .td-sidebar {
+  width: var(--td-sidebar-collapsed);
+}
+
+/* 品牌区 */
+.td-side-brand {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  padding: 0 18px;
+  height: var(--td-header-height);
+  box-sizing: border-box;
+  border-bottom: 1px solid var(--td-sidebar-border);
+}
+.brand-text {
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+  overflow: hidden;
+}
+.brand-text strong {
+  font-size: 15px;
+  color: var(--td-sidebar-text);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  font-weight: 700;
+  letter-spacing: 0.3px;
+}
+.brand-text span {
+  font-size: 11px;
+  color: var(--td-sidebar-text-3);
+  margin-top: 1px;
+}
+.brand-collapsed-btn {
+  width: 34px;
+  height: 34px;
+  border: none;
+  background: transparent;
+  border-radius: 8px;
+  cursor: pointer;
+  color: var(--td-sidebar-text-2);
+  display: grid;
+  place-items: center;
+  font-size: 20px;
+  margin: 0 auto;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+}
+.brand-collapsed-btn:hover {
+  background: var(--td-sidebar-hover);
+  color: var(--td-brand);
+}
+
+/* 滚动区 */
+.td-side-scroll {
+  flex: 1;
+  overflow-y: auto;
+  overflow-x: hidden;
+  padding: 10px 10px 16px;
+}
+
+/* 分组标签 */
+.td-side-group {
+  padding: 14px 12px 6px;
+}
+.td-side-group-label {
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  font-size: 12px;
+  font-weight: 500;
+  color: var(--td-sidebar-group-label);
+  user-select: none;
+}
+.td-side-group-label i {
+  font-size: 13px;
+  color: var(--td-sidebar-text-3);
+}
+
+/* 菜单 */
+.td-side-menu {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+.td-side-menu li {
+  margin: 0;
+}
+.td-side-menu a {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  padding: 9px 12px;
+  color: var(--td-sidebar-text-2);
+  font-size: 13px;
+  border-radius: 8px;
+  text-decoration: none;
+  cursor: pointer;
+  position: relative;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+  margin-bottom: 2px;
+}
+.td-side-menu a > i:first-child {
+  font-size: 17px;
+  width: 20px;
+  text-align: center;
+  flex-shrink: 0;
+  color: var(--td-sidebar-text-3);
+  transition: color var(--td-dur) var(--td-ease);
+}
+.td-side-menu a > span {
+  flex: 1;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.td-side-menu a:hover {
+  background: var(--td-sidebar-hover);
+  color: var(--td-sidebar-text);
+  text-decoration: none;
+}
+.td-side-menu a:hover > i:first-child {
+  color: var(--td-sidebar-text-2);
+}
+.td-side-menu a.active {
+  background: var(--td-sidebar-active-bg);
+  color: var(--td-sidebar-active-text);
+  font-weight: 500;
+}
+.td-side-menu a.active > i:first-child {
+  color: var(--td-sidebar-active-text);
+}
+.td-side-menu a.active::before {
+  content: '';
+  position: absolute;
+  left: -10px;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 3px;
+  height: 18px;
+  background: var(--td-brand);
+  border-radius: 0 3px 3px 0;
+}
+
+/* 底部用户卡 */
+.td-side-user {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  padding: 12px 14px;
+  border-top: 1px solid var(--td-sidebar-border);
+  background: var(--td-sidebar-surface);
+}
+.td-side-user-avatar {
+  width: 32px;
+  height: 32px;
+  border-radius: 50%;
+  background: linear-gradient(135deg, var(--td-brand) 0%, var(--td-brand-dark) 100%);
+  display: grid;
+  place-items: center;
+  color: #fff;
+  font-size: 18px;
+  flex-shrink: 0;
+}
+.td-side-user-info {
+  flex: 1;
+  min-width: 0;
+  display: flex;
+  flex-direction: column;
+}
+.td-side-user-info strong {
+  font-size: 13px;
+  color: var(--td-sidebar-text);
+  font-weight: 600;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.td-side-user-info span {
+  font-size: 11px;
+  color: var(--td-sidebar-text-3);
+  margin-top: 1px;
+}
+.td-side-user-logout {
+  width: 30px;
+  height: 30px;
+  border: none;
+  background: transparent;
+  border-radius: 6px;
+  cursor: pointer;
+  color: var(--td-sidebar-text-3);
+  font-size: 16px;
+  display: grid;
+  place-items: center;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+}
+.td-side-user-logout:hover {
+  background: var(--td-sidebar-hover);
+  color: var(--td-error);
+}
+
+/* 主机面板入口 */
+.td-side-panel-link {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  padding: 10px 12px;
+  margin: 0 10px 12px;
+  border-radius: 8px;
+  background: var(--td-sidebar-hover);
+  color: var(--td-sidebar-text-2);
+  font-size: 13px;
+  text-decoration: none;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+}
+.td-side-panel-link:hover {
+  background: var(--td-sidebar-active-bg);
+  color: var(--td-sidebar-active-text);
+  text-decoration: none;
+}
+.td-side-panel-link i {
+  font-size: 17px;
+}
+
+/* 折叠态 */
+.td-layout.collapsed .td-side-menu a > span,
+.td-layout.collapsed .brand-text,
+.td-layout.collapsed .td-side-group,
+.td-layout.collapsed .td-side-user,
+.td-layout.collapsed .td-side-panel-link span {
+  display: none;
+}
+.td-layout.collapsed .td-side-menu a {
+  justify-content: center;
+  padding: 10px 0;
+}
+.td-layout.collapsed .td-side-menu a.active::before {
+  left: 0;
+}
+.td-layout.collapsed .td-side-panel-link {
+  justify-content: center;
+  padding: 10px 0;
+}
+
+/* ============== 主区 ============== */
+.td-main {
+  flex: 1;
+  min-width: 0;
+  display: flex;
+  flex-direction: column;
+}
+.td-header {
+  height: var(--td-header-height);
+  background: var(--td-surface);
+  border-bottom: 1px solid var(--td-border);
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 20px;
+  position: sticky;
+  top: 0;
+  z-index: 20;
+  gap: 12px;
+}
+.td-header-left,
+.td-header-right {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+.td-icon-btn {
+  width: 34px;
+  height: 34px;
+  border: none;
+  background: transparent;
+  border-radius: 8px;
+  cursor: pointer;
+  color: var(--td-text-secondary);
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 18px;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+}
+.td-icon-btn:hover {
+  background: var(--td-bg);
+  color: var(--td-brand);
+}
+.td-header-home {
+  width: 34px;
+  height: 34px;
+  border-radius: 8px;
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 18px;
+  color: var(--td-text-secondary);
+  text-decoration: none;
+  transition: background var(--td-dur) var(--td-ease),
+              color var(--td-dur) var(--td-ease);
+}
+.td-header-home:hover {
+  background: var(--td-bg);
+  color: var(--td-brand);
+  text-decoration: none;
+}
+.td-header-title {
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  margin-left: 6px;
+}
+.td-header-crumb {
+  font-size: 15px;
+  font-weight: 600;
+  color: var(--td-text);
+  letter-spacing: 0.2px;
+}
+.user-tag {
+  max-width: 160px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.td-content {
+  flex: 1;
+  min-height: 0;
+}
+.td-mask {
+  position: fixed;
+  inset: 0;
+  background: rgba(15, 23, 42, 0.4);
+  z-index: 25;
+  animation: td-fade-in var(--td-dur) var(--td-ease);
+}
+
+@media (max-width: 991px) {
+  .td-sidebar {
+    position: fixed;
+    left: 0;
+    top: 0;
+    bottom: 0;
+    transform: translateX(-100%);
+    width: min(260px, 86vw) !important;
+    transition: transform var(--td-dur-lg) var(--td-ease-out);
+    box-shadow: var(--td-shadow-lg);
+  }
+  .td-layout.mobile-open .td-sidebar {
+    transform: translateX(0);
+  }
+  .td-layout.collapsed .td-sidebar {
+    width: min(260px, 86vw) !important;
+  }
+  .td-layout.collapsed .td-side-menu a > span,
+  .td-layout.collapsed .brand-text,
+  .td-layout.collapsed .td-side-group,
+  .td-layout.collapsed .td-side-user,
+  .td-layout.collapsed .td-side-panel-link span {
+    display: revert;
+  }
+  .td-layout.collapsed .td-side-menu a,
+  .td-layout.collapsed .td-side-panel-link {
+    justify-content: revert;
+    padding: 9px 12px;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/router/index.js b/templates/tdesign/spa/src/account/router/index.js
new file mode 100644
index 0000000..6959b14
--- /dev/null
+++ b/templates/tdesign/spa/src/account/router/index.js
@@ -0,0 +1,104 @@
+import { createRouter, createWebHashHistory } from 'vue-router'
+import AccountLayout from '@/account/layouts/AccountLayout.vue'
+
+const routes = [
+  {
+    path: '/login',
+    name: 'login',
+    component: () => import('@/account/views/LoginView.vue'),
+    meta: { title: '登录' },
+  },
+  {
+    path: '/register',
+    name: 'register',
+    component: () => import('@/account/views/RegisterView.vue'),
+    meta: { title: '注册' },
+  },
+  {
+    path: '/',
+    component: AccountLayout,
+    meta: { requiresAuth: true },
+    children: [
+      {
+        path: '',
+        redirect: '/dashboard',
+      },
+      {
+        path: 'dashboard',
+        name: 'dashboard',
+        component: () => import('@/account/views/DashboardView.vue'),
+        meta: { title: '控制面板', requiresAuth: true },
+      },
+      {
+        path: 'profile',
+        name: 'profile',
+        component: () => import('@/account/views/ProfileView.vue'),
+        meta: { title: '个人信息', requiresAuth: true },
+      },
+      {
+        path: 'password',
+        name: 'password',
+        component: () => import('@/account/views/PasswordView.vue'),
+        meta: { title: '修改密码', requiresAuth: true },
+      },
+      {
+        path: 'balance',
+        name: 'balance',
+        component: () => import('@/account/views/BalanceView.vue'),
+        meta: { title: '我的余额', requiresAuth: true },
+      },
+      {
+        path: 'balance/recharge',
+        name: 'balance-recharge',
+        component: () => import('@/account/views/RechargeView.vue'),
+        meta: { title: '余额充值', requiresAuth: true },
+      },
+      {
+        path: 'shop',
+        name: 'shop',
+        component: () => import('@/account/views/ShopView.vue'),
+        meta: { title: '主机商城', requiresAuth: true },
+      },
+      {
+        path: 'hosting',
+        name: 'hosting',
+        component: () => import('@/account/views/HostingView.vue'),
+        meta: { title: '我的主机', requiresAuth: true },
+      },
+      {
+        path: 'orders',
+        name: 'orders',
+        component: () => import('@/account/views/OrdersView.vue'),
+        meta: { title: '我的订单', requiresAuth: true },
+      },
+    ],
+  },
+  {
+    path: '/:pathMatch(.*)*',
+    redirect: '/dashboard',
+  },
+]
+
+const router = createRouter({
+  history: createWebHashHistory(),
+  routes,
+})
+
+function isLoggedIn() {
+  const boot = window.__TD_BOOT__ || {}
+  return !!(boot.loggedIn && boot.accountUser)
+}
+
+// 全局前置守卫:未登录只允许访问 /login /register
+router.beforeEach((to) => {
+  const loggedIn = isLoggedIn()
+  if (to.meta.requiresAuth && !loggedIn) {
+    return { name: 'login', query: { redirect: to.fullPath } }
+  }
+  if ((to.name === 'login' || to.name === 'register') && loggedIn) {
+    return { name: 'dashboard' }
+  }
+  return true
+})
+
+export default router
diff --git a/templates/tdesign/spa/src/account/views/BalanceView.vue b/templates/tdesign/spa/src/account/views/BalanceView.vue
new file mode 100644
index 0000000..1273be6
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/BalanceView.vue
@@ -0,0 +1,239 @@
+<template>
+  <div class="td-page">
+    <!-- 余额总览 -->
+    <div class="balance-hero td-card">
+      <div class="balance-hero-left">
+        <div class="balance-hero-icon"><i class="mdi mdi-wallet"></i></div>
+        <div>
+          <div class="balance-hero-label">当前余额</div>
+          <div class="balance-hero-amount">¥{{ balanceText }}</div>
+        </div>
+      </div>
+      <div class="balance-hero-right">
+        <t-button theme="primary" @click="router.push('/balance/recharge')">
+          <i class="mdi mdi-plus"></i> 立即充值
+        </t-button>
+      </div>
+    </div>
+
+    <!-- 流水列表 -->
+    <div class="td-card">
+      <div class="td-card-head">余额流水</div>
+      <div class="log-list" v-if="logs.length">
+        <div class="log-item" v-for="log in logs" :key="log.id">
+          <div class="log-type" :class="'log-type-' + (log.amount >= 0 ? 'in' : 'out')">
+            <i class="mdi" :class="typeIcon(log.type)"></i>
+          </div>
+          <div class="log-main">
+            <div class="log-title">
+              <strong>{{ typeText(log.type) }}</strong>
+              <span class="log-no" v-if="log.order_no">单号 {{ log.order_no }}</span>
+            </div>
+            <div class="log-meta">
+              <span v-if="log.remark">{{ log.remark }}</span>
+              <span class="log-time">{{ log.created_at }}</span>
+            </div>
+          </div>
+          <div class="log-amount" :class="log.amount >= 0 ? 'amount-in' : 'amount-out'">
+            {{ log.amount >= 0 ? '+' : '' }}{{ centsToYuan(log.amount) }}
+          </div>
+          <div class="log-balance">余额 ¥{{ centsToYuan(log.balance_after) }}</div>
+        </div>
+      </div>
+      <t-empty v-else description="暂无流水记录" style="padding: 40px 0" />
+
+      <!-- 分页 -->
+      <div class="pager" v-if="total > perPage">
+        <t-pagination
+          v-model:current="page"
+          :page-size="perPage"
+          :total="total"
+          :show-jumper="true"
+          @change="load"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, computed, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { getBalanceInfo, centsToYuan } from '@/account/api/plugins'
+
+const router = useRouter()
+const balanceCents = ref(0)
+const logs = ref([])
+const page = ref(1)
+const perPage = 15
+const total = ref(0)
+
+const balanceText = computed(() => centsToYuan(balanceCents.value))
+
+function typeText(type) {
+  return { recharge: '充值', consume: '消费', refund: '退款', adjust: '调整' }[type] || type
+}
+
+function typeIcon(type) {
+  return {
+    recharge: 'mdi-cash',
+    consume: 'mdi-cart-outline',
+    refund: 'mdi-currency-cny',
+    adjust: 'mdi-tune',
+  }[type] || 'mdi-history'
+}
+
+async function load() {
+  const res = await getBalanceInfo(page.value, perPage)
+  if (!res.ok) return
+  balanceCents.value = res.data.balance_cents ?? 0
+  const logsData = res.data.logs || {}
+  logs.value = logsData.list || []
+  total.value = logsData.total || 0
+}
+
+onMounted(load)
+</script>
+
+<style scoped>
+.balance-hero {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  gap: 16px;
+  padding: 24px;
+  margin-bottom: 16px;
+  background: linear-gradient(135deg, var(--td-brand) 0%, var(--td-brand-dark) 100%);
+  border: none;
+  flex-wrap: wrap;
+}
+.balance-hero-left {
+  display: flex;
+  align-items: center;
+  gap: 16px;
+  min-width: 0;
+}
+.balance-hero-icon {
+  width: 52px;
+  height: 52px;
+  border-radius: 12px;
+  background: rgba(255, 255, 255, 0.18);
+  display: grid;
+  place-items: center;
+  color: #fff;
+  font-size: 28px;
+  flex-shrink: 0;
+}
+.balance-hero-label {
+  font-size: 13px;
+  color: rgba(255, 255, 255, 0.85);
+}
+.balance-hero-amount {
+  font-size: 28px;
+  font-weight: 700;
+  color: #fff;
+  letter-spacing: -0.02em;
+  margin-top: 2px;
+}
+.balance-hero-right :deep(.t-button) {
+  --td-brand-color: #fff;
+  --td-brand-color-hover: rgba(255, 255, 255, 0.92);
+  --td-brand-color-active: rgba(255, 255, 255, 0.85);
+  --td-brand-color-focus: rgba(255, 255, 255, 0.2);
+  color: var(--td-brand);
+  border: none;
+}
+
+/* 流水列表 */
+.log-list {
+  padding: 4px 0;
+}
+.log-item {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  padding: 14px 18px;
+  border-bottom: 1px solid var(--td-border);
+}
+.log-item:last-child {
+  border-bottom: none;
+}
+.log-type {
+  width: 38px;
+  height: 38px;
+  border-radius: 10px;
+  display: grid;
+  place-items: center;
+  font-size: 19px;
+  flex-shrink: 0;
+}
+.log-type-in {
+  background: #e8f8f0;
+  color: #2ba471;
+}
+.log-type-out {
+  background: #fdeeee;
+  color: #d54941;
+}
+.log-main {
+  flex: 1;
+  min-width: 0;
+}
+.log-title {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  flex-wrap: wrap;
+}
+.log-title strong {
+  font-size: 14px;
+  color: var(--td-text);
+  font-weight: 600;
+}
+.log-no {
+  font-size: 12px;
+  color: var(--td-text-placeholder);
+}
+.log-meta {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  margin-top: 3px;
+  flex-wrap: wrap;
+}
+.log-time {
+  color: var(--td-text-placeholder);
+}
+.log-amount {
+  font-size: 15px;
+  font-weight: 600;
+  white-space: nowrap;
+}
+.amount-in {
+  color: #2ba471;
+}
+.amount-out {
+  color: #d54941;
+}
+.log-balance {
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  white-space: nowrap;
+  text-align: right;
+}
+
+.pager {
+  display: flex;
+  justify-content: flex-end;
+  padding: 16px 18px;
+  border-top: 1px solid var(--td-border);
+}
+
+@media (max-width: 640px) {
+  .log-balance {
+    display: none;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/DashboardView.vue b/templates/tdesign/spa/src/account/views/DashboardView.vue
new file mode 100644
index 0000000..6165af7
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/DashboardView.vue
@@ -0,0 +1,425 @@
+<template>
+  <div class="td-page">
+    <!-- 欢迎横幅 -->
+    <div class="welcome-card td-card">
+      <div class="welcome-left">
+        <div class="welcome-avatar">
+          <i class="mdi mdi-account-circle"></i>
+        </div>
+        <div>
+          <h2 class="welcome-title">你好,{{ user.username }}</h2>
+          <p class="welcome-sub">欢迎回到 {{ siteName }} 用户中心,在这里管理你的个人信息、余额与主机资产。</p>
+        </div>
+      </div>
+      <div class="welcome-right">
+        <t-button theme="primary" variant="outline" @click="router.push('/profile')">
+          <i class="mdi mdi-account-edit-outline"></i> 编辑资料
+        </t-button>
+      </div>
+    </div>
+
+    <!-- 业务概览(余额 / 主机 / 订单) -->
+    <div v-if="hasBalance || hasShop" class="overview-grid">
+      <div v-if="hasBalance" class="overview-card td-card" @click="router.push('/balance')">
+        <div class="overview-icon overview-blue"><i class="mdi mdi-wallet"></i></div>
+        <div class="overview-meta">
+          <span class="overview-label">账户余额</span>
+          <strong class="overview-value">¥{{ balanceText }}</strong>
+        </div>
+        <i class="mdi mdi-chevron-right overview-arrow"></i>
+      </div>
+      <div v-if="hasShop" class="overview-card td-card" @click="router.push('/hosting')">
+        <div class="overview-icon overview-green"><i class="mdi mdi-server"></i></div>
+        <div class="overview-meta">
+          <span class="overview-label">我的主机</span>
+          <strong class="overview-value">{{ assetCount }} 台</strong>
+        </div>
+        <i class="mdi mdi-chevron-right overview-arrow"></i>
+      </div>
+      <div v-if="hasShop" class="overview-card td-card" @click="router.push('/orders')">
+        <div class="overview-icon overview-orange"><i class="mdi mdi-receipt"></i></div>
+        <div class="overview-meta">
+          <span class="overview-label">我的订单</span>
+          <strong class="overview-value">{{ orderCount }} 笔</strong>
+        </div>
+        <i class="mdi mdi-chevron-right overview-arrow"></i>
+      </div>
+    </div>
+
+    <!-- 账户信息卡片 -->
+    <div class="info-grid">
+      <div class="info-card td-card">
+        <div class="info-icon info-icon-blue"><i class="mdi mdi-account-details"></i></div>
+        <div class="info-meta">
+          <span class="info-label">用户名</span>
+          <strong class="info-value">{{ user.username }}</strong>
+        </div>
+      </div>
+      <div class="info-card td-card">
+        <div class="info-icon info-icon-green"><i class="mdi mdi-email-outline"></i></div>
+        <div class="info-meta">
+          <span class="info-label">邮箱</span>
+          <strong class="info-value" :class="{ muted: !user.email }">{{ user.email || '未绑定' }}</strong>
+        </div>
+      </div>
+      <div class="info-card td-card">
+        <div class="info-icon info-icon-orange"><i class="mdi mdi-qqchat"></i></div>
+        <div class="info-meta">
+          <span class="info-label">QQ</span>
+          <strong class="info-value" :class="{ muted: !user.qq }">{{ user.qq || '未绑定' }}</strong>
+        </div>
+      </div>
+      <div class="info-card td-card">
+        <div class="info-icon info-icon-purple"><i class="mdi mdi-calendar-account-outline"></i></div>
+        <div class="info-meta">
+          <span class="info-label">注册时间</span>
+          <strong class="info-value">{{ user.created_at || '—' }}</strong>
+        </div>
+      </div>
+    </div>
+
+    <!-- 快速入口 -->
+    <div class="quick-wrap td-card">
+      <div class="td-card-head">
+        <span>快速入口</span>
+      </div>
+      <div class="quick-body">
+        <div class="quick-item" @click="router.push('/profile')">
+          <div class="quick-icon quick-icon-blue"><i class="mdi mdi-account-details"></i></div>
+          <div>
+            <strong>个人信息</strong>
+            <span>查看并修改邮箱、QQ 等联系方式</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <div class="quick-item" @click="router.push('/password')">
+          <div class="quick-icon quick-icon-orange"><i class="mdi mdi-shield-account-outline"></i></div>
+          <div>
+            <strong>修改密码</strong>
+            <span>定期更换密码,保障账号安全</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <div v-if="hasBalance" class="quick-item" @click="router.push('/balance')">
+          <div class="quick-icon quick-icon-green"><i class="mdi mdi-wallet"></i></div>
+          <div>
+            <strong>余额中心</strong>
+            <span>查看余额流水、在线充值</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <div v-if="hasShop" class="quick-item" @click="router.push('/shop')">
+          <div class="quick-icon quick-icon-purple"><i class="mdi mdi-cart"></i></div>
+          <div>
+            <strong>主机商城</strong>
+            <span>浏览并购买虚拟主机套餐</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <div v-if="hasShop" class="quick-item" @click="router.push('/hosting')">
+          <div class="quick-icon quick-icon-blue"><i class="mdi mdi-server"></i></div>
+          <div>
+            <strong>我的主机</strong>
+            <span>管理已开通的主机资产</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <div v-if="hasShop" class="quick-item" @click="router.push('/orders')">
+          <div class="quick-icon quick-icon-orange"><i class="mdi mdi-receipt"></i></div>
+          <div>
+            <strong>我的订单</strong>
+            <span>查看订单与支付状态</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </div>
+        <a v-if="panelUrl" class="quick-item" :href="panelUrl">
+          <div class="quick-icon quick-icon-green"><i class="mdi mdi-server"></i></div>
+          <div>
+            <strong>主机管理面板</strong>
+            <span>进入主机业务管理界面</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </a>
+        <a v-if="homeUrl" class="quick-item" :href="homeUrl">
+          <div class="quick-icon quick-icon-purple"><i class="mdi mdi-home-outline"></i></div>
+          <div>
+            <strong>返回官网</strong>
+            <span>浏览站点首页与产品服务</span>
+          </div>
+          <i class="mdi mdi-chevron-right quick-arrow"></i>
+        </a>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, computed, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { pluginEnabled, getBalanceInfo, getShopAssets, getShopOrders, centsToYuan } from '@/account/api/plugins'
+
+const router = useRouter()
+const boot = window.__TD_BOOT__ || {}
+const siteName = boot.siteName || 'MNBT'
+const panelUrl = boot.panelUrl || ''
+const homeUrl = boot.homeUrl || ''
+const user = boot.accountUser || { username: boot.user || 'user', email: '', qq: '', created_at: '' }
+
+const hasBalance = pluginEnabled('balance')
+const hasShop = pluginEnabled('hosting_shop')
+
+const balanceCents = ref(0)
+const assetCount = ref(0)
+const orderCount = ref(0)
+
+const balanceText = computed(() => centsToYuan(balanceCents.value))
+
+onMounted(async () => {
+  const tasks = []
+  if (hasBalance) tasks.push(getBalanceInfo(1, 1))
+  if (hasShop) {
+    tasks.push(getShopAssets())
+    tasks.push(getShopOrders(1, 1))
+  }
+  const results = await Promise.all(tasks)
+  let idx = 0
+  if (hasBalance) {
+    const res = results[idx++]
+    if (res.ok) balanceCents.value = res.data.balance_cents ?? 0
+  }
+  if (hasShop) {
+    const assetRes = results[idx++]
+    if (assetRes.ok) assetCount.value = (assetRes.data.assets || []).length
+    const orderRes = results[idx++]
+    if (orderRes.ok) orderCount.value = (orderRes.data.orders || {}).total || 0
+  }
+})
+</script>
+
+<style scoped>
+.td-page {
+  max-width: 1080px;
+}
+
+/* ============== 欢迎横幅 ============== */
+.welcome-card {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  gap: 16px;
+  padding: 24px;
+  margin-bottom: 16px;
+  flex-wrap: wrap;
+}
+.welcome-left {
+  display: flex;
+  align-items: center;
+  gap: 16px;
+  min-width: 0;
+}
+.welcome-avatar {
+  width: 56px;
+  height: 56px;
+  border-radius: 50%;
+  background: linear-gradient(135deg, var(--td-brand) 0%, var(--td-brand-dark) 100%);
+  display: grid;
+  place-items: center;
+  color: #fff;
+  font-size: 32px;
+  flex-shrink: 0;
+}
+.welcome-title {
+  margin: 0;
+  font-size: 20px;
+  font-weight: 700;
+  color: var(--td-text);
+}
+.welcome-sub {
+  margin: 6px 0 0;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+
+/* ============== 业务概览 ============== */
+.overview-grid {
+  display: grid;
+  grid-template-columns: repeat(3, 1fr);
+  gap: 16px;
+  margin-bottom: 16px;
+}
+.overview-card {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  padding: 18px;
+  cursor: pointer;
+  transition: box-shadow var(--td-dur) var(--td-ease),
+              transform var(--td-dur) var(--td-ease);
+}
+.overview-card:hover {
+  box-shadow: var(--td-shadow-md);
+  transform: translateY(-2px);
+}
+.overview-icon {
+  width: 46px;
+  height: 46px;
+  border-radius: 12px;
+  display: grid;
+  place-items: center;
+  font-size: 24px;
+  flex-shrink: 0;
+}
+.overview-blue { background: #e8f3ff; color: #0052d9; }
+.overview-green { background: #e8f8f0; color: #2ba471; }
+.overview-orange { background: #fff3e0; color: #e37318; }
+.overview-meta {
+  flex: 1;
+  min-width: 0;
+  display: flex;
+  flex-direction: column;
+}
+.overview-label {
+  font-size: 12px;
+  color: var(--td-text-placeholder);
+  margin-bottom: 4px;
+}
+.overview-value {
+  font-size: 18px;
+  color: var(--td-text);
+  font-weight: 700;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.overview-arrow {
+  color: var(--td-text-placeholder);
+  font-size: 18px;
+}
+
+/* ============== 账户信息卡片 ============== */
+.info-grid {
+  display: grid;
+  grid-template-columns: repeat(4, 1fr);
+  gap: 16px;
+  margin-bottom: 16px;
+}
+.info-card {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  padding: 18px;
+}
+.info-icon {
+  width: 44px;
+  height: 44px;
+  border-radius: 10px;
+  display: grid;
+  place-items: center;
+  font-size: 22px;
+  flex-shrink: 0;
+}
+.info-icon-blue { background: #e8f3ff; color: #0052d9; }
+.info-icon-green { background: #e8f8f0; color: #2ba471; }
+.info-icon-orange { background: #fff3e0; color: #e37318; }
+.info-icon-purple { background: #f3e8ff; color: #7a4dd0; }
+.info-meta {
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+}
+.info-label {
+  font-size: 12px;
+  color: var(--td-text-placeholder);
+  margin-bottom: 4px;
+}
+.info-value {
+  font-size: 15px;
+  color: var(--td-text);
+  font-weight: 600;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.info-value.muted {
+  color: var(--td-text-placeholder);
+  font-weight: 400;
+}
+
+/* ============== 快速入口 ============== */
+.quick-wrap {
+  overflow: hidden;
+}
+.quick-body {
+  padding: 6px 0;
+}
+.quick-item {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  padding: 14px 18px;
+  cursor: pointer;
+  text-decoration: none;
+  transition: background var(--td-dur) var(--td-ease);
+  border-radius: 8px;
+}
+.quick-item:hover {
+  background: var(--td-bg);
+  text-decoration: none;
+}
+.quick-icon {
+  width: 40px;
+  height: 40px;
+  border-radius: 10px;
+  display: grid;
+  place-items: center;
+  font-size: 20px;
+  flex-shrink: 0;
+}
+.quick-icon-blue { background: #e8f3ff; color: #0052d9; }
+.quick-icon-green { background: #e8f8f0; color: #2ba471; }
+.quick-icon-orange { background: #fff3e0; color: #e37318; }
+.quick-icon-purple { background: #f3e8ff; color: #7a4dd0; }
+.quick-item > div:nth-child(2) {
+  flex: 1;
+  min-width: 0;
+  display: flex;
+  flex-direction: column;
+}
+.quick-item strong {
+  font-size: 14px;
+  color: var(--td-text);
+  font-weight: 600;
+}
+.quick-item span {
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  margin-top: 3px;
+}
+.quick-arrow {
+  color: var(--td-text-placeholder);
+  font-size: 18px;
+}
+
+/* ============== 响应式 ============== */
+@media (max-width: 992px) {
+  .overview-grid {
+    grid-template-columns: repeat(2, 1fr);
+  }
+  .info-grid {
+    grid-template-columns: repeat(2, 1fr);
+  }
+}
+
+@media (max-width: 560px) {
+  .overview-grid {
+    grid-template-columns: 1fr;
+  }
+  .info-grid {
+    grid-template-columns: 1fr;
+  }
+  .welcome-card {
+    flex-direction: column;
+    align-items: flex-start;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/HostingView.vue b/templates/tdesign/spa/src/account/views/HostingView.vue
new file mode 100644
index 0000000..8e76d5a
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/HostingView.vue
@@ -0,0 +1,170 @@
+<template>
+  <div class="td-page">
+    <div class="td-page-head">
+      <div>
+        <h3 class="td-page-title"><i class="mdi mdi-server"></i> 我的主机</h3>
+        <p class="td-page-subtitle">查看已开通的虚拟主机资产</p>
+      </div>
+      <t-button variant="outline" @click="router.push('/shop')">
+        <i class="mdi mdi-cart"></i> 前往商城
+      </t-button>
+    </div>
+
+    <div v-if="assets.length" class="asset-grid">
+      <div class="asset-card td-card" v-for="asset in assets" :key="asset.id">
+        <div class="asset-head">
+          <div class="asset-icon"><i class="mdi mdi-server"></i></div>
+          <div class="asset-info">
+            <strong>{{ asset.plan_name || '虚拟主机' }}</strong>
+            <span class="asset-node">节点:{{ asset.ssbt || '—' }}</span>
+          </div>
+          <t-tag :theme="statusTheme(asset.status)" variant="light">
+            {{ statusText(asset.status) }}
+          </t-tag>
+        </div>
+        <div class="asset-meta">
+          <div class="meta-item">
+            <span>开通时间</span>
+            <b>{{ asset.created_at || '—' }}</b>
+          </div>
+          <div class="meta-item">
+            <span>到期时间</span>
+            <b :class="{ expired: isExpired(asset) }">{{ asset.expire_at || '—' }}</b>
+          </div>
+          <div class="meta-item" v-if="asset.sqldz">
+            <span>数据库地址</span>
+            <b>{{ asset.sqldz }}</b>
+          </div>
+        </div>
+        <div class="asset-foot" v-if="asset.host_user">
+          <span>主机账号:<b>{{ asset.host_user }}</b></span>
+          <span>主机密码:<b class="pass">{{ asset.host_pass }}</b></span>
+        </div>
+      </div>
+    </div>
+
+    <t-empty v-else description="暂无主机资产,前往商城选购" style="padding: 60px 0">
+      <t-button theme="primary" @click="router.push('/shop')">去选购套餐</t-button>
+    </t-empty>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { getShopAssets } from '@/account/api/plugins'
+
+const router = useRouter()
+const assets = ref([])
+
+function statusText(status) {
+  return { active: '运行中', expired: '已到期', cancelled: '已停用' }[status] || status
+}
+
+function statusTheme(status) {
+  if (status === 'active') return 'success'
+  if (status === 'expired') return 'warning'
+  return 'default'
+}
+
+function isExpired(asset) {
+  return !!asset.expire_at && asset.expire_at < new Date().toISOString().slice(0, 10)
+}
+
+async function load() {
+  const res = await getShopAssets()
+  if (res.ok) assets.value = res.data.assets || []
+}
+
+onMounted(load)
+</script>
+
+<style scoped>
+.asset-grid {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 16px;
+}
+.asset-card {
+  padding: 18px;
+}
+.asset-head {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+.asset-icon {
+  width: 42px;
+  height: 42px;
+  border-radius: 10px;
+  background: var(--td-brand-light);
+  color: var(--td-brand);
+  display: grid;
+  place-items: center;
+  font-size: 22px;
+  flex-shrink: 0;
+}
+.asset-info {
+  flex: 1;
+  min-width: 0;
+  display: flex;
+  flex-direction: column;
+}
+.asset-info strong {
+  font-size: 15px;
+  color: var(--td-text);
+  font-weight: 600;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.asset-node {
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  margin-top: 2px;
+}
+.asset-meta {
+  margin-top: 14px;
+  border-top: 1px dashed var(--td-border);
+  padding-top: 12px;
+}
+.meta-item {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 13px;
+  padding: 4px 0;
+}
+.meta-item span {
+  color: var(--td-text-placeholder);
+}
+.meta-item b {
+  color: var(--td-text);
+  font-weight: 500;
+}
+.meta-item b.expired {
+  color: var(--td-error);
+}
+.asset-foot {
+  margin-top: 12px;
+  display: flex;
+  justify-content: space-between;
+  gap: 8px;
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  flex-wrap: wrap;
+}
+.asset-foot b {
+  color: var(--td-text);
+  font-weight: 500;
+}
+.asset-foot .pass {
+  font-family: Consolas, monospace;
+}
+
+@media (max-width: 860px) {
+  .asset-grid {
+    grid-template-columns: 1fr;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/LoginView.vue b/templates/tdesign/spa/src/account/views/LoginView.vue
new file mode 100644
index 0000000..a207435
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/LoginView.vue
@@ -0,0 +1,287 @@
+<template>
+  <div class="td-login">
+    <!-- 左侧背景图区 -->
+    <div class="login-banner">
+      <img :src="bgImg" alt="" class="banner-img" />
+      <div class="banner-overlay"></div>
+      <div class="banner-content">
+        <h1 class="banner-title">{{ siteName }}</h1>
+        <p class="banner-subtitle">用户中心 · 我的账户、个人信息与安全</p>
+        <ul class="banner-features">
+          <li><i class="mdi mdi-account-details"></i> 个人信息管理</li>
+          <li><i class="mdi mdi-shield-account-outline"></i> 账号安全保障</li>
+          <li><i class="mdi mdi-sync"></i> 独立用户体系</li>
+        </ul>
+      </div>
+    </div>
+
+    <!-- 右侧登录卡片区 -->
+    <div class="login-side">
+      <div class="login-card">
+        <div class="brand">
+          <h2>{{ siteName }}</h2>
+          <p class="sub">用户中心 · 欢迎回来</p>
+        </div>
+
+        <t-form ref="formRef" :data="form" :rules="rules" :label-width="0" @submit="onSubmit">
+          <t-form-item name="username">
+            <t-input v-model="form.username" placeholder="用户名" clearable size="large" @enter="onSubmit">
+              <template #prefix-icon><i class="mdi mdi-account"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item name="password">
+            <t-input
+              v-model="form.password"
+              type="password"
+              placeholder="密码"
+              size="large"
+              @enter="onSubmit"
+            >
+              <template #prefix-icon><i class="mdi mdi-lock"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item>
+            <t-button theme="primary" type="submit" block size="large" :loading="loading">
+              登 录
+            </t-button>
+          </t-form-item>
+        </t-form>
+
+        <p class="switch-note">
+          还没有账号?
+          <router-link to="/register" class="switch-link">立即注册</router-link>
+        </p>
+
+        <p v-if="footer" class="footer-note" v-html="footer"></p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { reactive, ref, onMounted } from 'vue'
+import { useRoute, useRouter } from 'vue-router'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { accountLogin, getMe } from '@/account/api/auth'
+import bgImg from '@/shared/assets/login-bg.webp'
+
+const route = useRoute()
+const router = useRouter()
+const boot = window.__TD_BOOT__ || {}
+const siteName = boot.siteName || 'MNBT'
+const footer = boot.footer || ''
+
+const formRef = ref()
+const loading = ref(false)
+
+const form = reactive({
+  username: '',
+  password: '',
+})
+
+const rules = {
+  username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
+  password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
+}
+
+async function onSubmit({ validateResult }) {
+  if (validateResult !== true) return
+  loading.value = true
+  const res = await accountLogin(form.username.trim(), form.password)
+  loading.value = false
+  if (res.ok) {
+    MessagePlugin.success('登录成功,正在跳转…')
+    const me = await getMe()
+    window.__TD_BOOT__ = { ...boot, loggedIn: true, accountUser: me.ok ? me.data.user : null }
+    const redirect = typeof route.query.redirect === 'string' ? route.query.redirect : '/dashboard'
+    router.replace(redirect)
+    return
+  }
+}
+
+onMounted(() => {
+  if (boot.loggedIn && boot.accountUser) {
+    router.replace('/dashboard')
+  }
+})
+</script>
+
+<style scoped>
+.td-login {
+  min-height: 100vh;
+  display: grid;
+  grid-template-columns: 1fr 480px;
+  background: #f5f7fa;
+}
+
+/* ============== 左侧背景图区 ============== */
+.login-banner {
+  position: relative;
+  overflow: hidden;
+  min-height: 100vh;
+}
+.banner-img {
+  position: absolute;
+  inset: 0;
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  z-index: 0;
+}
+.banner-overlay {
+  position: absolute;
+  inset: 0;
+  background: linear-gradient(
+    135deg,
+    rgba(0, 30, 80, 0.65) 0%,
+    rgba(0, 50, 130, 0.45) 50%,
+    rgba(20, 80, 180, 0.35) 100%
+  );
+  z-index: 1;
+}
+.banner-content {
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  padding: 60px;
+  z-index: 2;
+  color: #fff;
+  animation: banner-fade-in 0.8s ease-out;
+}
+.banner-title {
+  margin: 0;
+  font-size: 38px;
+  font-weight: 700;
+  letter-spacing: -0.02em;
+  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
+}
+.banner-subtitle {
+  margin: 12px 0 28px;
+  font-size: 15px;
+  opacity: 0.92;
+  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
+}
+.banner-features {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  display: flex;
+  flex-wrap: wrap;
+  gap: 18px;
+}
+.banner-features li {
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  font-size: 13px;
+  opacity: 0.88;
+}
+.banner-features i {
+  font-size: 18px;
+  color: #4fc3f7;
+}
+
+@keyframes banner-fade-in {
+  from { opacity: 0; transform: translateY(20px); }
+  to   { opacity: 1; transform: translateY(0); }
+}
+
+/* ============== 右侧登录卡片区 ============== */
+.login-side {
+  display: grid;
+  place-items: center;
+  padding: 32px;
+  min-height: 100vh;
+  background: #fff;
+}
+.login-card {
+  width: min(380px, 100%);
+  animation: card-fade-in 0.6s ease-out;
+}
+@keyframes card-fade-in {
+  from { opacity: 0; transform: translateX(20px); }
+  to   { opacity: 1; transform: translateX(0); }
+}
+.brand {
+  margin-bottom: 32px;
+}
+.brand h2 {
+  margin: 0;
+  font-size: 24px;
+  font-weight: 700;
+  letter-spacing: -0.02em;
+  color: var(--td-text);
+}
+.sub {
+  margin: 8px 0 0;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.switch-note {
+  margin: 20px 0 0;
+  text-align: center;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.switch-link {
+  color: var(--td-brand);
+  font-weight: 500;
+}
+.footer-note {
+  margin: 16px 0 0;
+  text-align: center;
+  font-size: 12px;
+  color: var(--td-text-secondary);
+}
+
+/* ============== 响应式 ============== */
+@media (max-width: 960px) {
+  .td-login {
+    grid-template-columns: 1fr;
+  }
+  .login-banner {
+    min-height: 280px;
+    max-height: 36vh;
+  }
+  .banner-content {
+    padding: 32px;
+  }
+  .banner-title {
+    font-size: 26px;
+  }
+  .banner-subtitle {
+    margin: 8px 0 16px;
+    font-size: 13px;
+  }
+  .banner-features {
+    gap: 12px;
+  }
+  .banner-features li {
+    font-size: 12px;
+  }
+  .login-side {
+    padding: 24px;
+    min-height: auto;
+  }
+}
+
+@media (max-width: 600px) {
+  .login-banner {
+    min-height: 200px;
+    max-height: 30vh;
+  }
+  .banner-content {
+    padding: 20px;
+  }
+  .banner-title {
+    font-size: 20px;
+  }
+  .banner-features {
+    display: none;
+  }
+  .login-side {
+    padding: 20px 16px;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/OrdersView.vue b/templates/tdesign/spa/src/account/views/OrdersView.vue
new file mode 100644
index 0000000..bc86654
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/OrdersView.vue
@@ -0,0 +1,192 @@
+<template>
+  <div class="td-page">
+    <div class="td-page-head">
+      <div>
+        <h3 class="td-page-title"><i class="mdi mdi-receipt"></i> 我的订单</h3>
+        <p class="td-page-subtitle">查看主机购买订单与支付状态</p>
+      </div>
+      <t-button variant="outline" @click="router.push('/shop')">
+        <i class="mdi mdi-cart"></i> 继续购买
+      </t-button>
+    </div>
+
+    <div class="td-card" v-if="orders.length">
+      <div class="order-item" v-for="order in orders" :key="order.id">
+        <div class="order-icon" :class="'order-icon-' + orderStatus(order.status)">
+          <i class="mdi mdi-receipt"></i>
+        </div>
+        <div class="order-main">
+          <div class="order-title">
+            <strong>{{ order.plan_name }}</strong>
+            <span class="order-period">{{ periodLabel(order.period) }}</span>
+            <t-tag :theme="statusTheme(order.status)" variant="light" size="small">
+              {{ statusText(order.status) }}
+            </t-tag>
+          </div>
+          <div class="order-meta">
+            <span>单号 {{ order.order_no || '—' }}</span>
+            <span>下单 {{ order.created_at || '—' }}</span>
+            <span v-if="order.remark" class="order-remark">备注:{{ order.remark }}</span>
+          </div>
+        </div>
+        <div class="order-amount">¥{{ centsToYuan(order.amount_cents) }}</div>
+      </div>
+
+      <div class="pager" v-if="total > perPage">
+        <t-pagination
+          v-model:current="page"
+          :page-size="perPage"
+          :total="total"
+          :show-jumper="true"
+          @change="load"
+        />
+      </div>
+    </div>
+
+    <t-empty v-else description="暂无订单" style="padding: 60px 0">
+      <t-button theme="primary" @click="router.push('/shop')">去选购套餐</t-button>
+    </t-empty>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { getShopOrders, centsToYuan } from '@/account/api/plugins'
+
+const router = useRouter()
+
+const PERIODS = {
+  month: '月付',
+  quarter: '季付',
+  half_year: '半年付',
+  year: '年付',
+  two_year: '两年付',
+  three_year: '三年付',
+}
+
+const orders = ref([])
+const page = ref(1)
+const perPage = 15
+const total = ref(0)
+
+function periodLabel(p) {
+  return PERIODS[p] || p
+}
+
+function orderStatus(status) {
+  return { pending: 'pending', paid: 'paid', opened: 'opened', failed: 'failed', cancelled: 'cancelled' }[status] || 'pending'
+}
+
+function statusText(status) {
+  return { pending: '待支付', paid: '已支付', opened: '已开通', failed: '开通失败', cancelled: '已取消' }[status] || status
+}
+
+function statusTheme(status) {
+  if (status === 'opened') return 'success'
+  if (status === 'pending') return 'warning'
+  if (status === 'failed' || status === 'cancelled') return 'default'
+  return 'primary'
+}
+
+async function load() {
+  const res = await getShopOrders(page.value, perPage)
+  if (!res.ok) return
+  const data = res.data.orders || {}
+  orders.value = data.list || []
+  total.value = data.total || 0
+}
+
+onMounted(load)
+</script>
+
+<style scoped>
+.order-item {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  padding: 16px 18px;
+  border-bottom: 1px solid var(--td-border);
+}
+.order-item:last-child {
+  border-bottom: none;
+}
+.order-icon {
+  width: 40px;
+  height: 40px;
+  border-radius: 10px;
+  display: grid;
+  place-items: center;
+  font-size: 20px;
+  flex-shrink: 0;
+}
+.order-icon-pending {
+  background: #fff3e0;
+  color: #e37318;
+}
+.order-icon-opened {
+  background: #e8f8f0;
+  color: #2ba471;
+}
+.order-icon-paid {
+  background: #e8f3ff;
+  color: #0052d9;
+}
+.order-icon-failed,
+.order-icon-cancelled {
+  background: #f0f0f0;
+  color: #8c8c8c;
+}
+.order-main {
+  flex: 1;
+  min-width: 0;
+}
+.order-title {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  flex-wrap: wrap;
+}
+.order-title strong {
+  font-size: 14px;
+  color: var(--td-text);
+  font-weight: 600;
+}
+.order-period {
+  font-size: 12px;
+  color: var(--td-text-secondary);
+  background: var(--td-bg);
+  padding: 1px 8px;
+  border-radius: 10px;
+}
+.order-meta {
+  display: flex;
+  align-items: center;
+  gap: 14px;
+  font-size: 12px;
+  color: var(--td-text-placeholder);
+  margin-top: 4px;
+  flex-wrap: wrap;
+}
+.order-remark {
+  color: var(--td-warning);
+}
+.order-amount {
+  font-size: 16px;
+  font-weight: 700;
+  color: var(--td-text);
+  white-space: nowrap;
+}
+.pager {
+  display: flex;
+  justify-content: flex-end;
+  padding: 16px 18px;
+  border-top: 1px solid var(--td-border);
+}
+
+@media (max-width: 560px) {
+  .order-meta {
+    gap: 8px;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/PasswordView.vue b/templates/tdesign/spa/src/account/views/PasswordView.vue
new file mode 100644
index 0000000..74a83eb
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/PasswordView.vue
@@ -0,0 +1,84 @@
+<template>
+  <div class="td-page td-form-narrow">
+    <div class="td-card">
+      <div class="td-card-head">修改密码</div>
+      <div class="td-card-body">
+        <div class="td-form-note">
+          <b>安全提示:</b> 修改成功后旧密码立即失效,下次登录请使用新密码。
+        </div>
+
+        <t-form ref="formRef" :data="form" :rules="rules" label-width="90px" @submit="onSubmit">
+          <t-form-item label="原密码" name="old_password">
+            <t-input v-model="form.old_password" type="password" placeholder="请输入原密码" clearable />
+          </t-form-item>
+          <t-form-item label="新密码" name="new_password">
+            <t-input v-model="form.new_password" type="password" placeholder="至少6个字符" clearable />
+          </t-form-item>
+          <t-form-item label="确认新密码" name="new_password2">
+            <t-input v-model="form.new_password2" type="password" placeholder="请再次输入新密码" clearable />
+          </t-form-item>
+          <t-form-item>
+            <t-button theme="primary" type="submit" :loading="loading">确认修改</t-button>
+          </t-form-item>
+        </t-form>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { reactive, ref } from 'vue'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { changePassword } from '@/account/api/auth'
+
+const formRef = ref()
+const loading = ref(false)
+
+const form = reactive({
+  old_password: '',
+  new_password: '',
+  new_password2: '',
+})
+
+const rules = {
+  old_password: [{ required: true, message: '请输入原密码', trigger: 'blur' }],
+  new_password: [
+    { required: true, message: '请输入新密码', trigger: 'blur' },
+    { min: 6, message: '新密码至少6个字符', trigger: 'blur' },
+    {
+      validator: (val) => val !== form.old_password,
+      message: '新密码不能与原密码相同',
+      trigger: 'blur',
+    },
+  ],
+  new_password2: [
+    { required: true, message: '请再次输入新密码', trigger: 'blur' },
+    {
+      validator: (val) => val === form.new_password,
+      message: '两次输入的新密码不一致',
+      trigger: 'blur',
+    },
+  ],
+}
+
+async function onSubmit({ validateResult }) {
+  if (validateResult !== true) return
+  loading.value = true
+  const res = await changePassword(form)
+  loading.value = false
+  if (res.ok) {
+    MessagePlugin.success('密码修改成功')
+    form.old_password = ''
+    form.new_password = ''
+    form.new_password2 = ''
+    formRef.value?.clearValidate()
+    return
+  }
+}
+</script>
+
+<style scoped>
+.td-form-note {
+  margin-bottom: 20px;
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/ProfileView.vue b/templates/tdesign/spa/src/account/views/ProfileView.vue
new file mode 100644
index 0000000..9c360b8
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/ProfileView.vue
@@ -0,0 +1,86 @@
+<template>
+  <div class="td-page td-form-narrow">
+    <div class="td-card">
+      <div class="td-card-head">个人信息</div>
+      <div class="td-card-body">
+        <p class="form-intro">管理你的账号资料,带 <span class="req">*</span> 为必填项。</p>
+
+        <t-form ref="formRef" :data="form" :rules="rules" label-width="90px" @submit="onSubmit">
+          <t-form-item label="用户名">
+            <t-input :value="user.username" disabled />
+          </t-form-item>
+          <t-form-item label="邮箱" name="email">
+            <t-input v-model="form.email" placeholder="请输入邮箱(选填)" clearable />
+          </t-form-item>
+          <t-form-item label="QQ" name="qq">
+            <t-input v-model="form.qq" placeholder="请输入QQ号(选填)" clearable maxlength="12" />
+          </t-form-item>
+          <t-form-item label="注册时间">
+            <t-input :value="user.created_at || '—'" disabled />
+          </t-form-item>
+          <t-form-item>
+            <t-button theme="primary" type="submit" :loading="loading">保存修改</t-button>
+          </t-form-item>
+        </t-form>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { reactive, ref } from 'vue'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { updateProfile } from '@/account/api/auth'
+
+const boot = window.__TD_BOOT__ || {}
+const user = boot.accountUser || { username: '', email: '', qq: '', created_at: '' }
+
+const formRef = ref()
+const loading = ref(false)
+
+const form = reactive({
+  email: user.email || '',
+  qq: user.qq || '',
+})
+
+const rules = {
+  email: [
+    {
+      validator: (val) => val === '' || /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(val),
+      message: '邮箱格式不正确',
+      trigger: 'blur',
+    },
+  ],
+  qq: [
+    {
+      validator: (val) => val === '' || /^[0-9]{5,12}$/.test(val),
+      message: 'QQ号格式不正确',
+      trigger: 'blur',
+    },
+  ],
+}
+
+async function onSubmit({ validateResult }) {
+  if (validateResult !== true) return
+  loading.value = true
+  const res = await updateProfile({ email: form.email.trim(), qq: form.qq.trim() })
+  loading.value = false
+  if (res.ok) {
+    MessagePlugin.success('保存成功')
+    boot.accountUser.email = form.email.trim()
+    boot.accountUser.qq = form.qq.trim()
+    return
+  }
+}
+</script>
+
+<style scoped>
+.form-intro {
+  margin: 0 0 16px;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.req {
+  color: var(--td-error);
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/RechargeView.vue b/templates/tdesign/spa/src/account/views/RechargeView.vue
new file mode 100644
index 0000000..6dc4057
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/RechargeView.vue
@@ -0,0 +1,175 @@
+<template>
+  <div class="td-page td-form-narrow">
+    <div class="td-card">
+      <div class="td-card-head">余额充值</div>
+      <div class="td-card-body">
+        <p class="recharge-tip">选择支付方式并输入充值金额,金额到账后可用于购买主机等服务。</p>
+
+        <div v-if="methods.length">
+          <div class="form-label">支付方式</div>
+          <div class="pay-grid">
+            <label
+              v-for="m in methods"
+              :key="m.plugin + '__' + m.method"
+              class="pay-item"
+              :class="{ active: type === m.plugin + '__' + m.method }"
+            >
+              <input
+                type="radio"
+                name="paytype"
+                :value="m.plugin + '__' + m.method"
+                v-model="type"
+              />
+              <i class="mdi mdi-credit-card-outline"></i>
+              <span>{{ m.display_name || m.plugin + ' / ' + m.method }}</span>
+              <i class="mdi mdi-check pay-check" v-if="type === m.plugin + '__' + m.method"></i>
+            </label>
+          </div>
+
+          <div class="form-label">充值金额</div>
+          <t-input-number
+            v-model="amount"
+            :min="1"
+            :max="50000"
+            :step="10"
+            :precision="2"
+            theme="column"
+            size="large"
+            placeholder="最低 1 元"
+            style="width: 100%"
+          >
+            <template #prefixIcon><i class="mdi mdi-currency-cny"></i></template>
+          </t-input-number>
+
+          <div class="quick-btns">
+            <t-button v-for="v in quickAmounts" :key="v" variant="outline" size="small" @click="amount = v">
+              {{ v }} 元
+            </t-button>
+          </div>
+
+          <t-button theme="primary" size="large" block style="margin-top: 18px" :loading="loading" @click="onSubmit">
+            立即充值
+          </t-button>
+        </div>
+
+        <t-empty v-else description="暂无可用的支付方式,请联系管理员启用支付插件" style="padding: 40px 0" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted } from 'vue'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { getBalanceMethods, createRecharge, goPay } from '@/account/api/plugins'
+
+const methods = ref([])
+const type = ref('')
+const amount = ref(50)
+const loading = ref(false)
+const quickAmounts = [10, 50, 100, 500]
+
+async function loadMethods() {
+  const res = await getBalanceMethods()
+  if (!res.ok) return
+  methods.value = res.data.methods || []
+  if (methods.value.length) {
+    type.value = methods.value[0].plugin + '__' + methods.value[0].method
+  }
+}
+
+async function onSubmit() {
+  if (!type.value) {
+    MessagePlugin.warning('请选择支付方式')
+    return
+  }
+  if (!amount.value || amount.value < 1) {
+    MessagePlugin.warning('充值金额至少 1 元')
+    return
+  }
+  loading.value = true
+  const res = await createRecharge(amount.value, type.value)
+  loading.value = false
+  if (!res.ok) {
+    MessagePlugin.error(res.message || '创建订单失败')
+    return
+  }
+  if (!goPay(res)) {
+    MessagePlugin.success('充值订单已创建')
+  }
+}
+
+onMounted(loadMethods)
+</script>
+
+<style scoped>
+.recharge-tip {
+  margin: 0 0 18px;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.form-label {
+  font-size: 13px;
+  font-weight: 600;
+  color: var(--td-text);
+  margin: 0 0 10px;
+}
+.pay-grid {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 10px;
+  margin-bottom: 18px;
+}
+.pay-item {
+  position: relative;
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  padding: 12px 14px;
+  border: 1px solid var(--td-border);
+  border-radius: 10px;
+  cursor: pointer;
+  font-size: 13px;
+  color: var(--td-text);
+  transition: border-color var(--td-dur) var(--td-ease),
+              background var(--td-dur) var(--td-ease),
+              box-shadow var(--td-dur) var(--td-ease);
+}
+.pay-item input {
+  position: absolute;
+  opacity: 0;
+  pointer-events: none;
+}
+.pay-item i:first-child {
+  font-size: 20px;
+  color: var(--td-text-placeholder);
+}
+.pay-item:hover {
+  border-color: var(--td-brand);
+}
+.pay-item.active {
+  border-color: var(--td-brand);
+  background: var(--td-brand-light);
+  color: var(--td-brand);
+  box-shadow: 0 0 0 1px var(--td-brand) inset;
+}
+.pay-item.active i:first-child {
+  color: var(--td-brand);
+}
+.pay-check {
+  margin-left: auto;
+  font-size: 16px;
+}
+.quick-btns {
+  display: flex;
+  gap: 8px;
+  margin-top: 10px;
+  flex-wrap: wrap;
+}
+
+@media (max-width: 480px) {
+  .pay-grid {
+    grid-template-columns: 1fr;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/RegisterView.vue b/templates/tdesign/spa/src/account/views/RegisterView.vue
new file mode 100644
index 0000000..d64eac8
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/RegisterView.vue
@@ -0,0 +1,341 @@
+<template>
+  <div class="td-login">
+    <!-- 左侧背景图区 -->
+    <div class="login-banner">
+      <img :src="bgImg" alt="" class="banner-img" />
+      <div class="banner-overlay"></div>
+      <div class="banner-content">
+        <h1 class="banner-title">{{ siteName }}</h1>
+        <p class="banner-subtitle">用户中心 · 创建你的专属账号</p>
+        <ul class="banner-features">
+          <li><i class="mdi mdi-account-plus-outline"></i> 快速注册</li>
+          <li><i class="mdi mdi-shield-check-outline"></i> 密码加密存储</li>
+          <li><i class="mdi mdi-email-outline"></i> 支持邮箱与 QQ 绑定</li>
+        </ul>
+      </div>
+    </div>
+
+    <!-- 右侧注册卡片区 -->
+    <div class="login-side">
+      <div class="login-card">
+        <div class="brand">
+          <h2>{{ siteName }}</h2>
+          <p class="sub">用户中心 · 创建账号</p>
+        </div>
+
+        <t-form ref="formRef" :data="form" :rules="rules" :label-width="0" @submit="onSubmit">
+          <t-form-item name="username">
+            <t-input v-model="form.username" placeholder="用户名(3~32位字母、数字或下划线)" clearable size="large" maxlength="32" @enter="onSubmit">
+              <template #prefix-icon><i class="mdi mdi-account"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item name="password">
+            <t-input
+              v-model="form.password"
+              type="password"
+              placeholder="密码(至少6位)"
+              size="large"
+              @enter="onSubmit"
+            >
+              <template #prefix-icon><i class="mdi mdi-lock"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item name="password2">
+            <t-input
+              v-model="form.password2"
+              type="password"
+              placeholder="确认密码"
+              size="large"
+              @enter="onSubmit"
+            >
+              <template #prefix-icon><i class="mdi mdi-lock"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item name="email">
+            <t-input v-model="form.email" placeholder="邮箱(选填)" clearable size="large" @enter="onSubmit">
+              <template #prefix-icon><i class="mdi mdi-email-outline"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item name="qq">
+            <t-input v-model="form.qq" placeholder="QQ(选填)" clearable size="large" maxlength="12" @enter="onSubmit">
+              <template #prefix-icon><i class="mdi mdi-qqchat"></i></template>
+            </t-input>
+          </t-form-item>
+          <t-form-item>
+            <t-button theme="primary" type="submit" block size="large" :loading="loading">
+              注 册
+            </t-button>
+          </t-form-item>
+        </t-form>
+
+        <p class="switch-note">
+          已有账号?
+          <router-link to="/login" class="switch-link">直接登录</router-link>
+        </p>
+
+        <p v-if="footer" class="footer-note" v-html="footer"></p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { reactive, ref, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { accountRegister, getMe } from '@/account/api/auth'
+import bgImg from '@/shared/assets/login-bg.webp'
+
+const router = useRouter()
+const boot = window.__TD_BOOT__ || {}
+const siteName = boot.siteName || 'MNBT'
+const footer = boot.footer || ''
+
+const formRef = ref()
+const loading = ref(false)
+
+const form = reactive({
+  username: '',
+  password: '',
+  password2: '',
+  email: '',
+  qq: '',
+})
+
+const rules = {
+  username: [
+    { required: true, message: '请输入用户名', trigger: 'blur' },
+    {
+      pattern: /^[a-zA-Z0-9_]{3,32}$/,
+      message: '用户名为3~32位字母、数字或下划线',
+      trigger: 'blur',
+    },
+  ],
+  password: [
+    { required: true, message: '请输入密码', trigger: 'blur' },
+    { min: 6, message: '密码至少6个字符', trigger: 'blur' },
+  ],
+  password2: [
+    { required: true, message: '请再次输入密码', trigger: 'blur' },
+    {
+      validator: (val) => val === form.password,
+      message: '两次输入的密码不一致',
+      trigger: 'blur',
+    },
+  ],
+  email: [
+    {
+      validator: (val) => val === '' || /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(val),
+      message: '邮箱格式不正确',
+      trigger: 'blur',
+    },
+  ],
+  qq: [
+    {
+      validator: (val) => val === '' || /^[0-9]{5,12}$/.test(val),
+      message: 'QQ号格式不正确',
+      trigger: 'blur',
+    },
+  ],
+}
+
+async function onSubmit({ validateResult }) {
+  if (validateResult !== true) return
+  loading.value = true
+  const res = await accountRegister(form)
+  loading.value = false
+  if (res.ok) {
+    MessagePlugin.success('注册成功,正在跳转…')
+    const me = await getMe()
+    window.__TD_BOOT__ = { ...boot, loggedIn: true, accountUser: me.ok ? me.data.user : null }
+    router.replace('/dashboard')
+    return
+  }
+}
+
+onMounted(() => {
+  if (boot.loggedIn && boot.accountUser) {
+    router.replace('/dashboard')
+  }
+})
+</script>
+
+<style scoped>
+.td-login {
+  min-height: 100vh;
+  display: grid;
+  grid-template-columns: 1fr 480px;
+  background: #f5f7fa;
+}
+
+/* ============== 左侧背景图区 ============== */
+.login-banner {
+  position: relative;
+  overflow: hidden;
+  min-height: 100vh;
+}
+.banner-img {
+  position: absolute;
+  inset: 0;
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  z-index: 0;
+}
+.banner-overlay {
+  position: absolute;
+  inset: 0;
+  background: linear-gradient(
+    135deg,
+    rgba(0, 30, 80, 0.65) 0%,
+    rgba(0, 50, 130, 0.45) 50%,
+    rgba(20, 80, 180, 0.35) 100%
+  );
+  z-index: 1;
+}
+.banner-content {
+  position: absolute;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  padding: 60px;
+  z-index: 2;
+  color: #fff;
+  animation: banner-fade-in 0.8s ease-out;
+}
+.banner-title {
+  margin: 0;
+  font-size: 38px;
+  font-weight: 700;
+  letter-spacing: -0.02em;
+  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
+}
+.banner-subtitle {
+  margin: 12px 0 28px;
+  font-size: 15px;
+  opacity: 0.92;
+  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
+}
+.banner-features {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  display: flex;
+  flex-wrap: wrap;
+  gap: 18px;
+}
+.banner-features li {
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  font-size: 13px;
+  opacity: 0.88;
+}
+.banner-features i {
+  font-size: 18px;
+  color: #4fc3f7;
+}
+
+@keyframes banner-fade-in {
+  from { opacity: 0; transform: translateY(20px); }
+  to   { opacity: 1; transform: translateY(0); }
+}
+
+/* ============== 右侧注册卡片区 ============== */
+.login-side {
+  display: grid;
+  place-items: center;
+  padding: 32px;
+  min-height: 100vh;
+  background: #fff;
+}
+.login-card {
+  width: min(400px, 100%);
+  animation: card-fade-in 0.6s ease-out;
+}
+@keyframes card-fade-in {
+  from { opacity: 0; transform: translateX(20px); }
+  to   { opacity: 1; transform: translateX(0); }
+}
+.brand {
+  margin-bottom: 28px;
+}
+.brand h2 {
+  margin: 0;
+  font-size: 24px;
+  font-weight: 700;
+  letter-spacing: -0.02em;
+  color: var(--td-text);
+}
+.sub {
+  margin: 8px 0 0;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.switch-note {
+  margin: 20px 0 0;
+  text-align: center;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+}
+.switch-link {
+  color: var(--td-brand);
+  font-weight: 500;
+}
+.footer-note {
+  margin: 16px 0 0;
+  text-align: center;
+  font-size: 12px;
+  color: var(--td-text-secondary);
+}
+
+/* ============== 响应式 ============== */
+@media (max-width: 960px) {
+  .td-login {
+    grid-template-columns: 1fr;
+  }
+  .login-banner {
+    min-height: 260px;
+    max-height: 34vh;
+  }
+  .banner-content {
+    padding: 32px;
+  }
+  .banner-title {
+    font-size: 26px;
+  }
+  .banner-subtitle {
+    margin: 8px 0 16px;
+    font-size: 13px;
+  }
+  .banner-features {
+    gap: 12px;
+  }
+  .banner-features li {
+    font-size: 12px;
+  }
+  .login-side {
+    padding: 24px;
+    min-height: auto;
+  }
+}
+
+@media (max-width: 600px) {
+  .login-banner {
+    min-height: 180px;
+    max-height: 28vh;
+  }
+  .banner-content {
+    padding: 20px;
+  }
+  .banner-title {
+    font-size: 20px;
+  }
+  .banner-features {
+    display: none;
+  }
+  .login-side {
+    padding: 20px 16px;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/account/views/ShopView.vue b/templates/tdesign/spa/src/account/views/ShopView.vue
new file mode 100644
index 0000000..ac793e4
--- /dev/null
+++ b/templates/tdesign/spa/src/account/views/ShopView.vue
@@ -0,0 +1,338 @@
+<template>
+  <div class="td-page">
+    <div class="td-page-head">
+      <div>
+        <h3 class="td-page-title"><i class="mdi mdi-cart"></i> 主机商城</h3>
+        <p class="td-page-subtitle">选择适合你的虚拟主机套餐,支付后自动开通</p>
+      </div>
+      <t-button variant="outline" @click="router.push('/hosting')">
+        <i class="mdi mdi-server"></i> 我的主机
+      </t-button>
+    </div>
+
+    <div v-if="plans.length" class="plan-grid">
+      <div class="plan-card td-card" v-for="plan in plans" :key="plan.id">
+        <div class="plan-head">
+          <div class="plan-name">{{ plan.name }}</div>
+          <span v-if="plan.category" class="plan-category">{{ plan.category }}</span>
+        </div>
+        <p class="plan-desc">{{ plan.description || '暂无介绍' }}</p>
+
+        <ul class="plan-specs">
+          <li><i class="mdi mdi-cloud-outline"></i><span>网页空间</span><b>{{ plan.spec_web }} MB</b></li>
+          <li><i class="mdi mdi-database"></i><span>数据库</span><b>{{ plan.spec_sql }} MB</b></li>
+          <li><i class="mdi mdi-transfer"></i><span>月流量</span><b>{{ plan.spec_flow > 0 ? plan.spec_flow + ' GB' : '不限' }}</b></li>
+          <li><i class="mdi mdi-web"></i><span>绑定域名</span><b>{{ plan.spec_domain }} 个</b></li>
+        </ul>
+
+        <div class="plan-foot">
+          <div class="plan-price">
+            <template v-if="plan.periods.length">
+              <span class="price-num">¥{{ centsToYuan(minPrice(plan)) }}</span>
+              <span class="price-unit">起</span>
+            </template>
+            <span v-else class="price-empty">未设置价格</span>
+          </div>
+          <t-button theme="primary" size="small" :disabled="!plan.periods.length" @click="openOrder(plan)">
+            {{ plan.periods.length ? '立即购买' : '暂不可购' }}
+          </t-button>
+        </div>
+      </div>
+    </div>
+
+    <t-empty v-else description="暂无可购买的套餐" style="padding: 60px 0" />
+
+    <!-- 下单对话框 -->
+    <t-dialog
+      v-model:visible="dialogVisible"
+      :header="'购买:' + (currentPlan?.name || '')"
+      :confirm-btn="{ content: '确认购买', theme: 'primary', loading: submitting }"
+      :cancel-btn="'取消'"
+      :on-confirm="onConfirmOrder"
+    >
+      <div class="order-body">
+        <div class="order-label">购买周期</div>
+        <div class="period-grid">
+          <label
+            v-for="p in currentPeriods"
+            :key="p"
+            class="period-item"
+            :class="{ active: period === p }"
+          >
+            <input type="radio" name="period" :value="p" v-model="period" />
+            <span class="period-name">{{ periodLabel(p) }}</span>
+            <span class="period-price">¥{{ centsToYuan(currentPlan.prices[p]) }}</span>
+          </label>
+        </div>
+
+        <template v-if="isFreePlan">
+          <div class="free-tip"><i class="mdi mdi-check-circle-outline"></i> 免费套餐,下单后立即开通</div>
+        </template>
+        <template v-else>
+          <div class="order-label" style="margin-top: 16px">支付方式</div>
+          <div class="period-grid">
+            <label
+              v-for="m in methods"
+              :key="m.plugin + '__' + m.method"
+              class="period-item"
+              :class="{ active: payType === m.plugin + '__' + m.method }"
+            >
+              <input type="radio" name="paytype" :value="m.plugin + '__' + m.method" v-model="payType" />
+              <span class="period-name">{{ m.display_name || m.plugin + ' / ' + m.method }}</span>
+            </label>
+          </div>
+          <p v-if="!methods.length" class="no-methods">暂无可用的支付方式</p>
+        </template>
+      </div>
+    </t-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ref, computed, onMounted } from 'vue'
+import { useRouter } from 'vue-router'
+import { MessagePlugin } from 'tdesign-vue-next'
+import { getShopPlans, getShopMethods, createShopOrder, centsToYuan, goPay } from '@/account/api/plugins'
+
+const router = useRouter()
+
+const PERIODS = {
+  month: '月付',
+  quarter: '季付',
+  half_year: '半年付',
+  year: '年付',
+  two_year: '两年付',
+  three_year: '三年付',
+}
+
+const plans = ref([])
+const methods = ref([])
+
+// 下单状态
+const dialogVisible = ref(false)
+const currentPlan = ref(null)
+const period = ref('')
+const payType = ref('')
+const submitting = ref(false)
+
+const currentPeriods = computed(() => currentPlan.value?.periods || [])
+const isFreePlan = computed(() => {
+  const plan = currentPlan.value
+  if (!plan) return false
+  return currentPeriods.value.every((p) => !plan.prices[p])
+})
+
+function periodLabel(p) {
+  return PERIODS[p] || p
+}
+
+function minPrice(plan) {
+  const prices = (plan.periods || []).map((p) => plan.prices[p] || 0).filter((v) => v > 0)
+  return prices.length ? Math.min(...prices) : 0
+}
+
+function openOrder(plan) {
+  currentPlan.value = plan
+  period.value = plan.periods?.[0] || ''
+  payType.value = methods.value[0] ? methods.value[0].plugin + '__' + methods.value[0].method : ''
+  dialogVisible.value = true
+}
+
+async function onConfirmOrder() {
+  if (!currentPlan.value) return
+  if (!isFreePlan.value && !payType.value) {
+    MessagePlugin.warning('请选择支付方式')
+    return false
+  }
+  submitting.value = true
+  const res = await createShopOrder(currentPlan.value.id, period.value, payType.value)
+  submitting.value = false
+  if (!res.ok) {
+    MessagePlugin.error(res.message || '创建订单失败')
+    return false
+  }
+  if (!goPay(res)) {
+    MessagePlugin.success('订单创建成功')
+    dialogVisible.value = false
+  }
+  return true
+}
+
+async function load() {
+  const [plansRes, methodsRes] = await Promise.all([getShopPlans(), getShopMethods()])
+  if (plansRes.ok) plans.value = plansRes.data.plans || []
+  if (methodsRes.ok) methods.value = methodsRes.data.methods || []
+}
+
+onMounted(load)
+</script>
+
+<style scoped>
+.plan-grid {
+  display: grid;
+  grid-template-columns: repeat(3, 1fr);
+  gap: 16px;
+}
+.plan-card {
+  padding: 20px;
+  display: flex;
+  flex-direction: column;
+  transition: transform var(--td-dur) var(--td-ease),
+              box-shadow var(--td-dur) var(--td-ease);
+}
+.plan-card:hover {
+  transform: translateY(-3px);
+  box-shadow: var(--td-shadow-md);
+}
+.plan-head {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  gap: 8px;
+}
+.plan-name {
+  font-size: 16px;
+  font-weight: 700;
+  color: var(--td-text);
+}
+.plan-category {
+  font-size: 12px;
+  color: var(--td-brand);
+  background: var(--td-brand-light);
+  padding: 2px 8px;
+  border-radius: 10px;
+  white-space: nowrap;
+}
+.plan-desc {
+  margin: 8px 0 14px;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+  line-height: 1.6;
+  min-height: 40px;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+}
+.plan-specs {
+  list-style: none;
+  margin: 0 0 16px;
+  padding: 0;
+  flex: 1;
+}
+.plan-specs li {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  font-size: 13px;
+  color: var(--td-text-secondary);
+  padding: 5px 0;
+}
+.plan-specs li i {
+  font-size: 17px;
+  color: var(--td-brand);
+  width: 20px;
+  text-align: center;
+}
+.plan-specs li span {
+  flex: 1;
+}
+.plan-specs li b {
+  color: var(--td-text);
+  font-weight: 600;
+}
+.plan-foot {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  border-top: 1px solid var(--td-border);
+  padding-top: 14px;
+}
+.plan-price {
+  display: flex;
+  align-items: baseline;
+  gap: 2px;
+}
+.price-num {
+  font-size: 22px;
+  font-weight: 700;
+  color: var(--td-error);
+}
+.price-unit {
+  font-size: 12px;
+  color: var(--td-text-placeholder);
+}
+.price-empty {
+  font-size: 13px;
+  color: var(--td-text-placeholder);
+}
+
+/* 下单对话框 */
+.order-body {
+  padding: 4px 0 0;
+}
+.order-label {
+  font-size: 13px;
+  font-weight: 600;
+  color: var(--td-text);
+  margin-bottom: 10px;
+}
+.period-grid {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  gap: 8px;
+}
+.period-item {
+  display: flex;
+  flex-direction: column;
+  gap: 2px;
+  padding: 10px 12px;
+  border: 1px solid var(--td-border);
+  border-radius: 10px;
+  cursor: pointer;
+  font-size: 13px;
+  color: var(--td-text);
+  transition: border-color var(--td-dur) var(--td-ease),
+              background var(--td-dur) var(--td-ease);
+}
+.period-item input {
+  position: absolute;
+  opacity: 0;
+  pointer-events: none;
+}
+.period-item.active {
+  border-color: var(--td-brand);
+  background: var(--td-brand-light);
+}
+.period-name {
+  font-weight: 600;
+}
+.period-price {
+  font-size: 12px;
+  color: var(--td-brand);
+}
+.free-tip {
+  margin-top: 14px;
+  font-size: 13px;
+  color: var(--td-success);
+  display: flex;
+  align-items: center;
+  gap: 6px;
+}
+.no-methods {
+  margin: 12px 0 0;
+  font-size: 13px;
+  color: var(--td-text-placeholder);
+}
+
+@media (max-width: 1080px) {
+  .plan-grid {
+    grid-template-columns: repeat(2, 1fr);
+  }
+}
+@media (max-width: 680px) {
+  .plan-grid {
+    grid-template-columns: 1fr;
+  }
+}
+</style>
diff --git a/templates/tdesign/spa/src/home/layouts/HomeLayout.vue b/templates/tdesign/spa/src/home/layouts/HomeLayout.vue
index 492ae17..2a1c06d 100644
--- a/templates/tdesign/spa/src/home/layouts/HomeLayout.vue
+++ b/templates/tdesign/spa/src/home/layouts/HomeLayout.vue
@@ -20,7 +20,10 @@
           </ul>
           <div class="hd-nav-actions">
             <template v-if="authState.loggedIn">
-              <span class="hd-user-name">{{ authState.user?.username }}</span>
+              <a v-if="boot.hasUser" :href="accountUrl" class="hd-account-link" title="进入用户中心">
+                <i class="mdi mdi-account-circle-outline"></i><span>{{ authState.user?.username }}</span>
+              </a>
+              <span v-else class="hd-user-name">{{ authState.user?.username }}</span>
               <t-button theme="default" variant="outline" @click="onLogout">退出</t-button>
             </template>
             <template v-else-if="boot.hasUser">
@@ -120,6 +123,9 @@ function onLogout() {
   MessagePlugin.success('已退出登录')
 }
 
+// 用户中心(user_info 插件独立后台)
+const accountUrl = (boot.routeBase || '/index.php?_r=') + 'account'
+
 function scrollToTop() {
   window.scrollTo({ top: 0, behavior: 'smooth' })
 }
diff --git a/templates/tdesign/spa/src/home/styles/home.scss b/templates/tdesign/spa/src/home/styles/home.scss
index 2119a4d..6d3de3d 100644
--- a/templates/tdesign/spa/src/home/styles/home.scss
+++ b/templates/tdesign/spa/src/home/styles/home.scss
@@ -176,6 +176,27 @@
   margin-right: 2px;
 }
 
+/* 用户中心入口(user_info 独立后台) */
+.hd-account-link {
+  display: inline-flex;
+  align-items: center;
+  gap: 4px;
+  font-size: 13px;
+  color: #1f7a4d;
+  font-weight: 600;
+  padding: 4px 10px;
+  border-radius: 6px;
+  text-decoration: none;
+  transition: background var(--td-dur, 0.2s) ease, color var(--td-dur, 0.2s) ease;
+}
+.hd-account-link:hover {
+  background: rgba(31, 122, 77, 0.08);
+  text-decoration: none;
+}
+.hd-account-link i {
+  font-size: 16px;
+}
+
 .hd-menu-toggle {
   display: none;
   flex-direction: column;
diff --git a/templates/tdesign/spa/src/main-account.js b/templates/tdesign/spa/src/main-account.js
new file mode 100644
index 0000000..a2cf580
--- /dev/null
+++ b/templates/tdesign/spa/src/main-account.js
@@ -0,0 +1,11 @@
+import { createApp } from 'vue'
+import TDesign from 'tdesign-vue-next'
+import 'tdesign-vue-next/es/style/index.css'
+import App from './App-account.vue'
+import router from './account/router'
+import './shared/styles/theme.scss'
+
+const app = createApp(App)
+app.use(TDesign)
+app.use(router)
+app.mount('#app')
diff --git a/templates/tdesign/spa/vite.account.config.js b/templates/tdesign/spa/vite.account.config.js
new file mode 100644
index 0000000..81a91bf
--- /dev/null
+++ b/templates/tdesign/spa/vite.account.config.js
@@ -0,0 +1,37 @@
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+import { resolve } from 'path'
+
+// 用户中心(user_info 插件)构建配置
+export default defineConfig({
+  plugins: [vue()],
+  base: './',
+  resolve: {
+    alias: {
+      '@': resolve(__dirname, 'src'),
+    },
+  },
+  build: {
+    outDir: resolve(__dirname, '../account/dist'),
+    emptyOutDir: true,
+    assetsDir: 'assets',
+    cssCodeSplit: false,
+    chunkSizeWarningLimit: 3000,
+    rollupOptions: {
+      input: resolve(__dirname, 'account.html'),
+      output: {
+        entryFileNames: 'assets/index.js',
+        chunkFileNames: 'assets/[name].js',
+        assetFileNames: (info) => {
+          const n = info.name || ''
+          if (n.endsWith('.css')) return 'assets/index.css'
+          return 'assets/[name][extname]'
+        },
+        inlineDynamicImports: true,
+      },
+    },
+  },
+  server: {
+    port: 5176,
+  },
+})