初始化

This commit is contained in:
李志强 2025-07-14 15:53:23 +08:00
parent ace33d202f
commit 1bd79c57ee
170 changed files with 532 additions and 467 deletions

View File

@ -27,7 +27,7 @@
<div class="stat-icon">📦</div> <div class="stat-icon">📦</div>
</div> --> </div> -->
</div> </div>
<!--
<div class="quick-actions"> <div class="quick-actions">
<h2>快捷操作</h2> <h2>快捷操作</h2>
<div class="action-buttons"> <div class="action-buttons">
@ -47,7 +47,7 @@
<i class="fas fa-broom"></i>清除缓存 <i class="fas fa-broom"></i>清除缓存
</a> </a>
</div> </div>
</div> </div> -->
<div class="recent-activity"> <div class="recent-activity">
<h2>最近动态</h2> <h2>最近动态</h2>
@ -79,14 +79,14 @@
<h2>文章统计</h2> <h2>文章统计</h2>
<div id="articleStats" class="chart-container"></div> <div id="articleStats" class="chart-container"></div>
</div> </div>
</div> </div>
</div> </div>
<script src="__JS__/echarts.min.js"></script> <script src="__JS__/echarts.min.js"></script>
<script> <script>
function updateTime() { function updateTime() {
var now = new Date(); var now = new Date();
var year = now.getFullYear(); var year = now.getFullYear();
var month = now.getMonth() + 1; var month = now.getMonth() + 1;
@ -95,7 +95,7 @@ function updateTime() {
var minutes = now.getMinutes(); var minutes = now.getMinutes();
var seconds = now.getSeconds(); var seconds = now.getSeconds();
var padZero = function(num) { var padZero = function (num) {
return num < 10 ? '0' + num : num; return num < 10 ? '0' + num : num;
}; };
@ -107,10 +107,10 @@ function updateTime() {
padZero(seconds); padZero(seconds);
document.getElementById('current-time').innerHTML = timeString; document.getElementById('current-time').innerHTML = timeString;
} }
// 获取用户统计数据 // 获取用户统计数据
function getUserCounts() { function getUserCounts() {
fetch('{:url("users/counts")}') fetch('{:url("users/counts")}')
.then(response => response.json()) .then(response => response.json())
.then(res => { .then(res => {
@ -143,10 +143,10 @@ function getUserCounts() {
console.error('获取用户统计失败:', error); console.error('获取用户统计失败:', error);
document.querySelector('.stat-card:nth-child(1) .stat-value').textContent = '0'; document.querySelector('.stat-card:nth-child(1) .stat-value').textContent = '0';
}); });
} }
// 获取文章统计数据 // 获取文章统计数据
function getArticleCounts() { function getArticleCounts() {
fetch('{:url("articles/counts")}') fetch('{:url("articles/counts")}')
.then(response => response.json()) .then(response => response.json())
.then(res => { .then(res => {
@ -179,56 +179,56 @@ function getArticleCounts() {
console.error('获取文章统计失败:', error); console.error('获取文章统计失败:', error);
document.querySelector('.stat-card:nth-child(3) .stat-value').textContent = '0'; document.querySelector('.stat-card:nth-child(3) .stat-value').textContent = '0';
}); });
} }
// // 获取资源统计数据 // // 获取资源统计数据
// function getResourcesCounts() { // function getResourcesCounts() {
// fetch('{:url("resources/counts")}') // fetch('{:url("resources/counts")}')
// .then(response => response.json()) // .then(response => response.json())
// .then(res => { // .then(res => {
// // console.log('资源统计接口返回数据:', res); // // console.log('资源统计接口返回数据:', res);
// if (res.code === 0 && res.data) { // if (res.code === 0 && res.data) {
// // 更新资源总数 // // 更新资源总数
// document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = res.data.total.toLocaleString(); // document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = res.data.total.toLocaleString();
// // 更新资源统计图表 // // 更新资源统计图表
// if (window.resourceChart) { // if (window.resourceChart) {
// window.resourceChart.setOption({ // window.resourceChart.setOption({
// xAxis: { // xAxis: {
// data: res.data.dates // data: res.data.dates
// }, // },
// series: [{ // series: [{
// name: '新增资源', // name: '新增资源',
// data: res.data.counts // data: res.data.counts
// }, { // }, {
// name: '总资源数', // name: '总资源数',
// data: res.data.totalCounts // data: res.data.totalCounts
// }] // }]
// }); // });
// } // }
// } else { // } else {
// console.warn('资源统计接口返回异常:', res); // console.warn('资源统计接口返回异常:', res);
// document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = '0'; // document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = '0';
// } // }
// }) // })
// .catch(error => { // .catch(error => {
// console.error('获取资源统计失败:', error); // console.error('获取资源统计失败:', error);
// document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = '0'; // document.querySelector('.stat-card:nth-child(4) .stat-value').textContent = '0';
// }); // });
// } // }
updateTime(); updateTime();
setInterval(updateTime, 1000); setInterval(updateTime, 1000);
// 页面加载完成后获取统计数据 // 页面加载完成后获取统计数据
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function () {
getUserCounts(); getUserCounts();
getArticleCounts(); getArticleCounts();
// getResourcesCounts(); // getResourcesCounts();
}); });
// 访问趋势图表 // 访问趋势图表
function initVisitTrend() { function initVisitTrend() {
var chart = echarts.init(document.getElementById('visitTrend')); var chart = echarts.init(document.getElementById('visitTrend'));
var option = { var option = {
tooltip: { tooltip: {
@ -246,15 +246,15 @@ function initVisitTrend() {
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true
}, },
xAxis: { // xAxis: {
type: 'category', // type: 'category',
data: {$chartData.visitTrend.dates|json_encode|raw}, // data: { $chartData.visitTrend.dates | json_encode | raw },
axisLine: { // axisLine: {
lineStyle: { // lineStyle: {
color: '#e2e8f0' // color: '#e2e8f0'
} // }
} // }
}, // },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLine: { axisLine: {
@ -268,258 +268,261 @@ function initVisitTrend() {
} }
} }
}, },
series: [{ // series: [{
name: '访问量', // name: '访问量',
data: {$chartData.visitTrend.visits|json_encode|raw}, // data: { $chartData.visitTrend.visits | json_encode | raw },
type: 'line', // type: 'line',
smooth: true, // smooth: true,
areaStyle: { // areaStyle: {
opacity: 0.1 // opacity: 0.1
}, // },
itemStyle: { // itemStyle: {
color: '#3881fd' // color: '#3881fd'
}, // },
lineStyle: { // lineStyle: {
width: 3 // width: 3
} // }
}, { // },
name: '独立访客', // {
data: {$chartData.visitTrend.uvs|json_encode|raw}, // name: '独立访客',
type: 'line', // data: { $chartData.visitTrend.uvs | json_encode | raw },
smooth: true, // type: 'line',
itemStyle: { // smooth: true,
color: '#10b981' // itemStyle: {
}, // color: '#10b981'
lineStyle: { // },
width: 3 // lineStyle: {
} // width: 3
}] // }
// }
// ]
}; };
chart.setOption(option); chart.setOption(option);
}
// 用户增长图表
function initUserGrowth() {
var chart = echarts.init(document.getElementById('userGrowth'));
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['新增用户', '总用户数']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {$chartData.userGrowth.dates|json_encode|raw}
},
yAxis: {
type: 'value'
},
series: [
{
name: '新增用户',
type: 'bar',
data: {$chartData.userGrowth.newUsers|json_encode|raw},
itemStyle: {
color: '#3881fd'
}
},
{
name: '总用户数',
type: 'line',
smooth: true,
data: {$chartData.userGrowth.totalUsers|json_encode|raw},
itemStyle: {
color: '#10b981'
},
lineStyle: {
width: 3
}
}
]
};
chart.setOption(option);
}
// 资源统计图表
function initResourceStats() {
var chart = echarts.init(document.getElementById('resourceStats'));
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['新增资源', '总资源数', '下载量']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {$chartData.resourceStats.dates|json_encode|raw}
},
yAxis: {
type: 'value'
},
series: [
{
name: '新增资源',
type: 'bar',
data: {$chartData.resourceStats.newResources|json_encode|raw},
itemStyle: {
color: '#3881fd'
}
},
{
name: '总资源数',
type: 'line',
smooth: true,
data: {$chartData.resourceStats.totalResources|json_encode|raw},
itemStyle: {
color: '#10b981'
},
lineStyle: {
width: 3
}
},
{
name: '下载量',
type: 'line',
smooth: true,
data: {$chartData.resourceStats.downloads|json_encode|raw},
itemStyle: {
color: '#f59e0b'
},
lineStyle: {
width: 3
}
}
]
};
chart.setOption(option);
}
// 文章统计图表
function initArticleStats() {
var chart = echarts.init(document.getElementById('articleStats'));
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: ['新增文章', '总文章数', '浏览量']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {$chartData.articleStats.dates|json_encode|raw}
},
yAxis: {
type: 'value'
},
series: [
{
name: '新增文章',
type: 'bar',
data: {$chartData.articleStats.newArticles|json_encode|raw},
itemStyle: {
color: '#3881fd'
}
},
{
name: '总文章数',
type: 'line',
smooth: true,
data: {$chartData.articleStats.totalArticles|json_encode|raw},
itemStyle: {
color: '#10b981'
},
lineStyle: {
width: 3
}
},
{
name: '浏览量',
type: 'line',
smooth: true,
data: {$chartData.articleStats.views|json_encode|raw},
itemStyle: {
color: '#f59e0b'
},
lineStyle: {
width: 3
}
}
]
};
chart.setOption(option);
}
// 初始化所有图表
document.addEventListener('DOMContentLoaded', function() {
// 确保ECharts已加载
if (typeof echarts === 'undefined') {
console.error('ECharts未加载');
return;
} }
// 初始化图表 // 用户增长图表
try { // function initUserGrowth() {
initVisitTrend(); // var chart = echarts.init(document.getElementById('userGrowth'));
initUserGrowth(); // var option = {
// initResourceStats(); // tooltip: {
initArticleStats(); // trigger: 'axis',
// axisPointer: {
// type: 'cross',
// label: {
// backgroundColor: '#6a7985'
// }
// }
// },
// legend: {
// data: ['新增用户', '总用户数']
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: { $chartData.userGrowth.dates | json_encode | raw }
// },
// yAxis: {
// type: 'value'
// },
// series: [
// {
// name: '新增用户',
// type: 'bar',
// data: { $chartData.userGrowth.newUsers | json_encode | raw },
// itemStyle: {
// color: '#3881fd'
// }
// },
// {
// name: '总用户数',
// type: 'line',
// smooth: true,
// data: { $chartData.userGrowth.totalUsers | json_encode | raw },
// itemStyle: {
// color: '#10b981'
// },
// lineStyle: {
// width: 3
// }
// }
// ]
// };
// chart.setOption(option);
// }
// 监听窗口大小变化,重绘图表 // 资源统计图表
window.addEventListener('resize', function() { // function initResourceStats() {
var charts = document.querySelectorAll('.chart-container'); // var chart = echarts.init(document.getElementById('resourceStats'));
charts.forEach(function(chart) { // var option = {
var instance = echarts.getInstanceByDom(chart); // tooltip: {
if (instance) { // trigger: 'axis',
instance.resize(); // axisPointer: {
} // type: 'cross',
}); // label: {
}); // backgroundColor: '#6a7985'
} catch (error) { // }
console.error('初始化图表失败:', error); // }
} // },
}); // legend: {
</script><script src="__STATIC__/js/jquery.min.js"></script> // data: ['新增资源', '总资源数', '下载量']
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: { $chartData.resourceStats.dates | json_encode | raw }
// },
// yAxis: {
// type: 'value'
// },
// series: [
// {
// name: '新增资源',
// type: 'bar',
// data: { $chartData.resourceStats.newResources | json_encode | raw },
// itemStyle: {
// color: '#3881fd'
// }
// },
// {
// name: '总资源数',
// type: 'line',
// smooth: true,
// data: { $chartData.resourceStats.totalResources | json_encode | raw },
// itemStyle: {
// color: '#10b981'
// },
// lineStyle: {
// width: 3
// }
// },
// {
// name: '下载量',
// type: 'line',
// smooth: true,
// data: { $chartData.resourceStats.downloads | json_encode | raw },
// itemStyle: {
// color: '#f59e0b'
// },
// lineStyle: {
// width: 3
// }
// }
// ]
// };
// chart.setOption(option);
// }
// 文章统计图表
// function initArticleStats() {
// var chart = echarts.init(document.getElementById('articleStats'));
// var option = {
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// type: 'cross',
// label: {
// backgroundColor: '#6a7985'
// }
// }
// },
// legend: {
// data: ['新增文章', '总文章数', '浏览量']
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: { $chartData.articleStats.dates | json_encode | raw }
// },
// yAxis: {
// type: 'value'
// },
// series: [
// {
// name: '新增文章',
// type: 'bar',
// data: { $chartData.articleStats.newArticles | json_encode | raw },
// itemStyle: {
// color: '#3881fd'
// }
// },
// {
// name: '总文章数',
// type: 'line',
// smooth: true,
// data: { $chartData.articleStats.totalArticles | json_encode | raw },
// itemStyle: {
// color: '#10b981'
// },
// lineStyle: {
// width: 3
// }
// },
// {
// name: '浏览量',
// type: 'line',
// smooth: true,
// data: { $chartData.articleStats.views | json_encode | raw },
// itemStyle: {
// color: '#f59e0b'
// },
// lineStyle: {
// width: 3
// }
// }
// ]
// };
// chart.setOption(option);
// }
// 初始化所有图表
// document.addEventListener('DOMContentLoaded', function () {
// // 确保ECharts已加载
// if (typeof echarts === 'undefined') {
// console.error('ECharts未加载');
// return;
// }
// // 初始化图表
// try {
// initVisitTrend();
// initUserGrowth();
// // initResourceStats();
// initArticleStats();
// // 监听窗口大小变化,重绘图表
// window.addEventListener('resize', function () {
// var charts = document.querySelectorAll('.chart-container');
// charts.forEach(function (chart) {
// var instance = echarts.getInstanceByDom(chart);
// if (instance) {
// instance.resize();
// }
// });
// });
// } catch (error) {
// console.error('初始化图表失败:', error);
// }
// });
</script>
<script src="__STATIC__/js/jquery.min.js"></script>
<style> <style>
.dashboard-container { .dashboard-container {
padding: 24px; padding: 24px;
@ -527,6 +530,7 @@ document.addEventListener('DOMContentLoaded', function() {
/* background-color: #f5f7fa; */ /* background-color: #f5f7fa; */
/* min-height: calc(100vh - 60px); */ /* min-height: calc(100vh - 60px); */
} }
.welcome-header { .welcome-header {
background: linear-gradient(135deg, #3881fd 0%, #2c5fd9 100%); background: linear-gradient(135deg, #3881fd 0%, #2c5fd9 100%);
border-radius: 12px; border-radius: 12px;
@ -535,22 +539,26 @@ document.addEventListener('DOMContentLoaded', function() {
margin-bottom: 24px; margin-bottom: 24px;
box-shadow: 0 4px 20px rgba(56, 129, 253, 0.15); box-shadow: 0 4px 20px rgba(56, 129, 253, 0.15);
} }
.welcome-header h1 { .welcome-header h1 {
font-size: 28px; font-size: 28px;
font-weight: 600; font-weight: 600;
margin-bottom: 8px; margin-bottom: 8px;
} }
.welcome-header p { .welcome-header p {
font-size: 15px; font-size: 15px;
opacity: 0.9; opacity: 0.9;
margin: 0; margin: 0;
} }
.stats-container { .stats-container {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 24px; gap: 24px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.stat-card { .stat-card {
background: white; background: white;
border-radius: 12px; border-radius: 12px;
@ -560,6 +568,7 @@ document.addEventListener('DOMContentLoaded', function() {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.stat-card::before { .stat-card::before {
content: ''; content: '';
position: absolute; position: absolute;
@ -569,10 +578,12 @@ document.addEventListener('DOMContentLoaded', function() {
height: 100%; height: 100%;
background: #3881fd; background: #3881fd;
} }
.stat-card:hover { .stat-card:hover {
transform: translateY(-5px); transform: translateY(-5px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
} }
.stat-card .stat-value { .stat-card .stat-value {
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
@ -581,6 +592,7 @@ document.addEventListener('DOMContentLoaded', function() {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
} }
.stat-card .stat-title { .stat-card .stat-title {
color: #64748b; color: #64748b;
font-size: 14px; font-size: 14px;
@ -588,6 +600,7 @@ document.addEventListener('DOMContentLoaded', function() {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
} }
.stat-card .stat-icon { .stat-card .stat-icon {
position: absolute; position: absolute;
right: 20px; right: 20px;
@ -596,12 +609,14 @@ document.addEventListener('DOMContentLoaded', function() {
font-size: 48px; font-size: 48px;
opacity: 0.1; opacity: 0.1;
} }
.quick-actions { .quick-actions {
background: white; background: white;
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
} }
.quick-actions h2 { .quick-actions h2 {
color: #1e293b; color: #1e293b;
font-size: 18px; font-size: 18px;
@ -610,6 +625,7 @@ document.addEventListener('DOMContentLoaded', function() {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.quick-actions h2::before { .quick-actions h2::before {
content: ''; content: '';
display: inline-block; display: inline-block;
@ -619,11 +635,13 @@ document.addEventListener('DOMContentLoaded', function() {
margin-right: 8px; margin-right: 8px;
border-radius: 2px; border-radius: 2px;
} }
.action-buttons { .action-buttons {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 16px; gap: 16px;
} }
.action-button { .action-button {
background: #f8fafc; background: #f8fafc;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0;
@ -638,15 +656,18 @@ document.addEventListener('DOMContentLoaded', function() {
justify-content: center; justify-content: center;
text-decoration: none; text-decoration: none;
} }
.action-button:hover { .action-button:hover {
background: #3881fd; background: #3881fd;
color: white; color: white;
border-color: #3881fd; border-color: #3881fd;
transform: translateY(-2px); transform: translateY(-2px);
} }
.action-button i { .action-button i {
margin-right: 8px; margin-right: 8px;
} }
.recent-activity { .recent-activity {
margin-top: 24px; margin-top: 24px;
background: white; background: white;
@ -654,18 +675,22 @@ document.addEventListener('DOMContentLoaded', function() {
padding: 24px; padding: 24px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
} }
.activity-list { .activity-list {
margin-top: 16px; margin-top: 16px;
} }
.activity-item { .activity-item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 12px 0; padding: 12px 0;
border-bottom: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
} }
.activity-item:last-child { .activity-item:last-child {
border-bottom: none; border-bottom: none;
} }
.activity-icon { .activity-icon {
width: 36px; width: 36px;
height: 36px; height: 36px;
@ -676,29 +701,35 @@ document.addEventListener('DOMContentLoaded', function() {
justify-content: center; justify-content: center;
margin-right: 12px; margin-right: 12px;
} }
.activity-content { .activity-content {
flex: 1; flex: 1;
} }
.activity-title { .activity-title {
font-weight: 500; font-weight: 500;
color: #9b9b9b; color: #9b9b9b;
} }
.activity-time { .activity-time {
font-size: 12px; font-size: 12px;
color: #64748b; color: #64748b;
} }
.charts-container { .charts-container {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 24px; gap: 24px;
margin-top: 24px; margin-top: 24px;
} }
.chart-card { .chart-card {
background: white; background: white;
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
} }
.chart-card h2 { .chart-card h2 {
color: #1e293b; color: #1e293b;
font-size: 18px; font-size: 18px;
@ -707,6 +738,7 @@ document.addEventListener('DOMContentLoaded', function() {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.chart-card h2::before { .chart-card h2::before {
content: ''; content: '';
display: inline-block; display: inline-block;
@ -716,6 +748,7 @@ document.addEventListener('DOMContentLoaded', function() {
margin-right: 8px; margin-right: 8px;
border-radius: 2px; border-radius: 2px;
} }
.chart-container { .chart-container {
height: 300px; height: 300px;
width: 100%; width: 100%;

View File

@ -718,7 +718,7 @@ class UserController extends BaseController
{ {
// 检查用户是否登录 // 检查用户是否登录
if (!cookie('user_account')) { 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()]); return json(['code' => -1, 'msg' => '二维码生成失败: ' . $e->getMessage()]);
} }
} }
//getSecurityInfo
public function getSecurityInfo()
{
}
} }

View File

@ -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> <script>
// 在页面加载时立即执行 // 在页面加载时立即执行

View File

@ -10,6 +10,11 @@
<link rel="stylesheet" href="__CSS__/bootstrap.min.css"> <link rel="stylesheet" href="__CSS__/bootstrap.min.css">
<link rel="stylesheet" href="__CSS__/fontawesome.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> <style>
/* 用户头像样式 */ /* 用户头像样式 */
#userAvatar { #userAvatar {

View File

@ -97,4 +97,29 @@
content: '/index/user/component/bindPhone' 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> </script>

View File

@ -57,6 +57,25 @@
</div> </div>
</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> <style>
.profile-container { .profile-container {
display: flex; display: flex;
@ -153,23 +172,4 @@
} }
</style> </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" /} {include file="component/foot" /}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Some files were not shown because too many files have changed in this diff Show More