feat: 实现响应式布局优化,适配移动端设备

- 修改主页和其他页面的宽度为百分比布局,添加最大宽度限制
- 增加媒体查询规则,针对不同屏幕尺寸调整布局和样式
- 优化导航栏、卡片和列表在移动端的显示效果
- 添加滚动条隐藏样式,提升移动端用户体验
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-25 19:09:30 +08:00
parent acafc9792a
commit 82e67b2a0b
6 changed files with 1254 additions and 10 deletions

View File

@@ -1,6 +1,9 @@
#homepage-me {
width: 1200px;
width: 100%;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
padding: 0 10px;
}
#homepage-me .matter {
align-items: flex-start;
@@ -298,7 +301,8 @@
margin-right: 7px;
}
#homepage-me .matter .matter-content .list-area {
width: 860px;
width: 100%;
box-sizing: border-box;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
@@ -341,6 +345,13 @@
padding-bottom: 23px;
padding-left: 95px;
padding-right: 40px;
overflow-x: auto;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
#homepage-me .matter .matter-content .list-area .classify::-webkit-scrollbar {
display: none;
}
#homepage-me .matter .matter-content .list-area .classify .item {
width: 50px;
@@ -406,3 +417,161 @@
color: #7f7f7f;
font-size: 14px;
}
/* 响应式布局优化 */
@media screen and (max-width: 880px) {
.head-top {
margin: 10px auto 15px !important;
}
.head-navigation {
display: none !important;
}
#homepage-me {
width: 100%;
padding: 0;
}
#homepage-me .matter {
flex-direction: column;
align-items: stretch;
}
#homepage-me .matter .card-user {
width: auto;
margin: 0 0 15px 0;
padding: 30px 20px;
position: static;
align-items: center;
border-radius: 0;
border-left: none;
border-right: none;
}
#homepage-me .matter .card-user .avatar-box {
margin-bottom: 15px;
}
#homepage-me .matter .card-user .avatar-box .pen-box {
right: 50%;
margin-right: -60px;
}
#homepage-me .matter .card-user .name-area {
text-align: center;
margin-bottom: 25px;
}
#homepage-me .matter .card-user .bi-box {
margin-bottom: 25px;
}
#homepage-me .matter .card-user .medal-area {
margin: 0;
align-self: center;
}
#homepage-me .matter .card-user .medal-area .list {
justify-content: center;
}
#homepage-me .matter .matter-content {
width: 100%;
}
#homepage-me .matter .matter-content .message-box {
width: auto;
margin: 0 0 15px 0;
padding: 20px;
border-radius: 0;
border-left: none;
border-right: none;
}
#homepage-me .matter .matter-content .message-box .header {
padding-top: 0;
text-align: center;
}
#homepage-me .matter .matter-content .message-box .header .avatar {
display: none;
}
#homepage-me .matter .matter-content .message-box .header .username {
font-size: 16px;
font-weight: 600;
}
#homepage-me .matter .matter-content .message-box .info-list {
padding-top: 15px;
}
#homepage-me .matter .matter-content .message-box .info-list .item {
width: 50%;
padding-right: 10px;
box-sizing: border-box;
}
#homepage-me .matter .matter-content .message-box .tags {
justify-content: center;
}
#homepage-me .matter .matter-content .list-area {
border-radius: 0;
border-left: none;
border-right: none;
}
#homepage-me .matter .matter-content .list-area .operation-box {
padding: 15px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
#homepage-me .matter .matter-content .list-area .operation-box::-webkit-scrollbar {
display: none;
}
#homepage-me .matter .matter-content .list-area .operation-box .operation-item {
flex-shrink: 0;
}
#homepage-me .matter .matter-content .list-area .operation-box .operation-item:not(:last-child) {
margin-right: 30px;
}
#homepage-me .matter .matter-content .list-area .classify {
padding: 10px 20px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
#homepage-me .matter .matter-content .list-area .classify::-webkit-scrollbar {
display: none;
}
#homepage-me .matter .matter-content .list-area .classify .item {
flex-shrink: 0;
width: auto;
padding: 0 15px;
}
#homepage-me .matter .matter-content .list-area .issue-data {
padding: 0 20px 15px;
}
#homepage-me .matter .matter-content .list-area .list-box {
padding: 0 20px;
}
#homepage-me .matter .matter-content .list-area .empty {
width: auto;
height: auto;
min-height: 200px;
margin: 20px;
padding: 40px 0;
}
#homepage-me .matter .matter-content .list-area .empty .empty-icon {
width: 60px;
height: 60px;
}
#homepage-me .matter .matter-content .list-area .load-more {
margin-bottom: 30px;
}
}
@media screen and (max-width: 480px) {
#homepage-me .matter .card-user .bi-box {
width: 100%;
max-width: 320px;
}
#homepage-me .matter .card-user .bi-box .bi-masking {
width: 100%;
background-size: 100% 100%;
}
#homepage-me .matter .matter-content .message-box .info-list .item {
width: 100%;
margin-bottom: 12px;
justify-content: space-between;
}
#homepage-me .matter .matter-content .message-box .info-list .item .label {
width: auto;
}
}

