初始化
This commit is contained in:
@@ -718,7 +718,7 @@ class UserController extends BaseController
|
||||
{
|
||||
// 检查用户是否登录
|
||||
if (!cookie('user_account')) {
|
||||
return json(['code'=> -1,'msg'=> '请先登录']);
|
||||
return json(['code' => -1, 'msg' => '请先登录']);
|
||||
}
|
||||
|
||||
// 获取当前用户信息
|
||||
@@ -751,4 +751,10 @@ class UserController extends BaseController
|
||||
return json(['code' => -1, 'msg' => '二维码生成失败: ' . $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
//getSecurityInfo
|
||||
public function getSecurityInfo()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<script src="__LAYUI__/layui.js" charset="utf-8"></script>
|
||||
<script src="__JS__/bootstrap.bundle.js"></script>
|
||||
<script charset="UTF-8" id="LA_COLLECT" src="//www.yunzer.cn/plugins/js-sdk-pro.min.js"></script>
|
||||
<script>LA.init({ id: "KoyzaWWEcLvPzkQn", ck: "KoyzaWWEcLvPzkQn", autoTrack: true, prefix: 'event' })</script>
|
||||
<script src="__JS__/banner.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
// 在页面加载时立即执行
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
<link rel="stylesheet" href="__CSS__/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="__CSS__/fontawesome.css">
|
||||
|
||||
<script src="__LAYUI__/layui.js" charset="utf-8"></script>
|
||||
<script src="__JS__/bootstrap.bundle.js"></script>
|
||||
<script charset="UTF-8" id="LA_COLLECT" src="//www.yunzer.cn/plugins/js-sdk-pro.min.js"></script>
|
||||
<script>LA.init({ id: "KoyzaWWEcLvPzkQn", ck: "KoyzaWWEcLvPzkQn", autoTrack: true, prefix: 'event' })</script>
|
||||
<script src="__JS__/banner.js"></script>
|
||||
<style>
|
||||
/* 用户头像样式 */
|
||||
#userAvatar {
|
||||
|
||||
@@ -97,4 +97,29 @@
|
||||
content: '/index/user/component/bindPhone'
|
||||
});
|
||||
}
|
||||
|
||||
function loadSecurityInfo() {
|
||||
// 示例:你可以根据实际需求发起 AJAX 请求获取用户安全信息
|
||||
// 这里只做简单演示
|
||||
// 假设后端返回 { phone: '138****8888' } 或 { phone: null }
|
||||
$.ajax({
|
||||
url: '/index/user/getSecurityInfo',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.code === 0 && res.data) {
|
||||
if (res.data.phone) {
|
||||
$('#phoneNumber').text(res.data.phone);
|
||||
} else {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
} else {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
$('#phoneNumber').text('未绑定');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -57,6 +57,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['jquery'], function () {
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 菜单切换
|
||||
$('.menu-item').on('click', function () {
|
||||
var target = $(this).data('target');
|
||||
|
||||
// 移除所有active类
|
||||
$('.menu-item').removeClass('active');
|
||||
$('.content-section').removeClass('active');
|
||||
|
||||
// 添加active类
|
||||
$(this).addClass('active');
|
||||
$('#' + target).addClass('active');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.profile-container {
|
||||
display: flex;
|
||||
@@ -153,23 +172,4 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
layui.use(['jquery'], function(){
|
||||
var $ = layui.jquery;
|
||||
|
||||
// 菜单切换
|
||||
$('.menu-item').on('click', function(){
|
||||
var target = $(this).data('target');
|
||||
|
||||
// 移除所有active类
|
||||
$('.menu-item').removeClass('active');
|
||||
$('.content-section').removeClass('active');
|
||||
|
||||
// 添加active类
|
||||
$(this).addClass('active');
|
||||
$('#' + target).addClass('active');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{include file="component/foot" /}
|
||||
Reference in New Issue
Block a user