From 258a6743a94acc9f080cd7efce57277c17347385 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <357099073@qq.com>
Date: Tue, 27 May 2025 11:57:02 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E7=B3=BB=E7=BB=9F=E9=80=9A?=
=?UTF-8?q?=E7=9F=A5=E8=A1=A8=E5=92=8C=E6=88=91=E7=9A=84=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/index/model/SystemNotice.php | 8 ++
app/index/model/UserMessage.php | 8 ++
app/index/view/user/component/password.php | 111 ---------------------
app/index/view/user/component/security.php | 68 +------------
app/index/view/user/component/settings.php | 109 --------------------
app/index/view/user/component/sidebar.php | 11 +-
app/index/view/user/profile.php | 10 --
7 files changed, 20 insertions(+), 305 deletions(-)
create mode 100644 app/index/model/SystemNotice.php
create mode 100644 app/index/model/UserMessage.php
delete mode 100644 app/index/view/user/component/password.php
delete mode 100644 app/index/view/user/component/settings.php
diff --git a/app/index/model/SystemNotice.php b/app/index/model/SystemNotice.php
new file mode 100644
index 0000000..b100cb2
--- /dev/null
+++ b/app/index/model/SystemNotice.php
@@ -0,0 +1,8 @@
+
-
修改密码
-
-
-
-
-
-
-
diff --git a/app/index/view/user/component/security.php b/app/index/view/user/component/security.php
index f318c71..b6b416c 100644
--- a/app/index/view/user/component/security.php
+++ b/app/index/view/user/component/security.php
@@ -18,23 +18,7 @@
-
-
-
-
+
@@ -85,11 +69,6 @@ layui.use(['form', 'layer'], function(){
// 加载用户安全信息
loadSecurityInfo();
-
- // 监听两步验证开关
- form.on('switch(twoFactor)', function(data){
- updateTwoFactor(data.elem.checked);
- });
});
// 加载安全信息
@@ -99,11 +78,6 @@ function loadSecurityInfo() {
.then(data => {
if(data.code === 0) {
document.getElementById('phoneNumber').textContent = data.data.phone || '未绑定';
- document.getElementById('emailAddress').textContent = data.data.email || '未绑定';
- // 设置两步验证开关状态
- layui.form.val('securityForm', {
- twoFactor: data.data.twoFactor
- });
}
});
}
@@ -127,44 +101,4 @@ function bindPhone() {
content: '/index/user/component/bindPhone'
});
}
-
-// 绑定邮箱
-function bindEmail() {
- layer.open({
- type: 2,
- title: '绑定邮箱',
- area: ['500px', '400px'],
- content: '/index/user/component/bindEmail'
- });
-}
-
-// 更新两步验证状态
-function updateTwoFactor(enabled) {
- fetch('/index/user/updateTwoFactor', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({enabled: enabled})
- })
- .then(response => response.json())
- .then(data => {
- if(data.code === 0) {
- layer.msg(enabled ? '两步验证已开启' : '两步验证已关闭', {icon: 1});
- } else {
- layer.msg(data.msg || '操作失败', {icon: 2});
- // 恢复开关状态
- layui.form.val('securityForm', {
- twoFactor: !enabled
- });
- }
- })
- .catch(error => {
- layer.msg('操作失败,请重试', {icon: 2});
- // 恢复开关状态
- layui.form.val('securityForm', {
- twoFactor: !enabled
- });
- });
-}
diff --git a/app/index/view/user/component/settings.php b/app/index/view/user/component/settings.php
deleted file mode 100644
index 39eeacb..0000000
--- a/app/index/view/user/component/settings.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
diff --git a/app/index/view/user/component/sidebar.php b/app/index/view/user/component/sidebar.php
index 278fab0..1364955 100644
--- a/app/index/view/user/component/sidebar.php
+++ b/app/index/view/user/component/sidebar.php
@@ -16,10 +16,6 @@
🖼️
修改头像
-
-