diff --git a/component/bi/bi.js b/component/bi/bi.js index 04788f5..bfa2b2e 100644 --- a/component/bi/bi.js +++ b/component/bi/bi.js @@ -1,6 +1,6 @@ // 1. 创建组件模板和样式(内置到 JS 中,无需外部 HTML/Template) const template = document.createElement("template"); -template.innerHTML = `
已获得
个寄托币
投币
你当前共有
寄托币 [挣币攻略]
作者设置了阅读限制,解锁所有内容仅需 寄托币
投币解锁
你共有 寄托币
你的寄托币不够,快去发帖挣币吧
攒币指南
`; +template.innerHTML = `
已获得
个寄托币
投币
你当前共有
寄托币 [挣币攻略]
作者设置了阅读限制,解锁所有内容仅需 寄托币
投币解锁
你共有 寄托币
你的寄托币不够,快去发帖挣币吧
攒币指南
`; // 2. 定义组件类 class BiCard extends HTMLElement { diff --git a/component/bi/bi.txt b/component/bi/bi.txt index 5bc46a0..5e591cf 100644 --- a/component/bi/bi.txt +++ b/component/bi/bi.txt @@ -50,7 +50,7 @@ width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); - z-index: 99; + z-index: 10004; display: none; } diff --git a/component/head-top/head-top.js b/component/head-top/head-top.js index 69acd0f..fdb4545 100644 --- a/component/head-top/head-top.js +++ b/component/head-top/head-top.js @@ -174,5 +174,5 @@ export const headTop = defineComponent({ return { hotSearchWords, historySearchList, searchEvent, searchInputState, searchHistoryShowState, searchInputFocus, searchInputBlur, page, pitchState, state, signIn, input, currentIndex, pauseCarousel, resumeCarousel }; }, - template: `
大家都在搜:{{ item.keyword }}
大家都在搜:{{ item.keyword }}
历史搜索
{{ item }}
`, + template: `
大家都在搜:{{ item.keyword }}
大家都在搜:{{ item.keyword }}
历史搜索
{{ item }}
`, }); diff --git a/component/head-top/head-top.txt b/component/head-top/head-top.txt index 8d4b8ed..7a167ab 100644 --- a/component/head-top/head-top.txt +++ b/component/head-top/head-top.txt @@ -8,7 +8,7 @@
大家都在搜:{{ item.keyword }}
大家都在搜:{{ item.keyword }}
- +
历史搜索
diff --git a/component/item-head/item-head.js b/component/item-head/item-head.js index fb5cc69..b6d52c5 100644 --- a/component/item-head/item-head.js +++ b/component/item-head/item-head.js @@ -119,9 +119,10 @@ export const itemHead = defineComponent({ redirectToExternalWebsite(`/publish?uniqid=${target.uniqid}`); }; - const goPersonalHomepage = (uin, uid) => { - if (!uin && !uid) return; - redirectToExternalWebsite(`/space?uin=${uin}&uid=${uid}`); + const goPersonalHomepage = (token) => { + console.log("token", token); + if (!token) return; + redirectToExternalWebsite(`/u/${token}`); }; const openedit = (type) => { @@ -162,5 +163,5 @@ export const itemHead = defineComponent({ report, }, - template: `
{{ item?.user?.nickname || item.nickname || "匿名用户" }}
{{ timestamp }}
公开 匿名
{{ item.views }}
举报
删除
`, + template: `
{{ item?.user?.nickname || item.nickname || "匿名用户" }}
{{ timestamp }}
公开 匿名
{{ item.views }}
举报
删除
`, }); diff --git a/component/item-head/item-head.txt b/component/item-head/item-head.txt index ac98591..24534ad 100644 --- a/component/item-head/item-head.txt +++ b/component/item-head/item-head.txt @@ -1,5 +1,5 @@
-
+
{{ item?.user?.nickname || item.nickname || "匿名用户" }}
diff --git a/component/latest-list/latest-list.js b/component/latest-list/latest-list.js index bd4f52c..6c23f53 100644 --- a/component/latest-list/latest-list.js +++ b/component/latest-list/latest-list.js @@ -53,15 +53,14 @@ export const latestList = defineComponent({ let topList = ref([]); const topicHandpicked = () => { - ajaxGet(`/v2/api/forum/topicLists?simple=1&best=1&limit=15`).then((res) => { + ajaxGet(`/v2/api/forum/getHomebestRecommend?limit=15&type=thread`).then((res) => { const data = res.data; - topList.value = data.data; + console.log('data', data); + topList.value = data; nextTick(() => { count += 1; examineCount(); - if (props.boxtype == "essence") { - tabPostsItem("essence"); - } + if (props.boxtype == "essence") tabPostsItem("essence"); }); }); }; @@ -78,30 +77,6 @@ export const latestList = defineComponent({ boxbox.classList.add(`box-${key}`); boxbox.classList.remove(`box-${postsTab.value}`); - // let index = tabPostsArr.indexOf(key); - - // 修改 tab 状态的 - // if (postsTab.value) { - // let oldNode = boxbox.querySelector(`.slideshow-box .tab-item.${postsTab.value}`); - // oldNode.classList.toggle("pitch"); - // boxbox.classList.remove(`box-${postsTab.value}`); - // } - - // let targetTabNode = boxbox.querySelector(`.slideshow-box .tab-item.${key}`); - // targetTabNode.classList.toggle("pitch"); - - // // 修改全局背景状态的 - // let targetContentNode = boxbox.querySelector(`.slideshow-content .${key}-side-box`); - // let targetContentHeight = targetContentNode.offsetHeight; - - // boxbox.style.height = targetContentHeight + 66 + "px"; - - // let slideshowContent = boxbox.querySelector(".slideshow-content"); - // slideshowContent.scrollTo({ - // left: 290 * index, - // behavior: "smooth", - // }); - postsTab.value = key; }; diff --git a/css/public.css b/css/public.css index e784c94..bcf56a7 100644 --- a/css/public.css +++ b/css/public.css @@ -1756,6 +1756,7 @@ td { .list-load-box.show { height: 100px; border-width: 1px; + margin-bottom: 30px; } .list-load-box.show .list-load-icon { width: 30px; diff --git a/css/public.less b/css/public.less index e5975fd..3dad491 100644 --- a/css/public.less +++ b/css/public.less @@ -2079,6 +2079,7 @@ td { &.show { height: 100px; border-width: 1px; + margin-bottom: 30px; .list-load-icon { width: 30px;