View File

@@ -1,6 +1,9 @@
#homepage-me {
width: 1200px;
width: 100%;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
padding: 0 10px;
.matter {
align-items: flex-start;
@@ -29,6 +32,8 @@
border-radius: 8px;
}
.pen-box {
width: 24px;
height: 24px;
@@ -347,7 +352,8 @@
}
.list-area {
width: 860px;
width: 100%;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
@@ -394,6 +400,16 @@
padding-bottom: 23px;
padding-left: 95px;
padding-right: 40px;
overflow-x: auto;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
display: none;
}
scrollbar-width: none;
.item {
width: 50px;
height: 32px;
@@ -472,3 +488,182 @@
}
}
}
/* 响应式布局优化 */
@media screen and (max-width: 880px) {
.head-top {
margin: 10px auto 15px !important;
}
.head-navigation {
display: none !important;
}
#homepage-me {
width: 100%;
padding: 0;
.matter {
flex-direction: column;
align-items: stretch;
.card-user {
width: auto;
margin: 0 0 15px 0;
padding: 30px 20px;
position: static;
align-items: center;
border-radius: 0;
border-left: none;
border-right: none;
.avatar-box {
margin-bottom: 15px;
.pen-box {
right: 50%;
margin-right: -60px;
}
}
.name-area {
text-align: center;
margin-bottom: 25px;
}
.bi-box {
margin-bottom: 25px;
}
.medal-area {
margin: 0;
align-self: center;
.list {
justify-content: center;
}
}
}
.matter-content {
width: 100%;
.message-box {
width: auto;
margin: 0 0 15px 0;
padding: 20px;
border-radius: 0;
border-left: none;
border-right: none;
.header {
padding-top: 0;
text-align: center;
.avatar { display: none; }
.username { font-size: 16px; font-weight: 600; }
}
.info-list {
padding-top: 15px;
.item {
width: 50%;
padding-right: 10px;
box-sizing: border-box;
}
}
.tags {
justify-content: center;
}
}
.list-area {
border-radius: 0;
border-left: none;
border-right: none;
.operation-box {
padding: 15px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar { display: none; }
scrollbar-width: none;
.operation-item {
flex-shrink: 0;
&:not(:last-child) { margin-right: 30px; }
}
}
.classify {
padding: 10px 20px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar { display: none; }
scrollbar-width: none;
.item {
flex-shrink: 0;
width: auto;
padding: 0 15px;
}
}
.issue-data {
padding: 0 20px 15px;
}
.list-box {
padding: 0 20px;
}
.empty {
width: auto;
height: auto;
min-height: 200px;
margin: 20px;
padding: 40px 0;
.empty-icon {
width: 60px;
height: 60px;
}
}
.load-more {
margin-bottom: 30px;
}
}
}
}
}
}
@media screen and (max-width: 480px) {
#homepage-me .matter {
.card-user {
.bi-box {
width: 100%;
max-width: 320px;
.bi-masking { width: 100%; background-size: 100% 100%; }
}
}
.matter-content {
.message-box {
.info-list {
.item {
width: 100%;
margin-bottom: 12px;
justify-content: space-between;
.label { width: auto; }
}
}
}
}
}
}

View File

