no message

This commit is contained in:
A1300399510
2024-01-03 17:08:29 +08:00
parent 4665ee5043
commit b2e7cb8f45
79 changed files with 915 additions and 799 deletions

View File

@@ -12,7 +12,7 @@
<!-- <div class="content flexflex" :style="{ position: scrollTopValue > 88 ? 'fixed' : '' }"> -->
<div class="content flexflex">
<div class="left" @scroll="handleListScroll">
<div class="left" :style="{ height: contentHeight + 'px' }">
<div class="school-box flexcenter">
<a class="school-box-icon" :href="info['school']?.['url']" target="_blank"><img class="school-icon" v-if="info['school']?.['image']" :src="info['school']?.['image']" /></a>
<a class="school-name" :href="info['school']?.['url']" target="_blank">{{ info["school"]?.["name"] }}</a>
@@ -24,7 +24,7 @@
<div class="value">{{ relatedcount }}</div>
个面经
</div>
<div class="mj-list">
<div class="mj-list" @scroll="handleListScroll">
<a class="mj-item flexflex" :class="{ pitch: pitchIndex == index }" v-for="(item, index) in relatedlist" :key="index" @click.stop.prevent="handleItem(item['uniqid'])" :href="`./details/${item['uniqid']}`">
<img class="item-bj" src="@/assets/img/item-bj.svg" />
<div class="mj-header flexacenter">
@@ -50,10 +50,11 @@
</a>
</div>
</div>
<div class="right flex1" @scroll="handleCommentsScroll" v-loading="detailsLoading">
<!-- <div class="right flex1" @scroll="handleCommentsScroll" v-loading="detailsLoading"> -->
<div class="right flex1" ref="contentRef" v-loading="detailsLoading">
<!-- <div class="right-loading"></div> -->
<div class="header">
<div class="title">{{ info["subject"] }}</div>
<div class="titletitle">{{ info["subject"] }}</div>
<div class="mj-header flexacenter">
<div class="mj-header-left flexacenter">
<el-popover placement="bottom-start" :width="140" trigger="click" popper-class="avatar-box-popper" :show-arrow="false">
@@ -261,7 +262,8 @@
</div>
</div>
<div class="floor-area flexacenter" v-if="floorAreaState">
<!-- <div class="floor-area flexacenter" v-if="floorAreaState"> -->
<div class="floor-area flexacenter">
<div class="floor-content flexacenter">
<div class="floor-left flexacenter">
<div class="item flexacenter" @click="handleLike">
@@ -332,12 +334,36 @@ let uniqid = route.params.id
let isNeedLogin = inject("isNeedLogin")
const goLogin = inject("goLogin")
useHead({ script: [{ src: "https://app.gter.net/bottom?tpl=header&menukey=mj" }] })
useHead({
script: [
{ src: "https://app.gter.net/bottom?tpl=header&menukey=mj" },
// { src: "https://app.gter.net/bottom?tpl=footer", body: true }
],
})
let contentRef = ref(null)
let contentHeight = ref(null)
onMounted(() => {
// window.addEventListener("scroll", handleScroll)
window.addEventListener("scroll", handleScroll)
getDetails()
openObserverBottom()
// openObserverBottom()
console.log("contentRef", contentRef)
// 在元素挂载后执行回调函数
nextTick(() => {
// 创建 ResizeObserver 实例
const observer = new ResizeObserver(entries => {
for (const entry of entries) {
// 元素的高度变化
contentHeight.value = entry.contentRect.height
console.log("元素高度变化:", contentHeight.value)
}
})
// 监听元素的变化
observer.observe(contentRef.value)
})
})
// watch(route, () => {
@@ -512,6 +538,8 @@ const getCommentListHttp = () => {
if (commentPage.value == 0 || commentLoading || detailsLoading.value) return
commentLoading = true
getRelatedlistHttp()
detailsCommentListHttp({
page: commentPage.value,
childlimit: 1,
@@ -609,17 +637,17 @@ let scrollTopValue = ref(0)
// 监听滚动到底部
const handleScroll = () => {
return
// return
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
scrollTopValue.value = scrollTop
return
// return
const scrollHeight = document.documentElement.scrollHeight
const clientHeight = document.documentElement.clientHeight
// 列表下 滑动到底部 获取新数据
// if (scrollTop + clientHeight >= scrollHeight - 40) getCommentListHttp()
if (scrollTop + clientHeight >= scrollHeight - 40) getCommentListHttp()
}
// 打开 回答-评论 的子评论
@@ -674,7 +702,6 @@ const submitAnswerComments = (index, i) => {
isdisplay.value = true
if (i != null) {
let targetData = {
id: data["commentid"],
content,
@@ -842,6 +869,11 @@ const handleItem = uni => {
nextTick(() => getDetails())
replaceState(uni)
window.scrollTo({
top: 0,
behavior: "smooth",
})
}
// 修改 url
@@ -947,7 +979,7 @@ const handleListScroll = e => {
<style lang="less" scoped>
.content {
width: 1200px;
margin: 0 auto 100px;
margin: 0 auto 60px;
background: #fff;
border-radius: 15px;
@@ -1008,6 +1040,10 @@ const handleListScroll = e => {
}
.mj-list {
&::-webkit-scrollbar {
width: 6px !important;
}
margin-right: 9px;
padding: 0 25px 15px 30px;
flex: 1;
overflow: auto;
@@ -1103,7 +1139,7 @@ const handleListScroll = e => {
}
.right {
height: calc(100vh - 80px);
// height: calc(100vh - 80px);
overflow: auto;
padding: 5px 0;
@@ -1118,7 +1154,7 @@ const handleListScroll = e => {
.header {
padding: 30px 45px 25px;
border-bottom: 1px solid #ebebeb;
.title {
.titletitle {
font-size: 24px;
font-weight: 650;
color: #000000;

View File

@@ -1,6 +1,7 @@
<template>
<Head>
<Title>寄托面经</Title>
<Title>寄托天下 - 面经分享 </Title>
<Meta name="keyword" content="留学资讯,留学交流论坛,留学面经,面试经验,寄托天下" />
</Head>
<TopHead></TopHead>
<div class="search-result flexacenter" v-if="keyword">
@@ -23,7 +24,12 @@
import { ElMessage } from "element-plus"
let isNeedLogin = inject("isNeedLogin")
const goLogin = inject("goLogin")
useHead({ script: [{ src: "https://app.gter.net/bottom?tpl=header&menukey=mj" }] })
useHead({
script: [
{ src: "https://app.gter.net/bottom?tpl=header&menukey=mj" },
{ src: "https://app.gter.net/bottom?tpl=footer", body: true }
],
})
const gridContainer = ref(null)
let masonryInstance = null
@@ -135,7 +141,7 @@ const router = useRouter()
// 清除搜索
// const clearKeyword = () => router.push(`/index.html`)
const clearKeyword = () => goToURL(`/index.html`)
const clearKeyword = () => goToURL(`/index.html`, false)
try {
if (process.server) {

View File

@@ -1,4 +1,8 @@
<template>
<Head>
<Title>寄托天下 - 面经发布</Title>
<Meta name="keyword" content="留学资讯,留学交流论坛,留学面经,面试经验,寄托天下" />
</Head>
<div class="content">
<div class="flexacenter save-box save-left" @click="submit(0)">
<img class="save-icon" src="@/assets/img/arrow-gray.png" />
@@ -13,7 +17,7 @@
<div class="box-left">
<div class="area-box">
<div class="item">
<div class="title flexacenter">
<div class="titletitle flexacenter">
申请信息
<div class="asterisk">*</div>
</div>
@@ -46,7 +50,7 @@
</div>
<div class="item">
<div class="title flexacenter">
<div class="titletitle flexacenter">
面试时间
<div class="asterisk">*</div>
</div>
@@ -60,7 +64,7 @@
</div>
<div class="item">
<div class="title flexacenter">
<div class="titletitle flexacenter">
面经帖标题
<div class="asterisk">*</div>
</div>
@@ -77,7 +81,7 @@
<div class="box-right">
<div class="area-box">
<div class="item">
<div class="title flexacenter">
<div class="titletitle flexacenter">
面试构成及过程
<div class="asterisk">*</div>
</div>
@@ -118,6 +122,8 @@ onMounted(() => {
getInit()
})
//
let typetype = ref("")
// const
let token = ""
const getInit = () => {
@@ -171,7 +177,7 @@ const querySchoolSearch = (queryString, cb) => {
let isRepetition = false
data.forEach(element => {
element["value"] = element["name"]
element["value"] = element["checkname"]
if (element["name"] == queryString) isRepetition = true
})
if (!isRepetition) {
@@ -240,10 +246,9 @@ const submit = (status = 1) => {
// 放弃保存 跳跃上一页或者首页
const abandonSaving = () => {
if (router.currentRoute.value.meta.previousPage) router.go(-1)
else goToURL("./index.html") // 跳转到首页
else goToURL("./index.html", false) // 跳转到首页
// else router.push("./index.html") // 跳转到首页
}
</script>
<style scoped lang="less">
@@ -269,7 +274,7 @@ const abandonSaving = () => {
}
.box {
.title {
.titletitle {
color: #666666;
font-size: 14px;
margin-bottom: 10px;