推荐阅读

This commit is contained in:
A1300399510
2023-12-20 12:00:24 +08:00
parent 30bd877e5b
commit 033c26d9ec
19 changed files with 298 additions and 165 deletions

View File

@@ -1,5 +1,5 @@
{
"date": "2023-12-19T02:58:19.055Z",
"date": "2023-12-20T04:00:07.138Z",
"preset": "node-server",
"framework": {
"name": "nuxt",

View File

@@ -1 +1 @@
{"id":"aae71cd6-3a8b-47d9-a4a0-bf20a18b9d0d","timestamp":1702954688536}
{"id":"5519cfb7-3a67-4b2e-81a4-3fc0f57bf172","timestamp":1703044796213}

View File

@@ -0,0 +1 @@
{"id":"5519cfb7-3a67-4b2e-81a4-3fc0f57bf172","timestamp":1703044796213,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

View File

@@ -1 +0,0 @@
{"id":"aae71cd6-3a8b-47d9-a4a0-bf20a18b9d0d","timestamp":1702954688536,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
import{_ as i,t as a,v as r,x as n,y as e,z as s,D as l,E as d}from"./entry.1dcf35e7.js";const c=t=>(l("data-v-df79c84d"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},f=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(u,b)=>(r(),n("div",p,[f,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(x,[["__scopeId","data-v-df79c84d"]]);export{w as default};
import{_ as i,t as a,v as r,x as n,y as e,z as s,D as l,E as d}from"./entry.0819827f.js";const c=t=>(l("data-v-df79c84d"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},f=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(u,b)=>(r(),n("div",p,[f,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(x,[["__scopeId","data-v-df79c84d"]]);export{w as default};

View File

@@ -159,7 +159,7 @@ const client_manifest = {
"prefetch": true,
"preload": true,
"css": [],
"file": "error-404.2a39260c.js",
"file": "error-404.d814563b.js",
"imports": [
"node_modules/nuxt/dist/app/entry.js"
],
@@ -185,7 +185,7 @@ const client_manifest = {
"prefetch": true,
"preload": true,
"css": [],
"file": "error-500.6c3f3d2a.js",
"file": "error-500.0d9fdced.js",
"imports": [
"node_modules/nuxt/dist/app/entry.js"
],
@@ -202,7 +202,7 @@ const client_manifest = {
"resourceType": "style",
"prefetch": true,
"preload": true,
"file": "entry.ed8eded5.css",
"file": "entry.331577b9.css",
"src": "node_modules/nuxt/dist/app/entry.css"
},
"node_modules/nuxt/dist/app/entry.js": {
@@ -234,19 +234,19 @@ const client_manifest = {
"triangle-icon.c39ff2e7.svg"
],
"css": [
"entry.ed8eded5.css"
"entry.331577b9.css"
],
"dynamicImports": [
"node_modules/@nuxt/ui-templates/dist/templates/error-404.vue",
"node_modules/@nuxt/ui-templates/dist/templates/error-500.vue"
],
"file": "entry.1dcf35e7.js",
"file": "entry.0819827f.js",
"isEntry": true,
"src": "node_modules/nuxt/dist/app/entry.js",
"_globalCSS": true
},
"entry.ed8eded5.css": {
"file": "entry.ed8eded5.css",
"entry.331577b9.css": {
"file": "entry.331577b9.css",
"resourceType": "style",
"prefetch": true,
"preload": true

View File

@@ -1,4 +1,4 @@
import { version, ref, watchEffect, watch, getCurrentInstance, defineComponent, hasInjectionContext, unref, inject, useSSRContext, createApp, effectScope, reactive, onUnmounted, toRef, isRef, nextTick, defineAsyncComponent, provide, onErrorCaptured, onServerPrefetch, createVNode, resolveDynamicComponent, h, isReadonly, isShallow, isReactive, toRaw, withCtx, createTextVNode, toDisplayString, mergeProps } from 'vue';
import { version, ref, watchEffect, watch, getCurrentInstance, defineComponent, hasInjectionContext, unref, inject, useSSRContext, createApp, effectScope, reactive, onUnmounted, nextTick, toRef, isRef, defineAsyncComponent, provide, onErrorCaptured, onServerPrefetch, createVNode, resolveDynamicComponent, h, isReadonly, isShallow, isReactive, toRaw, withCtx, createTextVNode, toDisplayString, mergeProps } from 'vue';
import { d as useRuntimeConfig$1, $ as $fetch, w as withQuery, l as hasProtocol, p as parseURL, m as isScriptProtocol, j as joinURL, h as createError$1, n as sanitizeStatusCode, o as createHooks, q as isEqual, r as stringifyParsedURL, t as stringifyQuery, v as parseQuery } from '../nitro/node-server.mjs';
import { getActiveHead } from 'unhead';
import { defineHeadPlugin, composableNames } from '@unhead/shared';
@@ -1223,6 +1223,7 @@ const _sfc_main$2 = {
let keyword = ref("");
let keywordText = ref("");
let list = ref([]);
let backupsList = [];
let page = 1;
let total = ref(0);
let loading = ref(false);
@@ -1244,6 +1245,7 @@ const _sfc_main$2 = {
return;
let data = res.data;
list.value = list.value.concat(data.data || []);
backupsList = backupsList.concat(data.data || []);
total.value = data.count || 0;
keywordText.value = keyword.value || "";
if (list.value.length >= data["count"])
@@ -1262,6 +1264,8 @@ const _sfc_main$2 = {
isSearchMode.value = true;
else
isSearchMode.value = false;
if (type.value == "details")
handleInsertRelatedlist();
}).finally(() => loading.value = false);
};
let typeList = ref([]);
@@ -1313,6 +1317,7 @@ const _sfc_main$2 = {
anonymous: 0
};
nextTick(() => detailsAreaScrollTop());
handleInsertRelatedlist(uniqid);
}).finally(() => detailLoading.value = false);
};
const detailsAreaScrollTop = () => {
@@ -1339,14 +1344,17 @@ const _sfc_main$2 = {
let content = "";
if (info["content"].indexOf("<img") == -1)
content = info["content"];
list.value.unshift({
const obj = {
answers: info["answers"],
content,
publicationdate: info["publicationdate"],
title: info["title"],
typename: info["typename"],
uniqid
});
};
list.value.unshift(obj);
if (!myModelState.value)
backupsList.unshift(obj);
cut(0);
}
};
@@ -1383,9 +1391,7 @@ const _sfc_main$2 = {
goLogin();
return;
}
$ajax("/api/operate/like", {
token
}).then((res) => {
$ajax("/api/operate/like", { token }).then((res) => {
if (res.code != 200)
return;
let data = res.data;
@@ -1971,7 +1977,7 @@ const _sfc_main$2 = {
let listHeight = ref(0);
let itemHeightLeft = 0;
let itemHeightRight = 0;
const itemStyle = (index, content) => {
const itemStyle = (index, content, typetype) => {
if (index == 0) {
itemHeightLeft = 0;
itemHeightRight = 0;
@@ -1990,8 +1996,13 @@ const _sfc_main$2 = {
}
} else {
obj["top"] = itemHeightLeft + "px";
itemHeightLeft += content == "" ? 107 : 136;
obj["height"] = content == "" ? "107px" : "136px";
if (!typetype) {
itemHeightLeft += content == "" ? 107 : 136;
obj["height"] = content == "" ? "107px" : "136px";
} else {
itemHeightLeft += typetype == "vote" ? 170 : 136;
obj["height"] = typetype == "vote" ? "170px" : "136px";
}
obj["left"] = 0;
obj["width"] = "100%";
obj["paddingLeft"] = "calc((100vw - 1200px) / 2)";
@@ -2088,10 +2099,11 @@ const _sfc_main$2 = {
openBottom();
pitchIndex.value = null;
seo.value = {};
list.value = JSON.parse(JSON.stringify(backupsList));
};
const handleListScroll = (e) => {
const el = e.target;
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 40)
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 40 || myModelState.value)
return;
getList();
};
@@ -2208,10 +2220,14 @@ const _sfc_main$2 = {
total: total.value,
keywordText: keywordText.value,
isSearchMode: isSearchMode.value,
inTheEndState: inTheEndState.value,
type: type.value,
pitchIndex: pitchIndex.value,
listlist: JSON.parse(JSON.stringify(list.value))
};
isSearchMode.value = false;
inTheEndState.value = false;
keyword.value = "";
list.value = JSON.parse(JSON.stringify(myModelList.value));
myModelState.value = true;
pitchIndex.value = null;
@@ -2221,15 +2237,20 @@ const _sfc_main$2 = {
};
const closeMyModel = () => {
myModelList.value = JSON.parse(JSON.stringify(list.value));
console.log(temporaryData.listlist, "listlist");
isSearchMode.value = temporaryData["isSearchMode"];
keywordText.value = temporaryData["keywordText"];
keyword.value = temporaryData["keywordText"];
total.value = temporaryData["total"];
type.value = temporaryData["type"];
pitchIndex.value = temporaryData["pitchIndex"];
inTheEndState.value = temporaryData["inTheEndState"];
list.value = JSON.parse(JSON.stringify(temporaryData.listlist));
myModelState.value = false;
let uniqid = list.value[pitchIndex.value]["uniqid"];
getDetails(uniqid);
if (pitchIndex.value) {
let uniqid = list.value[pitchIndex.value]["uniqid"];
getDetails(uniqid);
}
};
const handleDetailsScroll = (e) => {
const el = e.target;
@@ -2259,6 +2280,7 @@ const _sfc_main$2 = {
openBottom();
pitchIndex.value = null;
getList();
listHeight.value = 0;
};
const handleMenuState = (index, ind, i) => {
if (isNeedLogin.value) {
@@ -2337,6 +2359,7 @@ const _sfc_main$2 = {
return;
let data = res.data;
list.value = list.value.concat(data.data || []);
backupsList = backupsList.concat(data.data || []);
total.value = data.count || 0;
keywordText.value = keyword.value || "";
if (list.value.length != data["count"])
@@ -2444,7 +2467,65 @@ const _sfc_main$2 = {
else
setTimeout(() => openBottom(), 1e3);
};
let recommendList = [];
let recommendPage = 1;
const getRecommend = (uniqid) => {
$ajaxGET("/api/details/relatedlist", { page: recommendPage, limit: 20 }).then((res) => {
if (res.code != 200)
return;
let obj = {
offer: "Offer",
mj: "面经",
vote: "投票",
thread: "帖子"
};
let data = res.data;
data.forEach((element) => {
element["typename"] = obj[element["type"]];
element["isrecom"] = true;
});
recommendList = recommendList.concat(data);
recommendPage++;
handleInsertRelatedlist(uniqid);
});
};
const handleInsertRelatedlist = (uniqid) => {
console.log(myModelState.value, "myModelState");
if (myModelState.value)
return;
let insertCount = Math.ceil(backupsList.length / 5);
if (recommendList.length < insertCount) {
getRecommend(uniqid);
return;
}
let target = JSON.parse(JSON.stringify(backupsList));
let result = [];
let j = 0;
for (let i = 0; i < target.length; i++) {
result.push(target[i]);
if ((i + 1) % 4 === 0 && j < recommendList.length) {
result.push(recommendList[j]);
j++;
}
}
list.value = JSON.parse(JSON.stringify(result));
nextTick(() => {
if (uniqid) {
result.forEach((element, index) => {
if (element["uniqid"] == uniqid) {
pitchIndex.value = index;
}
});
}
});
};
const replaceNumberObj = {
0: "①",
1: "②",
2: "③"
};
return {
replaceNumberObj,
closeMyModel,
myModelList,
myModelState,
@@ -2657,38 +2738,76 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
}
_push(`</div><div class="list" id="list" style="${ssrRenderStyle([$setup.listStyle(), { height: $setup.listHeight + "px" }])}"><!--[-->`);
ssrRenderList($setup.list, (item, index) => {
_push(`<a style="${ssrRenderStyle($setup.itemStyle(index, item["content"]))}" class="${ssrRenderClass([{ pitch: index === $setup.pitchIndex, upLevel: index === $setup.pitchIndex - 1 }, "item grid-item flexflex"])}"${ssrRenderAttr("href", $setup.setItemUrl(item["uniqid"]))}><img class="dot"${ssrRenderAttr("src", _imports_5)}><div class="content" style="${ssrRenderStyle({ width: $setup.type == "list" ? "531px" : "430px" })}"><div class="issue-title flexcenter">`);
if (item["ishot"] == 1) {
_push(`<img class="hot-icon"${ssrRenderAttr("src", _imports_6)}>`);
_push(`<!--[-->`);
if (item["isrecom"]) {
_push(`<a style="${ssrRenderStyle($setup.itemStyle(index, item["content"], item["type"]))}" class="${ssrRenderClass([{ pitch: index === $setup.pitchIndex, upLevel: index === $setup.pitchIndex - 1 }, "item grid-item flexflex"])}" target="_blank"${ssrRenderAttr("href", item["url"])}><img class="dot"${ssrRenderAttr("src", _imports_5)}><div class="content" style="${ssrRenderStyle({ width: $setup.type == "list" ? "531px" : "430px" })}"><div class="issue-title flexcenter"><div class="recommend flexcenter">推荐阅读</div><div class="issue ellipsis flex1">${item["title"]}</div></div>`);
if (item["type"] == "thread") {
_push(`<!--[-->`);
if (item["message"]) {
_push(`<div class="answer ellipsis">${item["message"]}</div>`);
} else {
_push(`<!---->`);
}
_push(`<!--]-->`);
} else if (item["type"] == "vote") {
_push(`<div class="answer" style="${ssrRenderStyle({ "height": "auto" })}"><!--[-->`);
ssrRenderList(item["option"].slice(0, 2), (ite, i) => {
_push(`<div>${ssrInterpolate($setup.replaceNumberObj[i] + ite)}</div>`);
});
_push(`<!--]--><div>${ssrInterpolate($setup.replaceNumberObj[2])} …</div></div>`);
} else {
_push(`<div class="answer ellipsis flexacenter">`);
if (item["profession"] || item["professional"]) {
_push(`<div class="value-value">${ssrInterpolate(item["profession"] || item["professional"])}</div>`);
} else {
_push(`<!---->`);
}
if (item["project"] || item["degree"]) {
_push(`<div class="value-value">${ssrInterpolate(item["project"] || item["degree"])}</div>`);
} else {
_push(`<!---->`);
}
if (item["interviewtime"] || item["semester"]) {
_push(`<div class="value-value">${ssrInterpolate(item["interviewtime"] || item["semester"])}</div>`);
} else {
_push(`<!---->`);
}
if (item["apply_results"]) {
_push(`<div class="value-value">${ssrInterpolate(item["apply_results"])}</div>`);
} else {
_push(`<!---->`);
}
_push(`</div>`);
}
_push(`<div class="bottom flexacenter"><div class="typename flexcenter">${ssrInterpolate(item["typename"])}</div></div></div></a>`);
} else {
_push(`<!---->`);
}
{
_push(`<!---->`);
}
_push(`<div class="issue ellipsis flex1">${item["title"]}</div></div>`);
{
_push(`<!--[-->`);
_push(`<a style="${ssrRenderStyle($setup.itemStyle(index, item["content"]))}" class="${ssrRenderClass([[{ pitch: index === $setup.pitchIndex, upLevel: index === $setup.pitchIndex - 1 }, `item${index}`], "item grid-item flexflex"])}"${ssrRenderAttr("href", $setup.setItemUrl(item["uniqid"]))}><img class="dot"${ssrRenderAttr("src", _imports_5)}><div class="content" style="${ssrRenderStyle({ width: $setup.type == "list" ? "531px" : "430px" })}"><div class="issue-title flexcenter">`);
if (item["ishot"] == 1) {
_push(`<img class="hot-icon"${ssrRenderAttr("src", _imports_6)}>`);
} else {
_push(`<!---->`);
}
_push(`<div class="issue ellipsis flex1">${item["title"]}</div></div>`);
if (item["content"]) {
_push(`<div class="answer ellipsis">${item["content"]}</div>`);
} else {
_push(`<!---->`);
}
_push(`<!--]-->`);
_push(`<div class="bottom flexacenter">`);
if (item["typename"]) {
_push(`<div class="typename flexcenter">${ssrInterpolate(item["typename"])}</div>`);
} else {
_push(`<div></div>`);
}
_push(`<div class="flexacenter"><div class="quantity">${ssrInterpolate(item["answers"] == 0 ? "暂无回答" : "共" + item["answers"] + "个回答")}</div>`);
if ($setup.type == "list") {
_push(`<!--[--><div class="longString"></div><div class="answer-btn">我来回答</div><!--]-->`);
} else {
_push(`<!---->`);
}
_push(`</div></div></div></a>`);
}
_push(`<div class="bottom flexacenter">`);
if (item["typename"]) {
_push(`<div class="typename flexcenter">${ssrInterpolate(item["typename"])}</div>`);
} else {
_push(`<div></div>`);
}
_push(`<div class="flexacenter"><div class="quantity">${ssrInterpolate(item["answers"] == 0 ? "暂无回答" : "共" + item["answers"] + "个回答")}</div>`);
if ($setup.type == "list") {
_push(`<!--[--><div class="longString"></div><div class="answer-btn">我来回答</div><!--]-->`);
} else {
_push(`<!---->`);
}
_push(`</div></div></div></a>`);
_push(`<!--]-->`);
});
_push(`<!--]--></div>`);
if ($setup.inTheEndState) {

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"entry-styles.a457ca3a.mjs","sources":["../../../../../.nuxt/dist/server/static/entry-styles-1.mjs-6ea54b9b.js","../../../../../.nuxt/dist/server/static/entry-styles.a457ca3a.mjs"],"sourcesContent":null,"names":["__buildAssetsURL","style_0"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAA,mCAAA,GAAA,+mMAAA,GAAAA,cAAA,CAAA,4BAAA,CAAA,GAAA,8qsCAAA;;ACCA,6BAAe,CAACC,mCAAO;;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"entry-styles.e4c2d820.mjs","sources":["../../../../../.nuxt/dist/server/static/entry-styles-1.mjs-3d9a0929.js","../../../../../.nuxt/dist/server/static/entry-styles.e4c2d820.mjs"],"sourcesContent":null,"names":["__buildAssetsURL","style_0"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAA,mCAAA,GAAA,+mMAAA,GAAAA,cAAA,CAAA,4BAAA,CAAA,GAAA,y+sCAAA;;ACCA,6BAAe,CAACC,mCAAO;;;;"}

View File

@@ -1,8 +1,8 @@
const interopDefault = r => r.default || r || [];
const styles = {
"node_modules/nuxt/dist/app/entry.js": () => import('./static/entry-styles.a457ca3a.mjs').then(interopDefault),
"node_modules/@nuxt/ui-templates/dist/templates/error-404.vue": () => import('./static/error-404-styles.1e0dde27.mjs').then(interopDefault),
"node_modules/@nuxt/ui-templates/dist/templates/error-500.vue": () => import('./static/error-500-styles.cf4b3e80.mjs').then(interopDefault)
"node_modules/nuxt/dist/app/entry.js": () => import('./static/entry-styles.e4c2d820.mjs').then(interopDefault),
"node_modules/@nuxt/ui-templates/dist/templates/error-500.vue": () => import('./static/error-500-styles.cf4b3e80.mjs').then(interopDefault),
"node_modules/@nuxt/ui-templates/dist/templates/error-404.vue": () => import('./static/error-404-styles.1e0dde27.mjs').then(interopDefault)
};
export { styles as default };

View File

@@ -3059,7 +3059,7 @@ function klona(x) {
const inlineAppConfig = {
"nuxt": {
"buildId": "aae71cd6-3a8b-47d9-a4a0-bf20a18b9d0d"
"buildId": "5519cfb7-3a67-4b2e-81a4-3fc0f57bf172"
}
};
@@ -4949,205 +4949,205 @@ const assets = {
"/static/add-icon.0b0b5313.svg": {
"type": "image/svg+xml",
"etag": "\"d67-gajxuGcy6aHIeWAbO0RazX03p90\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.110Z",
"size": 3431,
"path": "../public/static/add-icon.0b0b5313.svg"
},
"/static/arrows-icon.271dd0d3.svg": {
"type": "image/svg+xml",
"etag": "\"5a0-yAit7q5lcKJMd35iOMMifZv2uno\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 1440,
"path": "../public/static/arrows-icon.271dd0d3.svg"
},
"/static/close-icon.86743366.svg": {
"type": "image/svg+xml",
"etag": "\"2d4-QYrulZl33jopLCT37UdJfnzXOVg\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 724,
"path": "../public/static/close-icon.86743366.svg"
},
"/static/collect-icon-colours.6d2ade7f.svg": {
"type": "image/svg+xml",
"etag": "\"7ab-av9D1DgxgD5cvY5wd30haD7c1q0\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 1963,
"path": "../public/static/collect-icon-colours.6d2ade7f.svg"
},
"/static/comment-icon-gray.2c8779f9.svg": {
"type": "image/svg+xml",
"etag": "\"816-HEGvNjvS0TeA/3uJweilvZfCqlk\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 2070,
"path": "../public/static/comment-icon-gray.2c8779f9.svg"
},
"/static/delete-icon.4d386dce.svg": {
"type": "image/svg+xml",
"etag": "\"17fe-RGKa0+MaUqOqlbPlXlig67fGkaY\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 6142,
"path": "../public/static/delete-icon.4d386dce.svg"
},
"/static/dot-gray.86cdd7b5.svg": {
"type": "image/svg+xml",
"etag": "\"2af-sBMsuPZbsh28jzlFWO9lVYMVDk8\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 687,
"path": "../public/static/dot-gray.86cdd7b5.svg"
},
"/static/dot-yellow.4b5e135b.svg": {
"type": "image/svg+xml",
"etag": "\"2af-6L7YsWhGTHBB6NqQztB/l2OFRfE\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 687,
"path": "../public/static/dot-yellow.4b5e135b.svg"
},
"/static/dot.1026a040.svg": {
"type": "image/svg+xml",
"etag": "\"217-dx6xqUT4D9pCoKc6nr20aXeJQXQ\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 535,
"path": "../public/static/dot.1026a040.svg"
},
"/static/edit-icon-white.29b27582.svg": {
"type": "image/svg+xml",
"etag": "\"8be-EnEF3CQI46JkMNAXbPf3H6T7pzU\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 2238,
"path": "../public/static/edit-icon-white.29b27582.svg"
},
"/static/empty-icon.24a01ae2.svg": {
"type": "image/svg+xml",
"etag": "\"d028-Our2UxxUiciRSduORd8JZCt5Prw\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 53288,
"path": "../public/static/empty-icon.24a01ae2.svg"
},
"/static/entry.1dcf35e7.js": {
"/static/entry.0819827f.js": {
"type": "application/javascript",
"etag": "\"3b6ef-AlXSr/PtpEiXbq83OqXtMissH5g\"",
"mtime": "2023-12-19T02:58:12.435Z",
"size": 243439,
"path": "../public/static/entry.1dcf35e7.js"
"etag": "\"3c140-CiV+5VQNFWKwABOR/gRUnLhm7Ak\"",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 246080,
"path": "../public/static/entry.0819827f.js"
},
"/static/entry.ed8eded5.css": {
"/static/entry.331577b9.css": {
"type": "text/css; charset=utf-8",
"etag": "\"affc-d0rY1PQKoyVsSBMxQXhALr0um0Q\"",
"mtime": "2023-12-19T02:58:12.435Z",
"size": 45052,
"path": "../public/static/entry.ed8eded5.css"
},
"/static/error-404.2a39260c.js": {
"type": "application/javascript",
"etag": "\"18de-gQOgrpe/Josjgwz7bAqmJbBv6MY\"",
"mtime": "2023-12-19T02:58:12.435Z",
"size": 6366,
"path": "../public/static/error-404.2a39260c.js"
"etag": "\"b137-CiBBmkrj29X3YskD6pYoIg3OTDk\"",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 45367,
"path": "../public/static/entry.331577b9.css"
},
"/static/error-404.7fc72018.css": {
"type": "text/css; charset=utf-8",
"etag": "\"e2e-iNt1cqPQ0WDudfCTZVQd31BeRGs\"",
"mtime": "2023-12-19T02:58:12.435Z",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 3630,
"path": "../public/static/error-404.7fc72018.css"
},
"/static/error-500.6c3f3d2a.js": {
"/static/error-404.d814563b.js": {
"type": "application/javascript",
"etag": "\"756-vSpOkZfgpRNx2XLyqfUUMHO3+DY\"",
"mtime": "2023-12-19T02:58:12.435Z",
"etag": "\"18de-7fK9Ic+52eoJCWmUHAqGsqpqMEQ\"",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 6366,
"path": "../public/static/error-404.d814563b.js"
},
"/static/error-500.0d9fdced.js": {
"type": "application/javascript",
"etag": "\"756-qjI85nNzFcLtS2JQDl+otjhFPeY\"",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 1878,
"path": "../public/static/error-500.6c3f3d2a.js"
"path": "../public/static/error-500.0d9fdced.js"
},
"/static/error-500.c5df6088.css": {
"type": "text/css; charset=utf-8",
"etag": "\"79e-ByRo+49BgcevWdRjJy3CMx2IA5k\"",
"mtime": "2023-12-19T02:58:12.435Z",
"mtime": "2023-12-20T04:00:00.115Z",
"size": 1950,
"path": "../public/static/error-500.c5df6088.css"
},
"/static/issue-bj.44adad8c.svg": {
"type": "image/svg+xml",
"etag": "\"926-lK6rrraYIC+9Yxyy0subzOK8XpE\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 2342,
"path": "../public/static/issue-bj.44adad8c.svg"
},
"/static/logo.6622f82d.png": {
"type": "image/png",
"etag": "\"843f-FSXGFGigIHmtzjdcQzuMz/a7E+o\"",
"mtime": "2023-12-19T02:58:12.431Z",
"mtime": "2023-12-20T04:00:00.112Z",
"size": 33855,
"path": "../public/static/logo.6622f82d.png"
},
"/static/menu-icon-gray.d61f02b1.svg": {
"type": "image/svg+xml",
"etag": "\"6de-kmXhltPHfF4W1gmV7wT4aZCZ6gg\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 1758,
"path": "../public/static/menu-icon-gray.d61f02b1.svg"
},
"/static/QRCode-icon.a105d5fc.svg": {
"type": "image/svg+xml",
"etag": "\"9c1-qGg9jZ5wmHJGzh2A00nHIGWHMh4\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 2497,
"path": "../public/static/QRCode-icon.a105d5fc.svg"
},
"/static/tick-no.179037b3.svg": {
"type": "image/svg+xml",
"etag": "\"1ea-YISAWqJD56jxoQT8N812fDJfkMw\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 490,
"path": "../public/static/tick-no.179037b3.svg"
},
"/static/tick-option.e092d22f.svg": {
"type": "image/svg+xml",
"etag": "\"29a-UVjuq3WHs6mhu1KGQ7gQmJH2Bc4\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 666,
"path": "../public/static/tick-option.e092d22f.svg"
},
"/static/tick-orange.233abc69.svg": {
"type": "image/svg+xml",
"etag": "\"60a-VrP9K+TQp6JbNcrU5k1Dor/Kq/E\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 1546,
"path": "../public/static/tick-orange.233abc69.svg"
},
"/static/title.98892974.png": {
"type": "image/png",
"etag": "\"1723-0OwkVass/2nFB99dRT4w0sPUvI0\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 5923,
"path": "../public/static/title.98892974.png"
},
"/static/triangle-icon.c39ff2e7.svg": {
"type": "image/svg+xml",
"etag": "\"446-ylQ81DOJ3joSbsS9atyrW6pZsBY\"",
"mtime": "2023-12-19T02:58:12.434Z",
"mtime": "2023-12-20T04:00:00.114Z",
"size": 1094,
"path": "../public/static/triangle-icon.c39ff2e7.svg"
},
"/static/view-icon.da7fef35.svg": {
"type": "image/svg+xml",
"etag": "\"f39-5Jwx14wB0jgB0Du25KRZbkEEXvI\"",
"mtime": "2023-12-19T02:58:12.433Z",
"mtime": "2023-12-20T04:00:00.113Z",
"size": 3897,
"path": "../public/static/view-icon.da7fef35.svg"
},
"/static/builds/latest.json": {
"type": "application/json",
"etag": "\"47-4h+PC3gazj3/Yx0BNITg7OAN9i0\"",
"mtime": "2023-12-19T02:58:13.716Z",
"etag": "\"47-ukNOLKYlZJkBhlMElsPvaX0a1iY\"",
"mtime": "2023-12-20T04:00:01.494Z",
"size": 71,
"path": "../public/static/builds/latest.json"
},
"/static/builds/meta/aae71cd6-3a8b-47d9-a4a0-bf20a18b9d0d.json": {
"/static/builds/meta/5519cfb7-3a67-4b2e-81a4-3fc0f57bf172.json": {
"type": "application/json",
"etag": "\"8b-fS3zQkRFY5JvwCtFci4yjtanPkM\"",
"mtime": "2023-12-19T02:58:13.716Z",
"etag": "\"8b-22J+SL+s8GPEOB3vZfx20Dpq4Bk\"",
"mtime": "2023-12-20T04:00:01.494Z",
"size": 139,
"path": "../public/static/builds/meta/aae71cd6-3a8b-47d9-a4a0-bf20a18b9d0d.json"
"path": "../public/static/builds/meta/5519cfb7-3a67-4b2e-81a4-3fc0f57bf172.json"
}
};

76
app.vue
View File

@@ -1129,6 +1129,7 @@ export default {
detailShare.value = data["share"] || {}
type.value = "details"
closeBottom()
if (index !== null && index !== undefined) cut(index)
@@ -1157,9 +1158,7 @@ export default {
// 默认 详情 div 滚动到顶部
nextTick(() => detailsAreaScrollTop())
handleInsertRelatedlist()
handleInsertRelatedlist(uniqid)
})
.finally(() => (detailLoading.value = false))
}
@@ -1191,14 +1190,18 @@ export default {
if (!valve) {
let content = ""
if (info["content"].indexOf("<img") == -1) content = info["content"]
list.value.unshift({
const obj = {
answers: info["answers"],
content,
publicationdate: info["publicationdate"],
title: info["title"],
typename: info["typename"],
uniqid,
})
}
list.value.unshift(obj)
if (!myModelState.value) backupsList.unshift(obj)
cut(0)
}
}
@@ -1243,9 +1246,7 @@ export default {
return
}
$ajax("/api/operate/like", {
token,
}).then(res => {
$ajax("/api/operate/like", {token}).then(res => {
if (res.code != 200) return
let data = res.data
answerList.value[index]["islike"] = data["status"]
@@ -1921,17 +1922,14 @@ export default {
let list = document.querySelector(".list-box")
let item = list.querySelector(`.item${pitchIndex.value}`)
// let prevNode = list.previousElementSibling; // 获取上一个节点
// var previousElement = item.previousElementSibling; // 你的元素的上一个元素
// console.log(list.scrollTop, "list")
// console.log(item, "item")
// let top = item.offsetTop - prevNode.offsetTop
// list.scrollTo({
// // top: 128 * pitchIndex.value - pageListHeight.value / 2 - 385,
// // top: 128 * pitchIndex.value + 68 - pageListHeight.value / 2,
// top,
// behavior: "smooth",
// })
// 136 分为 两个68一个是item高度的一半另一个是列表顶部的 数量
let top = item.offsetTop - pageListHeight.value / 2 + 136
list.scrollTo({
top,
behavior: "smooth",
})
isNeedScrollMiddle = false
}
@@ -2099,6 +2097,8 @@ export default {
// 关闭详情模式
const closeDetailMode = () => {
deleteState(["uniqid"])
if (myModelState.value) {
closeMyModel()
return
@@ -2107,7 +2107,6 @@ export default {
type.value = "list"
openBottom()
pitchIndex.value = null
deleteState(["uniqid"])
seo.value = {}
list.value = JSON.parse(JSON.stringify(backupsList))
}
@@ -2115,7 +2114,7 @@ export default {
// 全部的启动到底部
const handleListScroll = e => {
const el = e.target
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 40) return
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 40 || myModelState.value) return
getList()
}
@@ -2270,8 +2269,6 @@ export default {
}
deleteState(["keyword"])
console.log(myModelState.value, "myModelState");
if (!myModelState.value) {
temporaryData = {
total: total.value,
@@ -2298,10 +2295,10 @@ export default {
myType.value = ""
}
// 关闭我的模式
// 关闭我的模式
const closeMyModel = () => {
myModelList.value = JSON.parse(JSON.stringify(list.value))
console.log(temporaryData.listlist, "listlist")
isSearchMode.value = temporaryData["isSearchMode"]
keywordText.value = temporaryData["keywordText"]
keyword.value = temporaryData["keywordText"]
@@ -2312,9 +2309,10 @@ export default {
list.value = JSON.parse(JSON.stringify(temporaryData.listlist))
myModelState.value = false
let uniqid = list.value[pitchIndex.value]["uniqid"]
getDetails(uniqid)
if (pitchIndex.value) {
let uniqid = list.value[pitchIndex.value]["uniqid"]
getDetails(uniqid)
}
}
// 详情页滚动事件
@@ -2630,7 +2628,7 @@ export default {
let recommendPage = 1
// 获取推荐数据
const getRecommend = () => {
const getRecommend = uniqid => {
$ajaxGET("/api/details/relatedlist", {page: recommendPage, limit: 20}).then(res => {
if (res.code != 200) return
@@ -2649,17 +2647,20 @@ export default {
})
recommendList = recommendList.concat(data)
recommendPage++
handleInsertRelatedlist()
handleInsertRelatedlist(uniqid)
})
}
// 处理插入推荐数据
const handleInsertRelatedlist = () => {
const handleInsertRelatedlist = uniqid => {
console.log(myModelState.value, "myModelState")
if (myModelState.value) return
// 计算需要插入元素的数量
let insertCount = Math.ceil(backupsList.length / 5)
// 检查数组B的长度是否足够
if (recommendList.length < insertCount) {
getRecommend()
getRecommend(uniqid)
return
}
@@ -2674,7 +2675,20 @@ export default {
j++
}
}
list.value = JSON.parse(JSON.stringify(result))
// 加入 推荐阅读后 重新计算下标 和 滚动
nextTick(() => {
if (uniqid) {
result.forEach((element, index) => {
if (element["uniqid"] == uniqid) {
pitchIndex.value = index
scrollLeftInMiddle()
}
})
}
})
}
const replaceNumberObj = {