@@ -1,6 +1,9 @@
#homepage-other {
width: 1200px;
width: 100%;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
padding: 0 10px;
}
#homepage-other .head-navigation {
margin-bottom: 20px;
@@ -205,7 +208,8 @@
margin-right: 7px;
}
#homepage-other .matter .matter-content .list-area {
width: 860px;
width: 100%;
box-sizing: border-box;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
@@ -272,3 +276,130 @@
color: #7f7f7f;
font-size: 14px;
}
@media screen and (max-width: 900px) {
#homepage-other .matter {
flex-direction: column;
}
#homepage-other .matter .card-user {
width: 100%;
margin-right: 0;
margin-bottom: 20px;
position: static;
padding: 20px;
}
#homepage-other .matter .card-user .avatar {
width: 80px;
height: 80px;
}
#homepage-other .matter .card-user .btn-area {
display: flex;
flex-wrap: nowrap;
justify-content: center;
gap: 10px;
width: 100%;
}
#homepage-other .matter .card-user .btn-area .item {
flex: 1;
width: auto;
margin-bottom: 0 !important;
}
#homepage-other .matter .matter-content {
width: 100%;
}
#homepage-other .matter .matter-content .message-box {
padding: 20px;
}
#homepage-other .matter .matter-content .message-box .header {
display: none;
}
#homepage-other .matter .matter-content .message-box .info-list {
padding: 0;
}
#homepage-other .matter .matter-content .message-box .info-list .item {
width: 100%;
justify-content: space-between;
}
#homepage-other .matter .matter-content .list-area {
padding: 20px;
}
#homepage-other .matter .matter-content .list-area .classify {
overflow-x: auto;
justify-content: flex-start;
}
#homepage-other .matter .matter-content .list-area .classify .item {
width: auto;
padding: 0 10px;
height: 28px;
line-height: 28px;
font-size: 13px;
border-radius: 8px;
}
#homepage-other .matter .matter-content .list-area .empty {
width: 100%;
}
}
@media screen and (max-width: 480px) {
#homepage-other .head-navigation {
font-size: 12px;
}
#homepage-other .matter .matter-content .list-area {
padding-left: 10px;
padding-right: 10px;
}
#homepage-other .matter .matter-content .list-area .classify {
padding: 20px 0;
}
#homepage-other .matter .matter-content .list-area .classify .item {
padding: 0 7px;
}
#homepage-other .matter .card-user .btn-area {
flex-direction: column;
}
#homepage-other .matter .card-user .btn-area .item {
flex: none;
width: 100%;
margin-bottom: 10px !important;
}
}
@media screen and (max-width: 430px) {
#homepage-other .matter .matter-content .list-area .classify .item:not(:last-child) {
margin-right: 7px;
}
}
@media screen and (max-width: 1015px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 45px;
}
}
@media screen and (max-width: 955px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 30px;
}
}
@media screen and (max-width: 900px) {
.head-top .post-list,
.head-top .sign-in {
display: none !important;
}
}
@media screen and (max-width: 480px) {
.head-top .logo {
height: 30px;
width: auto;
}
.head-top .input-box {
background: transparent !important;
border: none !important;
width: auto !important;
padding: 0 !important;
}
.head-top .input-box .placeholder,
.head-top .input-box .input,
.head-top .input-box .search-box-history {
display: none !important;
}
.head-top .input-box .icon {
margin: 0 10px;
display: block !important;
}
}

View File

@@ -1,6 +1,9 @@
#homepage-other {
width: 1200px;
width: 100%;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
padding: 0 10px;
.head-navigation {
margin-bottom: 20px;
@@ -239,7 +242,8 @@
}
.list-area {
width: 860px;
width: 100%;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
@@ -321,4 +325,161 @@
}
}
}
@media screen and (max-width: 900px) {
.matter {
flex-direction: column;
.card-user {
width: 100%;
margin-right: 0;
margin-bottom: 20px;
position: static;
padding: 20px;
.avatar {
width: 80px;
height: 80px;
}
.btn-area {
display: flex;
flex-wrap: nowrap;
justify-content: center;
gap: 10px;
width: 100%;
.item {
flex: 1;
width: auto;
margin-bottom: 0 !important;
}
}
}
.matter-content {
width: 100%;
.message-box {
padding: 20px;
.header {
display: none;
}
.info-list {
padding: 0;
.item {
width: 100%;
justify-content: space-between;
}
}
}
.list-area {
padding: 20px;
.classify {
overflow-x: auto;
justify-content: flex-start;
.item {
width: auto;
padding: 0 10px;
height: 28px;
line-height: 28px;
font-size: 13px;
border-radius: 8px;
}
}
.empty {
width: 100%;
}
}
}
}
}
@media screen and (max-width: 480px) {
.head-navigation {
font-size: 12px;
}
.matter {
.matter-content .list-area {
padding-left: 10px;
padding-right: 10px;
.classify {
padding: 20px 0;
.item {
padding: 0 7px;
}
}
}
.card-user {
.btn-area {
flex-direction: column;
.item {
flex: none;
width: 100%;
margin-bottom: 10px !important;
}
}
}
}
}
@media screen and (max-width: 430px) {
.matter .matter-content .list-area .classify .item:not(:last-child) {
margin-right: 7px;
}
}
}
@media screen and (max-width: 1015px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 45px;
}
}
@media screen and (max-width: 955px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 30px;
}
}
@media screen and (max-width: 900px) {
.head-top {
.post-list,
.sign-in {
display: none !important;
}
}
}
@media screen and (max-width: 480px) {
.head-top {
.logo {
height: 30px;
width: auto;
}
.input-box {
background: transparent !important;
border: none !important;
width: auto !important;
padding: 0 !important;
.placeholder,
.input,
.search-box-history {
display: none !important;
}
.icon {
margin: 0 10px;
display: block !important;
}
}
}
}

588
homepage-me-V2.html Normal file
View File

