diff --git a/src/pages/realtimeInfo/pc/rank.vue b/src/pages/realtimeInfo/pc/rank.vue index 8d53367..d4f7274 100644 --- a/src/pages/realtimeInfo/pc/rank.vue +++ b/src/pages/realtimeInfo/pc/rank.vue @@ -16,11 +16,16 @@ -->
- +
搜索
- @@ -43,9 +48,9 @@ {{ item.source }} {{ - dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }} - {{ - formatTime(item.time) }} + dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") + }} + {{ formatTime(item.time) }} {{ item.news_score }} @@ -54,14 +59,27 @@ -
- +
+
- + @@ -93,15 +111,19 @@ const newsList = ref([]); function formatTime(timestamp) { const date = new Date(Number(timestamp).toString().length === 10 ? timestamp * 1000 : timestamp); - return [ - date.getFullYear(), - (date.getMonth() + 1).toString().padStart(2, '0'), - date.getDate().toString().padStart(2, '0') - ].join('-') + ' ' + [ - date.getHours().toString().padStart(2, '0'), - date.getMinutes().toString().padStart(2, '0'), - date.getSeconds().toString().padStart(2, '0') - ].join(':'); + return ( + [ + date.getFullYear(), + (date.getMonth() + 1).toString().padStart(2, "0"), + date.getDate().toString().padStart(2, "0"), + ].join("-") + + " " + + [ + date.getHours().toString().padStart(2, "0"), + date.getMinutes().toString().padStart(2, "0"), + date.getSeconds().toString().padStart(2, "0"), + ].join(":") + ); } async function getNewsList() { @@ -143,6 +165,10 @@ function currentChange(page) { onMounted(async (e) => { console.log("🚀 ~ route.query:", route.query); + console.log(`🚀 ~ Session.get("token"):`, Session.get("token")); + if (Session.get("token") == "undefined") { + Session.remove("token"); + } if (route.query?.token && (!Session.get("token") || Session.get("token") == "undefined")) { uni.showLoading({ title: "加载中", @@ -172,12 +198,11 @@ onMounted(async (e) => { } }); } else { - if (!Session.get("token")) { + if (!Session.get("token") || Session.get("token") == "undefined") { LoginShow.value = true; } } - // 解构路由参数,排除token const { token, ...otherQuery } = route.query; // 若存在token,替换路由清除参数 @@ -269,7 +294,9 @@ const handlePopupErrorCallback = () => { justify-content: center; align-items: center; - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: 500; font-size: 18px; color: #ffffff; @@ -292,7 +319,9 @@ const handlePopupErrorCallback = () => { } .nol_num { - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: 500; font-size: 20px; color: #93a2b3; @@ -313,7 +342,9 @@ const handlePopupErrorCallback = () => { } .item_title { - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: bold; font-size: 20px; color: #1a1a1a; @@ -321,7 +352,9 @@ const handlePopupErrorCallback = () => { } .item_summary { - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: normal; font-size: 16px; color: #333333; @@ -353,7 +386,9 @@ const handlePopupErrorCallback = () => { margin-bottom: 10rpx; .time { - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: 400; font-size: 14px; color: #919191; @@ -363,7 +398,9 @@ const handlePopupErrorCallback = () => { } .score { - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: 600; font-size: 18px; color: #ffa800; @@ -386,8 +423,6 @@ const handlePopupErrorCallback = () => { border-radius: 8px; background: #0062d9; margin-right: 5px; - - } .input { @@ -409,7 +444,9 @@ const handlePopupErrorCallback = () => { background: #007aff; color: white; - font-family: PingFangSC, PingFang SC; + font-family: + PingFangSC, + PingFang SC; font-weight: 400; font-size: 18px; color: #ffffff; @@ -432,7 +469,7 @@ const handlePopupErrorCallback = () => { :deep(.el-input__inner::placeholder) { color: #ccced3; - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-size: 16px; font-style: normal; font-weight: 400;