2023-12-18 03:12:07 +00:00
|
|
|
|
<!-- / || /index.html 首页 | 列表 | 搜索
|
|
|
|
|
/publish 发布
|
|
|
|
|
/details/{id} 详情 -->
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-01-02 11:03:39 +00:00
|
|
|
|
<div id="append_parent"></div>
|
|
|
|
|
<div id="ajaxwaitid"></div>
|
2024-01-03 03:42:49 +00:00
|
|
|
|
<!-- <script src="https://app.gter.net/bottom?tpl=header&menukey=mj"></script> -->
|
2024-01-02 11:03:39 +00:00
|
|
|
|
<!-- <RouterView :key="$route.fullPath"></RouterView> -->
|
|
|
|
|
<RouterView></RouterView>
|
2023-12-18 03:12:07 +00:00
|
|
|
|
</template>
|
2024-01-02 11:03:39 +00:00
|
|
|
|
<script setup>
|
|
|
|
|
const route = useRoute()
|
2024-01-03 10:31:15 +00:00
|
|
|
|
// 是否是 生产环境
|
2024-01-09 10:49:37 +00:00
|
|
|
|
const isProduction = process.env.NODE_ENV === "production"
|
|
|
|
|
|
2024-01-04 06:11:30 +00:00
|
|
|
|
// watchEffect(() => {
|
|
|
|
|
// if (typeof window !== "undefined" && route.path) {
|
|
|
|
|
// if (window._hmt) window._hmt.push(["_trackPageview", route.fullPath])
|
|
|
|
|
// if (window._czc) {
|
|
|
|
|
// let location = window.location
|
|
|
|
|
// let contentUrl = location.pathname + location.hash
|
|
|
|
|
// let refererUrl = "/"
|
|
|
|
|
// window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
|
|
|
|
// window._czc.push(["_setAutoPageview", false])
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// })
|
2024-01-02 11:03:39 +00:00
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2024-01-11 09:23:17 +00:00
|
|
|
|
// if (!isProduction) isNeedLogin.value = false
|
|
|
|
|
// else determineIsLogin()
|
2024-01-11 10:49:38 +00:00
|
|
|
|
|
|
|
|
|
determineIsLogin()
|
|
|
|
|
|
2024-01-09 10:49:37 +00:00
|
|
|
|
// if (true) determineIsLogin()
|
|
|
|
|
// else isNeedLogin.value = false
|
2024-01-11 10:49:38 +00:00
|
|
|
|
// window["userInfoWin"] = {
|
|
|
|
|
// "username": "",
|
|
|
|
|
// "uid": 256624,
|
|
|
|
|
// "uin": 4171117,
|
|
|
|
|
// "avatar": "https://oss.gter.net/avatar/97KwEWQHYuMQGDnFqkimXF9SHKuGwVV5zW-tYWFjYQ~~?istype=1&random=K94nvjW4W5Gz",
|
|
|
|
|
// "messagenum": 0,
|
|
|
|
|
// "newprompt": 1,
|
|
|
|
|
// "todaysigned": 0,
|
|
|
|
|
// }
|
2024-01-02 11:03:39 +00:00
|
|
|
|
})
|
|
|
|
|
|
2024-01-03 03:47:49 +00:00
|
|
|
|
let isNeedLogin = ref(true) // 是否需要登录状态
|
2024-01-02 11:03:39 +00:00
|
|
|
|
|
|
|
|
|
// 判断是否登录状态
|
|
|
|
|
const determineIsLogin = () => {
|
|
|
|
|
let count = 0
|
|
|
|
|
let timer = setInterval(() => {
|
|
|
|
|
if (Object.keys(window["userInfoWin"]).length !== 0) {
|
|
|
|
|
clearInterval(timer)
|
2024-01-11 10:53:07 +00:00
|
|
|
|
if (window["userInfoWin"]["uid"]) isNeedLogin.value = false
|
2024-01-02 11:03:39 +00:00
|
|
|
|
}
|
|
|
|
|
count++
|
2024-01-11 10:45:27 +00:00
|
|
|
|
if (count >= 30) clearInterval(timer)
|
2024-01-02 11:03:39 +00:00
|
|
|
|
}, 100)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 跳转登录
|
|
|
|
|
const goLogin = () => {
|
|
|
|
|
if (typeof window === "undefined") return
|
|
|
|
|
if (Object.keys(window["userInfoWin"]).length !== 0) {
|
2024-01-11 10:53:07 +00:00
|
|
|
|
if (window["userInfoWin"]["uid"]) isNeedLogin.value = false
|
|
|
|
|
else ajax_login()
|
2024-01-02 11:03:39 +00:00
|
|
|
|
} else ajax_login()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
provide("isNeedLogin", isNeedLogin)
|
|
|
|
|
provide("goLogin", goLogin)
|
|
|
|
|
</script>
|
2023-12-18 03:12:07 +00:00
|
|
|
|
|
2023-12-29 10:37:38 +00:00
|
|
|
|
<style lang="less">
|
2023-12-18 03:12:07 +00:00
|
|
|
|
* {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flexflex {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flex1 {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flexcenter {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flexacenter {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flexjcenter {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* // 一行显示 */
|
|
|
|
|
.ellipsis {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
background-color: rgba(238, 242, 245, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
|
text-decoration: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Webkit浏览器(Chrome、Safari等) */
|
|
|
|
|
*::-webkit-scrollbar {
|
|
|
|
|
width: 8px;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*::-webkit-scrollbar-thumb {
|
|
|
|
|
background-color: #d7d7d7;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*::-webkit-scrollbar-thumb:hover {
|
|
|
|
|
background-color: #666;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Firefox浏览器 */
|
|
|
|
|
/* 注意:Firefox浏览器不支持修改滚动条的宽度 */
|
|
|
|
|
/* 若要修改滚动条的宽度,可以使用一些特殊的插件或者自定义滚动条的替代方案 */
|
|
|
|
|
/* 以下代码只是修改滚动条的颜色和背景色 */
|
|
|
|
|
* {
|
|
|
|
|
scrollbar-width: thin;
|
|
|
|
|
scrollbar-color: #d7d7d7 transparent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*::-moz-scrollbar-thumb {
|
|
|
|
|
background-color: #d7d7d7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*::-moz-scrollbar-thumb:hover {
|
|
|
|
|
background-color: #666;
|
|
|
|
|
}
|
2023-12-29 10:37:38 +00:00
|
|
|
|
|
|
|
|
|
header.page-header .box .tab-list .item.pitch {
|
|
|
|
|
color: #72db86 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header.page-header .box .tab-list .item.pitch:after {
|
|
|
|
|
background-color: #72db86 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.avatar-box {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 101px;
|
|
|
|
|
background-color: rgba(244, 248, 255, 1);
|
|
|
|
|
border: 1px solid rgba(220, 224, 234, 1);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
|
|
|
|
.avatar-mask {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
cursor: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.avatar-item {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #333;
|
|
|
|
|
height: 50px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
&:not(:last-of-type) {
|
|
|
|
|
border-bottom: 1px dotted #d7d7d7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.avatar-icon {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-popover.el-popper.avatar-box-popper {
|
|
|
|
|
min-width: 140px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
2023-12-18 03:12:07 +00:00
|
|
|
|
</style>
|