@@ -0,0 +1,588 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title> -- 寄托天下</title>
<link rel="stylesheet" href="/css/public.css" />
<link rel="stylesheet" href="/css/homepage-me.css" />
<!-- <link rel="stylesheet" href="https://f.gter.net/css/homepage-me.css" /> -->
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="">
<meta property="og:description" content="">
<meta property="og:image" content="">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="">
<meta property="twitter:description" content="">
<meta property="twitter:image" content="">
<!-- 网站图标 -->
<link rel="icon" href="https://www.gter.net/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="https://www.gter.net/favicon.ico" type="image/x-icon">
<style>
[v-cloak] {
display: none !important;
}
#pre-loader {
height: 70vh;
display: flex;
justify-content: center;
align-items: center;
}
#pre-loader .three-bounce>div {
display: inline-block;
width: 18px;
height: 18px;
border-radius: 100%;
top: 50%;
margin-top: -9px;
background: #aeadba;
animation: bouncedelay 1.4s infinite ease-in-out;
animation-fill-mode: both;
}
#pre-loader .three-bounce .one {
animation-delay: -0.32s;
}
#pre-loader .three-bounce .two {
animation-delay: -0.16s;
}
@keyframes bouncedelay {
0%,
100%,
80% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
</style>
<script type="text/javascript">
var STYLEID = '2',
STATICURL = 'static/',
IMGDIR = 'https://bbs.gter.net/template/archy_plt8/image',
VERHASH = 'Z62',
charset = 'gbk',
discuz_uid = '0',
cookiepre = '4B5x_c0ae_',
cookiedomain = 'gter.net',
cookiepath = '/',
showusercard = '1',
attackevasive = '0',
disallowfloat = '',
creditnotice = ',',
defaultstyle = '',
REPORTURL = 'aHR0cDovL2Jicy5ndGVyLm5ldC9mb3J1bS5waHA/dGlkPTI0MDYzNTYmZ290bz1sYXN0cG9zdA==',
SITEURL = 'https://app.gter.net/',
JSPATH = 'static/js/';
</script>
<script src="https://app.gter.net/bottom?tpl=header&menukey=bbs"></script>
<script src="https://framework.x-php.com/gter/bbs/static/js/common.js" charset="gbk"></script>
</head>
<body>
<script>
window.__ASSET_VERSION__ = 'Z70';
window.isMobile = window.innerWidth <= 768;
</script>
<div id="ajaxwaitid"></div>
<div id="append_parent"></div>
<div class="head-top flexacenter" style="width: 100%; max-width: 1200px; margin: 20px auto 30px; z-index: 8; padding: 0 10px; box-sizing: border-box;">
<a href="/" class="flexacenter" target="_blank">
<img class="logo" src="https://oss.gter.net/logo" alt="" />
</a>
<div class="flex1"></div>
<div class="input-box flexacenter">
<div class="placeholder">
<div class="placeholder-box" style="transition: transform .3s ease"></div>
</div>
<input class="input flex1" type="text" maxlength="140" /> <img class="icon" onclick="searchEvent()" src="https://framework.x-php.com/gter/forum/img/search-icon.svg?v=KHf940mfyKbK" />
<div class="search-box-history">
<div class="search-box-history-title">历史搜索</div>
<div class="search-box-history-list"></div>
</div>
</div>
<div class="post-list flexacenter"> </div>
<div class="sign-in sign-in-no flexacenter"></div>
<div class="head-more flexcenter" onclick="openHeadPop()">
<img class="more-icon" style="width: 18px;height: 15px;" src="https://framework.x-php.com/gter/forum/img/threeAcross.svg?v=KHf940mfyKbK" />
</div>
<div class="head-pop" style="display: none;">
<div class="head-more-pop">
<div class="head-more-userinfo flex1 flexacenter">
<div class="head-more-left flexacenter"><img class="head-more-userinfo-avatar" src="" alt="">
<div class="head-more-userinfo-username"></div>
</div>
<div class="head-more-right">
<div class="loginBtn flexcenter" onclick="go_ajax_Login()">登录/注册</div>
</div>
</div>
<div class="tab-list"><a class="tab-item flexacenter" href="https://www.gter.net" target="_blank">寄托首页</a><a class="tab-item flexacenter pitch" href="https://f.gter.net" target="_blank">论坛</a><a class="tab-item flexacenter" href="https://app.gter.net/admissionOfficer" target="_blank">招生官</a><a class="tab-item flexacenter" href="https://bbs.gter.net/thread-2345065-1-1.html" target="_blank">加群</a><a class="tab-item flexacenter" href="https://offer.gter.net" target="_blank">Offer榜</a></div>
<div class="sign-in sign-in-no flexacenter"></div>
<a class="head-more-post flexcenter" href="/publish" target="" onclick="skipLoginUrl(event)">
<div class="head-more-post-icon flexcenter"><img class="head-more-post-img" src="https://framework.x-php.com/gter/forum/img/addyellow.svg?v=KHf940mfyKbK" /></div>发布帖子
</a>
<img class="cross-icon" onclick="crossHeadPop()" src="https://framework.x-php.com/gter/forum/img/cross.svg?v=KHf940mfyKbK">
</div>
</div>
</div>
<div class="valueA" style="display: none;">https://framework.x-php.com/gter/forum/</div>
<div id="pre-loader">
<div class="three-bounce" p-id="11">
<div class="one" p-id="12"></div>
<div class="two" p-id="13"></div>
<div class="three" p-id="14"></div>
</div>
</div>
<div class="container" id="homepage-me" v-cloak>
<div class="templateValue" ref="tokenRef"></div>
<!-- <head-top></head-top> -->
<div class="head-navigation flexacenter">
<img class="icon" src="https://framework.x-php.com/gter/forum/img/index-icon.png?v=KHf940mfyKbK" />
<a class="text" href="/" target="_blank">论坛</a>
<img class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray.svg?v=KHf940mfyKbK" />
<div class="text">我的主页</div>
</div>
<div class="matter flexflex">
<div class="card-user flexcenter">
<div class="name-area">
<div class="avatar-box flexcenter" v-if="info.avatar">
<img class="avatar" :src="info.avatar" alt="用户头像" />
<a class="pen-box flexcenter" href="https://bbs.gter.net/account.php?a=avatar" target="_blank">
<img class="pen-icon" src="https://framework.x-php.com/gter/forum/img/pen-icon.png?v=KHf940mfyKbK" />
</a>
</div>
<h3 class="username flexcenter">{{ info.nickname }}</h3>
<p class="uid flexcenter">
UID: {{ info.uin }}
<img class="icon" @click="copy(info.uin)" src="https://framework.x-php.com/gter/forum/img/copy-icon.png?v=KHf940mfyKbK" />
</p>
</div>
<div class="bi-box flexacenter">
<img class="bi-masking" src="https://framework.x-php.com/gter/forum/img/bi-masking.svg?v=KHf940mfyKbK" alt="" />
<img class="bi-icon" src="https://framework.x-php.com/gter/forum/img/bi-icon.svg?v=KHf940mfyKbK" alt="" />
<div class="bi-content flex1">
<div class="bi-sum">{{ info.gtercoin }}</div>
<div class="bi-text">寄托币</div>
</div>
<a class="bi-btn flexcenter" target="_blank" href="https://bbs.gter.net/account.php?a=credit&op=rule">
关于寄托币
<img class="bi-question" src="https://framework.x-php.com/gter/forum/img/question-mark.svg?v=KHf940mfyKbK" alt="" />
<!-- <div class="bi-pop flexflex">
<div class="bi-coin-title">寄托币有什么用途、如何获取?</div>
<div class="bi-coin-hint">寄托币可以用于打赏、投币查看帖子、兑换寄托纪念品等,详细请点击
<a class="bi-url" target="_blank" href="https://bbs.gter.net/thread-2543548-1-1.html">攒币指南</a>。
</div>
</div> -->
</a>
</div>
<div class="medal-area" v-if="medallist.length != 0">
<p class="title">勋章 {{ medallist.length }}</p>
<div class="list flexflex">
<img v-for="item in medallist" :src="item.image" :alt="item.name" class="item" />
</div>
</div>
</div>
<div class="matter-content flex1">
<div class="message-box">
<!-- 头部区域 -->
<div class="header">
<img v-if="info.avatar" :src="info.avatar" alt="用户头像" class="avatar" />
<span class="username">{{ info.nickname }}</span>
<img v-if="info?.group?.image" class="icon" :src="info?.group?.image" />
</div>
<!-- 信息列表区域 -->
<div class="info-list flexflex">
<div class="item flexacenter">
<span class="label">注册时间</span>
<span class="value">{{ info.register_at || '暂无' }}</span>
</div>
<div class="item flexacenter">
<span class="label">最后登录</span>
<span class="value">{{ info.lastlogintime || '暂无' }}</span>
</div>
<div class="item flexacenter">
<span class="label">在线时长</span>
<span class="value">{{ info.oltime || 0 }} 小时</span>
</div>
<div class="item flexacenter">
<span class="label">上次访问 IP</span>
<span class="value">{{ info.lastloginip || '暂无' }}</span>
</div>
<div class="item flexacenter">
<span class="label">Email</span>
<span class="value">{{ info.email || '暂无' }}</span>
<span v-if="info.email" class="status blue flexacenter">已认证</span>
</div>
<div class="item flexacenter">
<span class="label">手机号</span>
<span class="value">{{ info.mobile || '暂无' }}</span>
<span v-if="info.mobile" class="status blue flexacenter">已认证</span>
</div>
<div class="item flexacenter">
<span class="label">累计签到</span>
<span class="value">{{ info.sign_count || 0 }} 天</span>
</div>
<div class="item flexacenter">
<span class="label">本月签到</span>
<span class="value">{{ info.sign_month || 0 }} 天</span>
</div>
</div>
<!-- 统计标签区域 -->
<div class="stats flexacenter" v-if="creationType.length != 0">
<template v-for="(item, index) in creationType" :key="index">
<span class="item flexacenter">
<div class="text">{{ item.text }} ×</div>
<div class="num">{{ item.number }}</div>
</span>
<div class="line" v-if="index != creationType.length - 1">|</div>
</template>
</div>
<!-- Offer标签区域 -->
<div class="tags flexflex" v-if="schoolTags.length != 0">
<div class="item flexacenter" v-for="item in schoolTags" :key="item">
<img v-if="item.type == 'offer'" class="icon" src="https://framework.x-php.com/gter/forum/img/offer-icon.png?v=KHf940mfyKbK" mode="heightFix" />
<img v-else class="icon" src="https://framework.x-php.com/gter/forum/img/mj-icon.png?v=KHf940mfyKbK" mode="heightFix" />
{{ item.school }}
</div>
</div>
</div>
<div class="list-area">
<div class="operation-box flexacenter">
<div class="operation-item" :class="{ 'pitch': item.type == typeValue }" v-for="item in typeList" :key="item.type" @click="typeChange(item.type)">{{ item.text }}</div>
</div>
<div class="classify flexacenter">
<div class="item" :class="{'pitch': item.type == classify}" v-for="item in classifyList" :key="item.type" @click="classifyChange(item.type)">{{ item.text }}</div>
</div>
<div v-if="typeValue == 'collection'" class="issue-data flexacenter">
<div class="num">{{ total }}</div>
个收藏
</div>
<div v-else-if="typeValue == 'creation'" class="issue-data flexacenter">
<div class="num">{{ total }}</div>
个创作,获得
<div class="num">{{ 000 }}</div>
个赞
</div>
<div v-else-if="typeValue == 'comment'" class="issue-data flexacenter">
<div class="num">{{ total }}</div>
个评论,获得
<div class="num">{{ 000 }}</div>
个赞
</div>
<div v-else-if="typeValue == 'like'" class="issue-data flexacenter">
<div class="num">{{ total }}</div>
个点赞
</div>
<div v-else-if="typeValue == 'footprint'" class="issue-data flexacenter">系统会为你保留最近7天的浏览记录</div>
<div class="list-box" v-if="list.length != 0">
<template v-for="(item,index) in list" :key="item.uniqid">
<item-offer v-if=" item.type == 'offer'" :itemdata="item" :page="listType"></item-offer>
<item-summary v-else-if="item.type == 'offer_summary'" :itemdata="item" :page="listType"></item-summary>
<item-vote v-else-if="item.type == 'vote'" :itemdata="item" :page="listType"></item-vote>
<item-mj v-else-if="item.type == 'interviewexperience'" :itemdata="item" :page="listType"></item-mj>
<item-tenement v-else-if="item.type == 'tenement'" :itemdata="item" :page="listType"></item-tenement>
<item-forum v-else :itemdata="item" :page="listType"></item-forum>
</template>
</div>
<load-box :loading="loading" style="margin-left: 95px;margin-right: 40px;width: calc(100% - 135px);"></load-box>
<div v-if="list.length == 0 && page == 0" class="empty flexcenter">
<img class="empty-icon" src="https://framework.x-php.com/gter/forum/img/empty-icon.png?v=KHf940mfyKbK" />
<div class="empty-text">- 暂无内容 -</div>
</div>
<div v-if="list.length != 0 && page != 0" class="load-more flexcenter">加载更多…</div>
<div v-if="list.length != 0 && page == 0" class="load-more flexcenter">- End -</div>
</div>
</div>
</div>
</div>
<script src="https://framework.x-php.com/gter/forum/js/vue.global.js?v=KHf940mfyKbK"></script>
<script src="https://framework.x-php.com/gter/forum/js/axios.min.js?v=KHf940mfyKbK"></script>
<script src="https://framework.x-php.com/gter/forum/js/public.js?v=KHf940mfyKbK"></script>
<!-- <script src="https://f.gter.net/js/public.js"></script> -->
<script type="module" src="https://framework.x-php.com/gter/forum/js/homepage-me.js?v=KHf940mfyKbK"></script>
<!-- <script type="module" src="https://f.gter.net/js/homepage-me.js"></script> -->
<script type="module" src="https://framework.x-php.com/gter/forum/../image/gter/commonCom/sign-in/sign-in.js?v=KHf940mfyKbK"></script>
<script src="https://app.gter.net/bottom?tpl=footer,popupnotification"></script>
<script>
if (location.href.indexOf('details') != -1 || location.href.indexOf('thread') != -1) {
const postList = document.querySelector('.head-top .post-list')
postList.innerHTML = `<a href="/publish" target="_blank" style="margin-right: 10px"> <img class="post-item" src="https://framework.x-php.com/gter/forum/img/post-thread.png?v=KHf940mfyKbK" /> </a> <a href="https://offer.gter.net/post" target="_blank" style="margin-right: 10px"> <img class="post-item" src="https://framework.x-php.com/gter/forum/img/post-offer.png?v=KHf940mfyKbK" /> </a> <a href="https://offer.gter.net/post/summary" target="_blank" style="margin-right: 10px"> <img class="post-item" src="https://framework.x-php.com/gter/forum/img/post-summary.png?v=KHf940mfyKbK" /> </a> <a href="https://interviewexperience.gter.net/publish" target="_blank" style="margin-right: 10px"> <img class="post-item" src="https://framework.x-php.com/gter/forum/img/post-mj.png?v=KHf940mfyKbK" /> </a> <a href="https://vote.gter.net/publish" target="_blank"> <img class="post-item" src="https://framework.x-php.com/gter/forum/img/post-vote.png?v=KHf940mfyKbK" /> </a>`
postList.style.display = 'flex'
} else if (location.href.indexOf('search') != -1) {
const box = document.querySelector(".head-top")
box.querySelector(".input-box").style.display = "none"
box.querySelector(".sign-in").style.display = "none"
} else if (location.href.indexOf("publish") != -1) {
const box = document.querySelector(".head-top")
if (box) document.body.removeChild(box)
} else {
const signInList = document.querySelectorAll('.head-top .sign-in')
signInList.forEach(element => {
element.innerHTML = `<div class="sign-in-no-box" onclick="headSignIn()">
<img class="sign-in-bj" src="https://framework.x-php.com/gter/forum/img/sign-in-bj.svg?v=KHf940mfyKbK" /><img class="coin-bj" src="https://framework.x-php.com/gter/forum/img/coin-bj.svg?v=KHf940mfyKbK" />
<img class="coin-icon" src="https://framework.x-php.com/gter/forum/img/coin-icon.png?v=KHf940mfyKbK" /><span class="text flex1">签到领寄托币</span>
<div class="sign-go flexcenter">
<img class="sign-go-bj" src="https://framework.x-php.com/gter/forum/img/sign-go.svg?v=KHf940mfyKbK" /> GO
</div>
<img class="petal1" src="https://framework.x-php.com/gter/forum/img/petal1.png?v=KHf940mfyKbK" />
<img class="petal2" src="https://framework.x-php.com/gter/forum/img/petal2.png?v=KHf940mfyKbK" />
<img class="petal3" src="https://framework.x-php.com/gter/forum/img/petal3.png?v=KHf940mfyKbK" />
</div>
<div class="sign-in-already-box">
<img class="sign-icon" src="https://framework.x-php.com/gter/forum/img/sign-icon.png?v=KHf940mfyKbK" />
<span>已签到,明天再来</span>
</div>`
element.style.display = 'flex'
})
let userInfoWinTimerCount = 0;
const userInfoWinTimer = setInterval(() => {
if (location.host == "127.0.0.1:5501") return;
if (todaysignedState) {
clearInterval(userInfoWinTimer);
if (todaysigned == 1) {
signInList.forEach(element => {
element.classList.add('sign-in-already')
element.classList.remove("sign-in-no");
})
}
}
userInfoWinTimerCount++;
if (userInfoWinTimerCount >= 3000) clearInterval(userInfoWinTimer);
}, 50);
}
function headSignIn() {
SignInComponent.initComponent();
}
const searchInput = document.querySelector('.head-top .input')
// 绑定 blur 和 focus 事件
if (searchInput) {
searchInput.addEventListener('blur', function () {
setTimeout(() => {
const historyBox = document.querySelector('.head-top .search-box-history')
if (historyBox) historyBox.style.display = 'none'
}, 300);
const inputBox = document.querySelector('.head-top .input-box')
if (inputBox) inputBox.classList.remove('pitch')
startCarousel();
})
searchInput.addEventListener('focus', () => {
const historyBox = document.querySelector('.head-top .search-box-history')
const historyItem = historyBox.querySelectorAll(".search-box-history-item")
if (historyBox && historyItem.length > 0) historyBox.style.display = 'block'
const inputBox = document.querySelector('.head-top .input-box')
if (inputBox) inputBox.classList.add('pitch')
if (carouselTimer) clearInterval(carouselTimer);
})
// 绑定回车事件
searchInput.addEventListener('keydown', (e) => {
if (e.key == 'Enter') searchEvent()
})
searchInput.addEventListener('input', (e) => {
const value = e.target.value || ''
const placeholder = document.querySelector(".head-top .placeholder")
if (value) placeholder.style.display = 'none'
else placeholder.style.display = 'block'
})
}
let historySearchList = []
// 获取历史搜索
const getHistorySearch = () => {
const data = JSON.parse(localStorage.getItem("history-search")) || [];
historySearchList = data;
let itemAll = ``
data.forEach((item, index) => itemAll += `<div class="search-box-history-item one-line-display" onclick="searchEvent('${item}')">${item}</div>`) // 绑定事件 searchEvent 点击搜索)
const historyList = document.querySelector('.search-box-history-list')
historyList.innerHTML = itemAll
};
if (location.href.indexOf("/publish") == -1 && location.href.indexOf("/search") == -1) getHistorySearch();
const searchEvent = (value) => {
if (window.innerWidth <= 480) {
redirectToExternalWebsite("/search");
return
}
const kw = value || searchInput.value || hotSearchWords[currentIndex]?.keyword || "";;
if (!kw) return;
historySearchList.unshift(kw);
historySearchList = [...new Set(historySearchList)];
if (historySearchList.length > 10) historySearchList = historySearchList.splice(0, 10);
localStorage.setItem("history-search", JSON.stringify(historySearchList));
redirectToExternalWebsite("/search/" + kw);
searchInput.value = ""
}
let hotSearchWords = [];
const renderingPlaceholder = () => {
let itemAll = ``
hotSearchWords.forEach(item => {
itemAll += `<div class="item one-line-display" >大家都在搜:${item.keyword}</div>`
})
const sliceHotSearchWords = hotSearchWords.slice(0, 2)
sliceHotSearchWords.forEach(item => {
itemAll += `<div class="item one-line-display" >大家都在搜:${item.keyword}</div>`
})
const placeholderBox = document.querySelector('.placeholder .placeholder-box')
placeholderBox.innerHTML = itemAll
}
const getWConfigg = () => {
ajaxGet("/v2/api/config/website").then((res) => {
if (res.code == 200) {
let data = res["data"] || {};
hotSearchWords = data.hotSearchWords || [];
renderingPlaceholder()
data.time = new Date().toISOString();
localStorage.setItem("wConfig", JSON.stringify(data));
}
});
};
const checkWConfig = () => {
const wConfig = JSON.parse(localStorage.getItem("wConfig")) || {};
if (wConfig.time) {
const time = new Date(wConfig.time);
const now = new Date();
if (now - time > 24 * 60 * 60 * 1000) getWConfigg();
else {
hotSearchWords = wConfig.hotSearchWords || [];
renderingPlaceholder()
}
} else getWConfigg();
};
checkWConfig()
const renderCurrentIndex = () => {
const placeholderBox = document.querySelector('.placeholder .placeholder-box')
if (placeholderBox) placeholderBox.style.transform = `translateY(${-currentIndex * 36}px)`
}
let currentIndex = 0; // 当前显示的关键词索引
let carouselTimer = null; // 轮播定时器
// 启动轮播函数
const startCarousel = () => {
// 清除已有的定时器
if (carouselTimer) clearInterval(carouselTimer);
// 设置新的定时器,每秒滚动一次
carouselTimer = setInterval(() => {
if (hotSearchWords.length > 1) {
if (currentIndex >= hotSearchWords.length - 1) {
currentIndex++;
setTimeout(() => {
currentIndex = 0;
}, 2300);
} else currentIndex++;
}
renderCurrentIndex()
}, 2300);
};
startCarousel();
const openHeadPop = () => {
if (window["userInfoWin"]?.uin > 0 || window["userInfoWin"]?.uid > 0) {
// 登录
const headMoreLeft = document.querySelector(".head-pop .head-more-left")
headMoreLeft.innerHTML = `<img class="head-more-userinfo-avatar" src="${window["userInfoWin"]?.avatar}" alt=""><div class="head-more-userinfo-username">${window["userInfoWin"]?.nickname}</div>`
} else {
const avatar = document.querySelector(".head-pop .head-more-userinfo-avatar")
avatar.src = "/img/defaultAvatar.png"
const headMoreRight = document.querySelector(".head-pop .head-more-right")
headMoreRight.style.display = "block"
}
document.querySelector(".head-pop").classList.add("head-pop-show");
}
const skipLoginUrl = (e) => {
if (window["userInfoWin"]?.uin > 0 || window["userInfoWin"]?.uid > 0) { }
else {
e.preventDefault();
go_ajax_Login();
}
}
const crossHeadPop = () => document.querySelector(".head-pop").classList.remove("head-pop-show");
</script>
</body>
</html>

View File

@@ -102,7 +102,7 @@
</script>
<div id="ajaxwaitid"></div>
<div id="append_parent"></div>
<div class="head-top flexacenter" style="width: 1200px;margin: 20px auto 30px;z-index: 8;">
<div class="head-top flexacenter" style="width: 100%; max-width: 1200px; margin: 20px auto 30px; z-index: 8; padding: 0 10px; box-sizing: border-box;">
<a href="/" class="flexacenter" target="_blank">
<img class="logo" src="https://oss.gter.net/logo" alt="" />
</a>