Files
web_huangguo2_h5/app/template/pages/setting.html
T
谢宇宁andClaude Opus 5.5 0fbdba5ccf Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 11:47:47 +07:00

87 lines
5.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.metaTitle}}</title>
{{template "seoCommon" .}}
<link rel="stylesheet" href="/static/css/base.css">
<link rel="stylesheet" href="/static/css/profile.css?v=9">
<link rel="stylesheet" href="/static/css/profile-mobile.css?v=5">
<link rel="stylesheet" href="/static/css/setting.css?v=4">
</head>
<body class="profile-page setting-page">
{{template "header" .}}
{{template "userCenterHero" .}}
{{template "userCenterTabs" .}}
<main class="setting-main">
<h1 class="visually-hidden">账号设置</h1>
{{with .setting}}
<div class="setting-layout">
<form class="setting-card" data-setting-form novalidate>
<section id="basic" class="setting-section">
<h2 class="setting-section__title">基本资料</h2>
<div class="setting-fields">
<label class="setting-field"><span>昵称</span><input name="nickName" type="text" maxlength="40" value="{{.NickName}}" autocomplete="nickname" placeholder="请输入昵称"></label>
<div class="setting-field">
<span>账号</span>
{{if .HasAccount}}
<input type="text" value="{{.AccountNo}}" readonly aria-label="已绑定账号">
<small>账号绑定后不可修改</small>
{{else}}
<button class="setting-field__action" type="button" data-register-open>绑定</button>
{{end}}
</div>
<div class="setting-field">
<span>登录密码</span>
{{if .HasPassword}}
<div class="setting-field__value-action">
<input type="text" value="********" readonly aria-label="已设置登录密码">
<button class="setting-field__inline-action" type="button" data-setting-password-open>修改</button>
</div>
{{else}}
<button class="setting-field__action" type="button" data-register-open>绑定</button>
{{end}}
</div>
</div>
<label class="setting-field setting-field--intro"><span>个人简介</span><textarea name="introduction" rows="3" maxlength="300" placeholder="介绍一下自己">{{.Introduction}}</textarea></label>
</section>
<div class="setting-actions">
<button class="setting-actions__save" type="submit" data-setting-save>保存修改</button>
<button class="setting-actions__logout" type="button" data-account-switch>切换账号</button>
<span class="setting-actions__unavailable" title="账号注销接口暂未开放">注销账号暂未开放</span>
</div>
<p class="setting-status" role="status" aria-live="polite" data-setting-status></p>
</form>
{{if .HasPassword}}
<div class="setting-password-pop" data-setting-password-pop hidden role="dialog" aria-modal="true" aria-labelledby="setting-password-title">
<button class="setting-password-pop__mask" type="button" data-setting-password-close aria-label="关闭修改密码弹窗"></button>
<section class="setting-password-pop__panel">
<button class="setting-password-pop__close" type="button" data-setting-password-close aria-label="关闭">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="关闭">
</button>
<header class="setting-password-pop__intro">
<h2 id="setting-password-title">修改密码</h2>
<p>验证当前密码后设置新的登录密码</p>
</header>
<form class="setting-password-pop__form" data-setting-password-form novalidate>
<label class="setting-field"><span>当前密码</span><input name="oldPassword" type="password" minlength="4" maxlength="16" autocomplete="current-password" placeholder="请输入当前密码" required></label>
<label class="setting-field"><span>新密码</span><input name="newPassword" type="password" minlength="4" maxlength="16" autocomplete="new-password" placeholder="请输入 4–16 位新密码" required></label>
<label class="setting-field"><span>确认新密码</span><input name="confirmPassword" type="password" minlength="4" maxlength="16" autocomplete="new-password" placeholder="请再次输入新密码" required></label>
<p class="setting-password-pop__status" role="status" aria-live="polite" data-setting-password-status></p>
<button class="setting-actions__save setting-password-pop__submit" type="submit" data-setting-password-submit>确认修改</button>
</form>
</section>
</div>
{{end}}
</div>
{{else}}
<div class="setting-login-state"><h2>账号资料暂时无法加载</h2><p>请登录后重试。</p><a href="/login">去登录</a></div>
{{end}}
</main>
{{template "footer" .}}
<script src="/static/js/setting.js?v=5" defer></script>
</body>
</html>