feat: 更新CSS样式、添加TinyMCE插件及优化发布页面

修复移动端登录框样式问题
更新公共JS文件中的授权令牌
添加TinyMCE插件(代码、视觉块、预览等)
优化发布管理页面的编辑器和布局
调整登录组件的响应式样式
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-25 17:21:52 +08:00
parent f2469a1a3b
commit acafc9792a
37 changed files with 1263 additions and 129 deletions

565
homepage-other-V2.html Normal file
View File

@@ -0,0 +1,565 @@
<!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>so猫的个人主页 -- 寄托天下</title>
<link rel="stylesheet" href="/css/public.css" />
<link rel="stylesheet" href="/css/homepage-other.css" />
<meta name="description" content="寄托天下留学论坛上查看so猫的个人主页">
<meta name="keywords" content="so猫, 寄托天下, 留学论坛">
<meta name="author" content="">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="so猫的个人主页">
<meta property="og:description" content="寄托天下留学论坛上查看so猫的个人主页">
<meta property="og:image" content="">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="so猫的个人主页">
<meta property="twitter:description" content="寄托天下留学论坛上查看so猫的个人主页">
<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: 1200px;margin: 20px auto 30px;z-index: 8;">
<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=HP1TnTC4iXqb" />
<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=HP1TnTC4iXqb" />
</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=HP1TnTC4iXqb" /></div>发布帖子
</a>
<img class="cross-icon" onclick="crossHeadPop()" src="https://framework.x-php.com/gter/forum/img/cross.svg?v=HP1TnTC4iXqb">
</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-other" v-cloak>
<div class="templateValue" ref="tokenRef">IK8gQW_rhIzjn5y_27ky2ZvwRQxRrg7wAsfg1NYIwUkqAJdjHi9EmGZmMjM~</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=HP1TnTC4iXqb" />
<a class="text" href="/" target="_blank">论坛</a>
<img class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray.svg?v=HP1TnTC4iXqb" />
<div class="text one-line-display">so猫的个人主页</div>
</div>
<div class="matter flexflex">
<div class="card-user flexcenter">
<div class="name-area">
<img v-if="info.avatar" class="avatar" :src="info.avatar" alt="用户头像" />
<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=HP1TnTC4iXqb" />
</p>
</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" :key="item.medalid" :src="item.image" :alt="item.description" class="item" />
</div>
</div>
<div class="btn-area">
<div class="item msg flexcenter" @click="sendMessage()">发私信</div>
<template v-if="isManager">
<a class="item flexcenter" target="_blank" href="https://demo.gter.net/admin">用户管理</a>
<a class="item flexcenter" target="_blank" href="https://demo.gter.net/admin">内容管理</a>
</template>
</div>
</div>
<div class="matter-content flex1">
<div class="message-box">
<!-- 头部区域 -->
<div class="header flexacenter">
<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">
<template v-if="isManager">
<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>
</template>
<div class="item flexacenter">
<span class="label">在线时长</span>
<span class="value">{{ info.oltime || 0 }} 小时</span>
</div>
<template v-if="isManager">
<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>
</template>
<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>
<template v-if="isManager">
<div class="item flexacenter">
<span class="label">寄托币</span>
<span class="value">{{ info.gtercoin || 0 }}</span>
</div>
</template>
</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">
<template v-for="(item, index) in schoolTags" :key="index">
<a v-if="item.type == 'offer'" class="item flexacenter" target="_blank" :href="'/details/' + item.uniqid">
<img class="icon" src="https://framework.x-php.com/gter/forum/img/offer-icon.png?v=HP1TnTC4iXqb" mode="heightFix" />
{{ item.school }}
</a>
<a v-else class="item flexacenter" target="_blank" :href="'/details/' + item.uniqid">
<img class="icon" src="https://framework.x-php.com/gter/forum/img/mj-icon.png?v=HP1TnTC4iXqb" mode="heightFix" />
{{ item.school }}
</a>
</template>
</div>
</div>
<div class="list-area">
<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 class="issue-data flexacenter">
<div class="num">{{ count }}</div>
个创作,获得
<div class="num">{{ classify == 'all' ? totalLikes : (likeObjValue[classify] || 0) }}</div>
个赞
</div>
<div class="list-box" v-if="list.length != 0">
<template v-for="(item,index) in list" :key="index">
<item-offer v-if=" item.type == 'offer'" :itemdata="item"></item-offer>
<item-summary v-else-if="item.type == 'offer_summary'" :itemdata="item"></item-summary>
<item-vote v-else-if="item.type == 'vote'" :itemdata="item"></item-vote>
<item-mj v-else-if="item.type == 'interviewexperience'" :itemdata="item"></item-mj>
<item-tenement v-else-if="item.type == 'tenement'" :itemdata="item"></item-tenement>
<item-forum v-else :itemdata="item"></item-forum>
</template>
</div>
<load-box :loading="loading"></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=HP1TnTC4iXqb" />
<div class="empty-text">- 暂无内容 -</div>
</div>
<div v-if="list.length != 0 && page != 0" class="load-more flexcenter">加载更多…</div>
</div>
</div>
</div>
</div>
<script src="https://framework.x-php.com/gter/forum/js/vue.global.js?v=HP1TnTC4iXqb"></script>
<script src="https://framework.x-php.com/gter/forum/js/axios.min.js?v=HP1TnTC4iXqb"></script>
<script src="https://framework.x-php.com/gter/forum/js/public.js?v=HP1TnTC4iXqb"></script>
<!-- <script src="https://f.gter.net/js/public.js"></script> -->
<script type="module" src="https://framework.x-php.com/gter/forum/js/homepage-other.js?v=HP1TnTC4iXqb"></script>
<!-- <script type="module" src="https://f.gter.net/js/homepage-other.js"></script> -->
<script type="module" src="https://framework.x-php.com/gter/forum/../image/gter/commonCom/sign-in/sign-in.js?v=HP1TnTC4iXqb"></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=HP1TnTC4iXqb" /> </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=HP1TnTC4iXqb" /> </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=HP1TnTC4iXqb" /> </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=HP1TnTC4iXqb" /> </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=HP1TnTC4iXqb" /> </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=HP1TnTC4iXqb" /><img class="coin-bj" src="https://framework.x-php.com/gter/forum/img/coin-bj.svg?v=HP1TnTC4iXqb" />
<img class="coin-icon" src="https://framework.x-php.com/gter/forum/img/coin-icon.png?v=HP1TnTC4iXqb" /><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=HP1TnTC4iXqb" /> GO
</div>
<img class="petal1" src="https://framework.x-php.com/gter/forum/img/petal1.png?v=HP1TnTC4iXqb" />
<img class="petal2" src="https://framework.x-php.com/gter/forum/img/petal2.png?v=HP1TnTC4iXqb" />
<img class="petal3" src="https://framework.x-php.com/gter/forum/img/petal3.png?v=HP1TnTC4iXqb" />
</div>
<div class="sign-in-already-box">
<img class="sign-icon" src="https://framework.x-php.com/gter/forum/img/sign-icon.png?v=HP1TnTC4iXqb" />
<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>