fix(component): 修复组件名称错误和props类型定义
refactor(component): 重构组件模板结构,移除重复代码 feat(component): 添加可选props支持外部数据传入 style(css): 优化样式布局和响应式设计 fix(js): 修复URL路径处理逻辑和滚动加载问题 feat(search): 新增搜索页推荐内容和空状态处理 chore: 添加新图标资源文件
This commit is contained in:
150
searchV2.html
150
searchV2.html
@@ -5,22 +5,23 @@
|
||||
<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="https://framework.x-php.com/gter/forum/css/public.css?v=vDmK98808ObK" />
|
||||
<link rel="stylesheet" href="/css/search.css" />
|
||||
<title>搜索结果 - - 寄托天下 -- 寄托天下</title>
|
||||
<link rel="stylesheet" href="/css/public.css?v=uj0T1euj8ufe" />
|
||||
<link rel="stylesheet" href="/css/search.css?v=uj0T1euj8ufe" />
|
||||
<!-- <link rel="stylesheet" href="https://f.gter.net/css/search.css" /> -->
|
||||
|
||||
<meta name="description" content="在寄托天下留学论坛上搜索澳门大学, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<meta name="keywords" content="澳门大学, 寄托天下, 留学论坛">
|
||||
<meta name="description" content="在寄托天下留学论坛上搜索, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<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="在寄托天下留学论坛上搜索澳门大学, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<meta property="og:title" content="搜索结果 - - 寄托天下">
|
||||
<meta property="og:description" content="在寄托天下留学论坛上搜索, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<meta property="og:image" content="">
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:title" content="搜索结果 - 澳门大学 - 寄托天下">
|
||||
<meta property="twitter:description" content="在寄托天下留学论坛上搜索澳门大学, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<meta property="twitter:title" content="搜索结果 - - 寄托天下">
|
||||
<meta property="twitter:description" content="在寄托天下留学论坛上搜索, 分享留学经验, 咨询签证, 面试, 机经, offer, 奖学金, 名校专业等。">
|
||||
<meta property="twitter:image" content="">
|
||||
<!-- 网站图标 -->
|
||||
<link rel="icon" href="https://www.gter.net/favicon.ico" type="image/x-icon">
|
||||
@@ -114,7 +115,7 @@
|
||||
<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=vDmK98808ObK" />
|
||||
<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=uj0T1euj8ufe" />
|
||||
<div class="search-box-history">
|
||||
<div class="search-box-history-title">历史搜索</div>
|
||||
<div class="search-box-history-list"></div>
|
||||
@@ -126,7 +127,7 @@
|
||||
<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=vDmK98808ObK" />
|
||||
<img class="more-icon" style="width: 18px;height: 15px;" src="https://framework.x-php.com/gter/forum/img/threeAcross.svg?v=uj0T1euj8ufe" />
|
||||
</div>
|
||||
|
||||
<div class="head-pop" style="display: none;">
|
||||
@@ -141,9 +142,9 @@
|
||||
</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>
|
||||
<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=vDmK98808ObK" /></div>发布帖子
|
||||
<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=uj0T1euj8ufe" /></div>发布帖子
|
||||
</a>
|
||||
<img class="cross-icon" onclick="crossHeadPop()" src="https://framework.x-php.com/gter/forum/img/cross.svg?v=vDmK98808ObK">
|
||||
<img class="cross-icon" onclick="crossHeadPop()" src="https://framework.x-php.com/gter/forum/img/cross.svg?v=uj0T1euj8ufe">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,22 +154,61 @@
|
||||
|
||||
|
||||
<div class="container" id="search">
|
||||
<div class="templateValue" ref="kwValue">澳门大学</div>
|
||||
<div class="templateValue" ref="kwValue"></div>
|
||||
<div class="templateValue" ref="typeValue"></div>
|
||||
<div v-if="isNoSearch" class="search-no" style="min-height: 50vh;">
|
||||
<img class="earth-icon flexflex" src="/img/earth-icon.png">
|
||||
<div class="input-box flexacenter">
|
||||
<input class="input flex1 vuehide" placeholder="请输入关键词" v-model="kw" @keyup.enter="startSearch(kw ? '' : placeholder)">
|
||||
<input v-cloak class="input flex1" :placeholder="placeholder" v-model="kw" @keyup.enter="startSearch(kw ? '' : placeholder)">
|
||||
<div class="btn" @click="startSearch(kw ? '' : placeholder)">搜索</div>
|
||||
</div>
|
||||
|
||||
<template v-if="!isNoSearch">
|
||||
<div class="search-no">
|
||||
<img class="earth-icon flexflex" src="/img/earth-icon.png">
|
||||
<div class="input-box">
|
||||
<input class="flex1" placeholder="港中大 双学位">
|
||||
<div class="btn">搜索</div>
|
||||
<div class="recommend-box flexflex" v-cloak>
|
||||
<div class="hot-box" v-if="searchList.length != 0">
|
||||
<div class="recommend-head flexacenter">
|
||||
<img class="icon" src="/img/triangle-violet.svg">
|
||||
热门搜索
|
||||
</div>
|
||||
<div class="hot-list flexflex">
|
||||
<div class="item" v-for="item in searchList" @click="startSearch(item.keyword)">{{ item.keyword }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hot-box" v-if="tagList.length != 0">
|
||||
<div class="recommend-head flexacenter">
|
||||
<img class="icon" src="/img/triangle-yellow.svg">
|
||||
热门标签
|
||||
</div>
|
||||
<div class="hot-list flexflex">
|
||||
<a class="item flexacenter" href="/recommend" target="_blank">
|
||||
<img class="icon" src="/img/recommend-head-icon.png">
|
||||
编辑推荐
|
||||
</a>
|
||||
<a class="item flexacenter" href="/best" target="_blank">
|
||||
<img class="icon" src="/img/essence-head-icon.png">
|
||||
精华帖
|
||||
</a>
|
||||
<a class="item" v-for="item in tagList" :href="'/tag/' + item.tagname" target="_blank">{{ item.tagname }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="read-box" v-if="recommendList.length != 0">
|
||||
<div class="recommend-head flexacenter">
|
||||
<img class="icon" src="/img/triangle-blue.svg">
|
||||
推荐阅读
|
||||
</div>
|
||||
<div class="read-list">
|
||||
<a class="item flexacenter" v-for="item in recommendList" target="_blank" :href="'/details/' + item.uniqid ">
|
||||
<div class="dot"></div>
|
||||
<div class="text flex1 one-line-display">{{ item.title }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div class="search-box flexacenter">
|
||||
<input class="search-input flex1" placeholder="请输入搜索关键词" v-model="kw" @keyup.enter="startSearch" />
|
||||
<img class="search-icon" src="https://framework.x-php.com/gter/forum/img/search-icon.svg?v=vDmK98808ObK" alt="" @click="startSearch" />
|
||||
<input class="search-input flex1" placeholder="请输入搜索关键词" v-model="kw" @keyup.enter="startSearch()" />
|
||||
<img class="search-icon" src="https://framework.x-php.com/gter/forum/img/search-icon.svg?v=uj0T1euj8ufe" alt="" @click="startSearch()" />
|
||||
</div>
|
||||
<template v-if="!isEmptySearch">
|
||||
<div class="classify flexacenter">
|
||||
@@ -183,16 +223,16 @@
|
||||
条
|
||||
</div>
|
||||
</template>
|
||||
<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 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="matter flexflex" ref="matterRef" v-cloak>
|
||||
|
||||
<div class="matter-content flex1" ref="matterContentRef" :style="{'top': matterHeight + 'px'}">
|
||||
|
||||
<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>
|
||||
@@ -208,24 +248,34 @@
|
||||
<load-box :loading="loading"></load-box>
|
||||
|
||||
<div v-if="list.length == 0 && page == null" class="empty flexcenter">
|
||||
<img class="empty-icon" src="https://framework.x-php.com/gter/forum/img/empty-icon.png?v=vDmK98808ObK" />
|
||||
<img class="empty-icon" src="https://framework.x-php.com/gter/forum/img/empty-icon.png?v=uj0T1euj8ufe" />
|
||||
<div class="empty-text">{{ kw ? '- 暂无内容 -' : '- 请输入搜索关键词 -' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="pages-box flexcenter" v-if="pagination.length != 0">
|
||||
<img v-if="page == 1" class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray-simple.svg?v=vDmK98808ObK" alt="" />
|
||||
<img @click="prevPage" v-else class="arrows rotate180" src="https://framework.x-php.com/gter/forum/img/arrows-gray-deep.svg?v=vDmK98808ObK" alt="" />
|
||||
<img v-if="page == 1" class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray-simple.svg?v=uj0T1euj8ufe" alt="" />
|
||||
<img @click="prevPage" v-else class="arrows rotate180" src="https://framework.x-php.com/gter/forum/img/arrows-gray-deep.svg?v=uj0T1euj8ufe" alt="" />
|
||||
|
||||
<div class="item" :class="{'pitch': item == page }" v-for="(item, index) in pagination" @click="cutPage(item)">{{ item }}</div>
|
||||
|
||||
<img v-if="page == maxPage" class="arrows rotate180" src="https://framework.x-php.com/gter/forum/img/arrows-gray-simple.svg?v=vDmK98808ObK" alt="" />
|
||||
<img @click="nextPage" v-else v-else class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray-deep.svg?v=vDmK98808ObK" alt="" />
|
||||
<img v-if="page == maxPage" class="arrows rotate180" src="https://framework.x-php.com/gter/forum/img/arrows-gray-simple.svg?v=uj0T1euj8ufe" alt="" />
|
||||
<img @click="nextPage" v-else v-else class="arrows" src="https://framework.x-php.com/gter/forum/img/arrows-gray-deep.svg?v=uj0T1euj8ufe" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-box" ref="sidebarRef" :style="{'top': sidebarHeight + 'px'}">
|
||||
<hot-search></hot-search>
|
||||
<hot-tag></hot-tag>
|
||||
<div class="recommend-and-essence flexacenter">
|
||||
<a class="item flexcenter" target="_blank" href="/recommend">
|
||||
<img class="icon" src="/img/recommend-head-icon.png" />
|
||||
<div class="text">编辑推荐</div>
|
||||
</a>
|
||||
<a class="item flexcenter" target="_blank" href="/best">
|
||||
<img class="icon" src="/img/essence-head-icon.png" />
|
||||
<div class="text">精华帖</div>
|
||||
</a>
|
||||
</div>
|
||||
<hot-search :isNoRequestData="true" :searchlist="searchList"></hot-search>
|
||||
<hot-tag :isNoRequestData="true" :taglist="tagList"></hot-tag>
|
||||
<slideshow-box></slideshow-box>
|
||||
<latest-list></latest-list>
|
||||
</div>
|
||||
@@ -234,13 +284,13 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://framework.x-php.com/gter/forum/js/vue.global.js?v=vDmK98808ObK"></script>
|
||||
<script src="https://framework.x-php.com/gter/forum/js/axios.min.js?v=vDmK98808ObK"></script>
|
||||
<script src="https://framework.x-php.com/gter/forum/js/public.js?v=vDmK98808ObK"></script>
|
||||
<script src="https://framework.x-php.com/gter/forum/js/vue.global.js?v=uj0T1euj8ufe"></script>
|
||||
<script src="https://framework.x-php.com/gter/forum/js/axios.min.js?v=uj0T1euj8ufe"></script>
|
||||
<script src="https://framework.x-php.com/gter/forum/js/public.js?v=uj0T1euj8ufe"></script>
|
||||
<!-- <script src="https://f.gter.net/js/public.js"></script> -->
|
||||
|
||||
<script type="module" src="/js/search.js?v=vDmK98808ObK"></script>
|
||||
<!-- <script type="module" src="https://f.gter.net/js/search.js"></script> -->
|
||||
<!-- <script type="module" src="https://framework.x-php.com/gter/forum/js/search.js?v=uj0T1euj8ufe"></script> -->
|
||||
<script type="module" src="/js/search.js"></script>
|
||||
|
||||
|
||||
<script src="https://app.gter.net/bottom?tpl=footer,popupnotification"></script>
|
||||
@@ -250,7 +300,7 @@
|
||||
|
||||
if (location.href.indexOf('details') != -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=vDmK98808ObK" /> </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=vDmK98808ObK" /> </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=vDmK98808ObK" /> </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=vDmK98808ObK" /> </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=vDmK98808ObK" /> </a>`
|
||||
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=uj0T1euj8ufe" /> </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=uj0T1euj8ufe" /> </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=uj0T1euj8ufe" /> </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=uj0T1euj8ufe" /> </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=uj0T1euj8ufe" /> </a>`
|
||||
console.log(postList);
|
||||
postList.style.display = 'flex'
|
||||
} else if (location.href.indexOf('search') != -1) {
|
||||
@@ -263,17 +313,17 @@
|
||||
} else {
|
||||
const signIn = document.querySelector('.head-top .sign-in')
|
||||
signIn.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=vDmK98808ObK" /><img class="coin-bj" src="https://framework.x-php.com/gter/forum/img/coin-bj.svg?v=vDmK98808ObK" />
|
||||
<img class="coin-icon" src="https://framework.x-php.com/gter/forum/img/coin-icon.png?v=vDmK98808ObK" /><span class="text flex1">签到领寄托币</span>
|
||||
<img class="sign-in-bj" src="https://framework.x-php.com/gter/forum/img/sign-in-bj.svg?v=uj0T1euj8ufe" /><img class="coin-bj" src="https://framework.x-php.com/gter/forum/img/coin-bj.svg?v=uj0T1euj8ufe" />
|
||||
<img class="coin-icon" src="https://framework.x-php.com/gter/forum/img/coin-icon.png?v=uj0T1euj8ufe" /><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=vDmK98808ObK" /> GO
|
||||
<img class="sign-go-bj" src="https://framework.x-php.com/gter/forum/img/sign-go.svg?v=uj0T1euj8ufe" /> GO
|
||||
</div>
|
||||
<img class="petal1" src="https://framework.x-php.com/gter/forum/img/petal1.png?v=vDmK98808ObK" />
|
||||
<img class="petal2" src="https://framework.x-php.com/gter/forum/img/petal2.png?v=vDmK98808ObK" />
|
||||
<img class="petal3" src="https://framework.x-php.com/gter/forum/img/petal3.png?v=vDmK98808ObK" />
|
||||
<img class="petal1" src="https://framework.x-php.com/gter/forum/img/petal1.png?v=uj0T1euj8ufe" />
|
||||
<img class="petal2" src="https://framework.x-php.com/gter/forum/img/petal2.png?v=uj0T1euj8ufe" />
|
||||
<img class="petal3" src="https://framework.x-php.com/gter/forum/img/petal3.png?v=uj0T1euj8ufe" />
|
||||
</div>
|
||||
<div class="sign-in-already-box">
|
||||
<img class="sign-icon" src="https://framework.x-php.com/gter/forum/img/sign-icon.png?v=vDmK98808ObK" />
|
||||
<img class="sign-icon" src="https://framework.x-php.com/gter/forum/img/sign-icon.png?v=uj0T1euj8ufe" />
|
||||
<span>已签到,明天再来</span>
|
||||
</div>`
|
||||
signIn.style.display = 'flex'
|
||||
|
||||
Reference in New Issue
Block a user