修改转发url

This commit is contained in:
A1300399510 2023-12-21 11:39:15 +08:00
parent b38c6ed28a
commit 913a8c5bdd
20 changed files with 190 additions and 259 deletions

View File

@ -1,5 +1,5 @@
{
"date": "2023-12-21T02:52:46.282Z",
"date": "2023-12-21T03:38:57.448Z",
"preset": "node-server",
"framework": {
"name": "nuxt",

View File

@ -1 +1 @@
{"id":"984a1b37-8472-442e-90b0-902edf3ab4f7","timestamp":1703127155342}
{"id":"6c585092-7af7-4e50-aed3-56c838915750","timestamp":1703129927121}

View File

@ -0,0 +1 @@
{"id":"6c585092-7af7-4e50-aed3-56c838915750","timestamp":1703129927121,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

View File

@ -1 +0,0 @@
{"id":"984a1b37-8472-442e-90b0-902edf3ab4f7","timestamp":1703127155342,"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

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.b40c895b.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.74e41ae6.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.809b08a3.js",
"file": "error-404.e9a929be.js",
"imports": [
"node_modules/nuxt/dist/app/entry.js"
],
@ -185,7 +185,7 @@ const client_manifest = {
"prefetch": true,
"preload": true,
"css": [],
"file": "error-500.b5287091.js",
"file": "error-500.ec9a7266.js",
"imports": [
"node_modules/nuxt/dist/app/entry.js"
],
@ -202,7 +202,7 @@ const client_manifest = {
"resourceType": "style",
"prefetch": true,
"preload": true,
"file": "entry.7f5ece9e.css",
"file": "entry.3714ddae.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.7f5ece9e.css"
"entry.3714ddae.css"
],
"dynamicImports": [
"node_modules/@nuxt/ui-templates/dist/templates/error-404.vue",
"node_modules/@nuxt/ui-templates/dist/templates/error-500.vue"
],
"file": "entry.b40c895b.js",
"file": "entry.74e41ae6.js",
"isEntry": true,
"src": "node_modules/nuxt/dist/app/entry.js",
"_globalCSS": true
},
"entry.7f5ece9e.css": {
"file": "entry.7f5ece9e.css",
"entry.3714ddae.css": {
"file": "entry.3714ddae.css",
"resourceType": "style",
"prefetch": true,
"preload": true

View File

@ -1083,12 +1083,8 @@ const _sfc_main$2 = {
emulateJSON: true,
withCredentials: true,
headers: {
// authorization: "production" !== "production" && "9c92af854f552bbd2aab43230bcf8438", // 头部标记
authorization: "production" !== "production"
// 头部标记 ada
// authorization: "2e25ccc21d5f86b670e7476f3b58ea5d", // 头部标记
// "Cache-Control": "no-cache",
// Pragma: "no-cache",
}
}).then(function(res) {
var data2 = null;
@ -1117,8 +1113,6 @@ const _sfc_main$2 = {
headers: {
authorization: "production" !== "production"
// 头部标记
// "Cache-Control": "no-cache",
// Pragma: "no-cache",
}
}).then(function(res) {
var data2 = null;
@ -1151,7 +1145,9 @@ const _sfc_main$2 = {
window.removeEventListener("scroll", handleScroll);
});
const getCurrentUrl = () => {
return window.location.href;
const params = route.query;
let url = `${window.location["origin"]}?uniqid=${params["uniqid"]}`;
return url;
};
let myCount = ref({});
const getUserData = (key) => {
@ -1180,9 +1176,11 @@ const _sfc_main$2 = {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0;
type.value = "list";
openBottom();
pitchIndex.value = null;
openBottom();
myModelState.value = false;
replaceState({
keyword: keyword.value
});
@ -1206,6 +1204,7 @@ const _sfc_main$2 = {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0;
type.value = "list";
openBottom();
pitchIndex.value = null;
@ -1253,6 +1252,7 @@ const _sfc_main$2 = {
let data = res.data;
data.data.forEach((element) => {
element["content"] = element["content"].replace(/<[^>]*>/g, "");
element["content"] = element["content"].replace(/&nbsp;/g, "");
});
list.value = list.value.concat(data.data || []);
backupsList = backupsList.concat(data.data || []);
@ -1355,6 +1355,8 @@ const _sfc_main$2 = {
let content = "";
if (info["content"].indexOf("<img") == -1)
content = info["content"];
content = content.replace(/<[^>]*>/g, "");
content = content.replace(/&nbsp;/g, "");
const obj = {
answers: info["answers"],
content,
@ -1554,7 +1556,6 @@ const _sfc_main$2 = {
return new Promise((resolve, reject) => {
$ajax("/api/comment/lists", {
token: answerList.value[index]["token"],
// limit: answerCommentLimit,
limit,
childlimit: 1
}).then((res) => {
@ -1602,9 +1603,7 @@ const _sfc_main$2 = {
...data
};
targetAnswerList[index]["commentList"][ind]["child"][i]["commentInput"] = "";
targetAnswerList[index]["commentList"][ind]["child"].unshift(
targetData
);
targetAnswerList[index]["commentList"][ind]["child"].unshift(targetData);
targetAnswerList[index]["commentList"][ind]["childnum"]++;
} else if (ind != null) {
let targetData = {
@ -1616,9 +1615,7 @@ const _sfc_main$2 = {
reply: [],
...data
};
targetAnswerList[index]["commentList"][ind]["child"].unshift(
targetData
);
targetAnswerList[index]["commentList"][ind]["child"].unshift(targetData);
targetAnswerList[index]["commentList"][ind]["childnum"]++;
targetAnswerList[index]["commentList"][ind]["commentInput"] = "";
} else {
@ -1706,11 +1703,7 @@ const _sfc_main$2 = {
let data = res.data;
let merged1 = [
...targetAnswerList[index]["commentList"][ind]["child"],
...data.data.filter(
(item2) => !targetAnswerList[index]["commentList"][ind]["child"].find(
(item1) => item1.id == item2.id
)
)
...data.data.filter((item2) => !targetAnswerList[index]["commentList"][ind]["child"].find((item1) => item1.id == item2.id))
];
targetAnswerList[index]["commentList"][ind]["child"] = merged1;
answerList.value = targetAnswerList;
@ -1774,16 +1767,13 @@ const _sfc_main$2 = {
var parser = new DOMParser();
var doc = parser.parseFromString(html, "text/html");
var img = doc.querySelector("img");
if (img) {
if (img)
return `<img src="${img.src}">`;
} else {
else
return doc.body.textContent;
}
};
const cancelCollection = (token, index) => {
$ajax("/api/user/deleteCollect", {
token
}).then((res) => {
$ajax("/api/user/deleteCollect", { token }).then((res) => {
if (res.code == 200) {
myCollectionList.value.splice(index, 1);
myCollectionCount.value--;
@ -1911,7 +1901,6 @@ const _sfc_main$2 = {
}).then((res) => {
if (res.code != 200)
return;
res.data;
myQuestionsList.value[index]["anonymous"] = anonymous;
cutQuestionsPopupState(index);
handleMsg("success", res["message"] || "操作成功");
@ -2306,6 +2295,7 @@ const _sfc_main$2 = {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0;
myModelState.value = false;
type.value = "list";
openBottom();
@ -2446,6 +2436,7 @@ const _sfc_main$2 = {
let data = res.data;
data.data.forEach((element) => {
element["content"] = element["content"].replace(/<[^>]*>/g, "");
element["content"] = element["content"].replace(/&nbsp;/g, "");
});
list.value = data.data;
backupsList = data.data;
@ -2602,6 +2593,7 @@ const _sfc_main$2 = {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0;
getList();
};
return {
@ -2810,7 +2802,7 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
});
_push(`<!--]--><!--]-->`);
});
_push(`<!--]--></div></div></header><div class="${ssrRenderClass([{ "mode-list": $setup.type == "list" }, "main flexflex"])}"><div class="list-box"><div class="main-header" style="${ssrRenderStyle({ paddingLeft: $setup.type == "list" ? 0 : "calc((100vw - 1200px) / 2)" })}">`);
_push(`<!--]--></div></div></header><div class="${ssrRenderClass([{ "mode-list": $setup.type == "list" }, "main flexflex"])}"><div class="list-box"><div class="main-header" style="${ssrRenderStyle({ paddingLeft: $setup.type == "list" ? 0 : "calc((100vw - 1200px) / 2)" })}"><div class="flexacenter">`);
if ($setup.myModelState) {
_push(`<div class="search-keyword flexacenter"><div class="ellipsis">我的收藏/提问/回答</div><img class="search-keyword-cross"${ssrRenderAttr("src", _imports_4)}></div>`);
} else if ($setup.isSearchMode) {
@ -2818,6 +2810,7 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
} else {
_push(`<div class="total grid-item">共 ${ssrInterpolate($setup.total)} 条问答</div>`);
}
_push(`</div>`);
if ($setup.type != "details") {
_push(`<div class="look-only flexcenter">`);
if ($setup.zeroreply == 0) {

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":3,"file":"entry-styles.85d8410d.mjs","sources":["../../../../../.nuxt/dist/server/static/entry-styles-1.mjs-b326af70.js","../../../../../.nuxt/dist/server/static/entry-styles.85d8410d.mjs"],"sourcesContent":null,"names":["__buildAssetsURL","style_0"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAA,mCAAA,GAAA,s3MAAA,GAAAA,cAAA,CAAA,4BAAA,CAAA,GAAA,sktCAAA;;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.e03f77a9.mjs","sources":["../../../../../.nuxt/dist/server/static/entry-styles-1.mjs-6d545420.js","../../../../../.nuxt/dist/server/static/entry-styles.e03f77a9.mjs"],"sourcesContent":null,"names":["__buildAssetsURL","style_0"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAA,mCAAA,GAAA,q5MAAA,GAAAA,cAAA,CAAA,4BAAA,CAAA,GAAA,sktCAAA;;ACCA,6BAAe,CAACC,mCAAO;;;;"}

View File

@ -1,6 +1,6 @@
const interopDefault = r => r.default || r || [];
const styles = {
"node_modules/nuxt/dist/app/entry.js": () => import('./static/entry-styles.85d8410d.mjs').then(interopDefault),
"node_modules/nuxt/dist/app/entry.js": () => import('./static/entry-styles.e03f77a9.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)
};

View File

@ -3059,7 +3059,7 @@ function klona(x) {
const inlineAppConfig = {
"nuxt": {
"buildId": "984a1b37-8472-442e-90b0-902edf3ab4f7"
"buildId": "6c585092-7af7-4e50-aed3-56c838915750"
}
};
@ -4949,205 +4949,205 @@ const assets = {
"/static/add-icon.0b0b5313.svg": {
"type": "image/svg+xml",
"etag": "\"d67-gajxuGcy6aHIeWAbO0RazX03p90\"",
"mtime": "2023-12-21T02:52:39.624Z",
"mtime": "2023-12-21T03:38:51.111Z",
"size": 3431,
"path": "../public/static/add-icon.0b0b5313.svg"
},
"/static/arrows-icon.271dd0d3.svg": {
"type": "image/svg+xml",
"etag": "\"5a0-yAit7q5lcKJMd35iOMMifZv2uno\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 1440,
"path": "../public/static/arrows-icon.271dd0d3.svg"
},
"/static/close-icon.86743366.svg": {
"type": "image/svg+xml",
"etag": "\"2d4-QYrulZl33jopLCT37UdJfnzXOVg\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.111Z",
"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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.111Z",
"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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 6142,
"path": "../public/static/delete-icon.4d386dce.svg"
},
"/static/dot-gray.86cdd7b5.svg": {
"type": "image/svg+xml",
"etag": "\"2af-sBMsuPZbsh28jzlFWO9lVYMVDk8\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.111Z",
"size": 687,
"path": "../public/static/dot-yellow.4b5e135b.svg"
},
"/static/dot.1026a040.svg": {
"type": "image/svg+xml",
"etag": "\"217-dx6xqUT4D9pCoKc6nr20aXeJQXQ\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.111Z",
"size": 535,
"path": "../public/static/dot.1026a040.svg"
},
"/static/edit-icon-white.29b27582.svg": {
"type": "image/svg+xml",
"etag": "\"8be-EnEF3CQI46JkMNAXbPf3H6T7pzU\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 53288,
"path": "../public/static/empty-icon.24a01ae2.svg"
},
"/static/entry.7f5ece9e.css": {
"/static/entry.3714ddae.css": {
"type": "text/css; charset=utf-8",
"etag": "\"b29b-4xEaTFGRbQ4fAXav6vywBK3Rwug\"",
"mtime": "2023-12-21T02:52:39.627Z",
"size": 45723,
"path": "../public/static/entry.7f5ece9e.css"
"etag": "\"b2ba-BwEkbxO3UqHXJE5hynAxCwyj4TY\"",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 45754,
"path": "../public/static/entry.3714ddae.css"
},
"/static/entry.b40c895b.js": {
"/static/entry.74e41ae6.js": {
"type": "application/javascript",
"etag": "\"3c4bf-S+cbdgJtoUkKt0P6Z4QGFcUeP4s\"",
"mtime": "2023-12-21T02:52:39.628Z",
"size": 246975,
"path": "../public/static/entry.b40c895b.js"
"etag": "\"3c5d2-mbIwkw2yZibh63cjWJQVyDAEscc\"",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 247250,
"path": "../public/static/entry.74e41ae6.js"
},
"/static/error-404.7fc72018.css": {
"type": "text/css; charset=utf-8",
"etag": "\"e2e-iNt1cqPQ0WDudfCTZVQd31BeRGs\"",
"mtime": "2023-12-21T02:52:39.627Z",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 3630,
"path": "../public/static/error-404.7fc72018.css"
},
"/static/error-404.809b08a3.js": {
"/static/error-404.e9a929be.js": {
"type": "application/javascript",
"etag": "\"18de-JuwOp6LLAH0v1bsTmR5kf40cCZM\"",
"mtime": "2023-12-21T02:52:39.627Z",
"etag": "\"18de-3M9Dw0u4+FcdwGx/STRj6eO1j1g\"",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 6366,
"path": "../public/static/error-404.809b08a3.js"
},
"/static/error-500.b5287091.js": {
"type": "application/javascript",
"etag": "\"756-YEjqdnnUYwSRHJqqfyxBSN8Qbmw\"",
"mtime": "2023-12-21T02:52:39.627Z",
"size": 1878,
"path": "../public/static/error-500.b5287091.js"
"path": "../public/static/error-404.e9a929be.js"
},
"/static/error-500.c5df6088.css": {
"type": "text/css; charset=utf-8",
"etag": "\"79e-ByRo+49BgcevWdRjJy3CMx2IA5k\"",
"mtime": "2023-12-21T02:52:39.627Z",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 1950,
"path": "../public/static/error-500.c5df6088.css"
},
"/static/error-500.ec9a7266.js": {
"type": "application/javascript",
"etag": "\"756-5ybBqGYmuahs9LwY62OTgvp8Tqc\"",
"mtime": "2023-12-21T03:38:51.113Z",
"size": 1878,
"path": "../public/static/error-500.ec9a7266.js"
},
"/static/issue-bj.44adad8c.svg": {
"type": "image/svg+xml",
"etag": "\"926-lK6rrraYIC+9Yxyy0subzOK8XpE\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.110Z",
"size": 2342,
"path": "../public/static/issue-bj.44adad8c.svg"
},
"/static/logo.6622f82d.png": {
"type": "image/png",
"etag": "\"843f-FSXGFGigIHmtzjdcQzuMz/a7E+o\"",
"mtime": "2023-12-21T02:52:39.625Z",
"mtime": "2023-12-21T03:38:51.111Z",
"size": 33855,
"path": "../public/static/logo.6622f82d.png"
},
"/static/menu-icon-gray.d61f02b1.svg": {
"type": "image/svg+xml",
"etag": "\"6de-kmXhltPHfF4W1gmV7wT4aZCZ6gg\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 2497,
"path": "../public/static/QRCode-icon.a105d5fc.svg"
},
"/static/tick-no.179037b3.svg": {
"type": "image/svg+xml",
"etag": "\"1ea-YISAWqJD56jxoQT8N812fDJfkMw\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 490,
"path": "../public/static/tick-no.179037b3.svg"
},
"/static/tick-option.e092d22f.svg": {
"type": "image/svg+xml",
"etag": "\"29a-UVjuq3WHs6mhu1KGQ7gQmJH2Bc4\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"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-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 1546,
"path": "../public/static/tick-orange.233abc69.svg"
},
"/static/title.98892974.png": {
"type": "image/png",
"etag": "\"1723-0OwkVass/2nFB99dRT4w0sPUvI0\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 5923,
"path": "../public/static/title.98892974.png"
},
"/static/triangle-icon.c39ff2e7.svg": {
"type": "image/svg+xml",
"etag": "\"446-ylQ81DOJ3joSbsS9atyrW6pZsBY\"",
"mtime": "2023-12-21T02:52:39.627Z",
"mtime": "2023-12-21T03:38:51.112Z",
"size": 1094,
"path": "../public/static/triangle-icon.c39ff2e7.svg"
},
"/static/view-icon.da7fef35.svg": {
"type": "image/svg+xml",
"etag": "\"f39-5Jwx14wB0jgB0Du25KRZbkEEXvI\"",
"mtime": "2023-12-21T02:52:39.626Z",
"mtime": "2023-12-21T03:38:51.111Z",
"size": 3897,
"path": "../public/static/view-icon.da7fef35.svg"
},
"/static/builds/latest.json": {
"type": "application/json",
"etag": "\"47-fXiczp3aEbzo/Sf9TBBT29qPMAo\"",
"mtime": "2023-12-21T02:52:40.990Z",
"etag": "\"47-xJxdxM9U9V8tS10qxVZJOGdry/g\"",
"mtime": "2023-12-21T03:38:52.423Z",
"size": 71,
"path": "../public/static/builds/latest.json"
},
"/static/builds/meta/984a1b37-8472-442e-90b0-902edf3ab4f7.json": {
"/static/builds/meta/6c585092-7af7-4e50-aed3-56c838915750.json": {
"type": "application/json",
"etag": "\"8b-d5YE4eGwkcKthZA+8V4L7gXtKDg\"",
"mtime": "2023-12-21T02:52:40.990Z",
"etag": "\"8b-r5ibcF+j62wIq27WcmpLh2kkeKE\"",
"mtime": "2023-12-21T03:38:52.424Z",
"size": 139,
"path": "../public/static/builds/meta/984a1b37-8472-442e-90b0-902edf3ab4f7.json"
"path": "../public/static/builds/meta/6c585092-7af7-4e50-aed3-56c838915750.json"
}
};

211
app.vue
View File

@ -57,20 +57,22 @@
<div class="main flexflex" :class="{ 'mode-list': type == 'list' }">
<div class="list-box" @scroll="handleListScroll">
<div class="main-header" :style="{paddingLeft: type == 'list' ? 0 : 'calc((100vw - 1200px) / 2)',}">
<template v-if="myModelState">
<div class="search-keyword flexacenter" @click="closeMyModel()">
<div class="ellipsis">我的收藏/提问/回答</div>
<img class="search-keyword-cross" src="./img/cross-circle-icon.png" />
</div>
</template>
<template v-else-if="isSearchMode">
<div class="search-keyword flexacenter" @click="handleClickClear()">
<div class="ellipsis">{{ keywordText }}</div>
<img class="search-keyword-cross" src="./img/cross-circle-icon.png" />
</div>
<div class="total grid-item" @click="cut"> {{ total }} 条搜索结果</div>
</template>
<div v-else class="total grid-item" @click="cut"> {{ total }} 条问答</div>
<div class="flexacenter">
<template v-if="myModelState">
<div class="search-keyword flexacenter" @click="closeMyModel()">
<div class="ellipsis">我的收藏/提问/回答</div>
<img class="search-keyword-cross" src="./img/cross-circle-icon.png" />
</div>
</template>
<template v-else-if="isSearchMode">
<div class="search-keyword flexacenter" @click="handleClickClear()">
<div class="ellipsis">{{ keywordText }}</div>
<img class="search-keyword-cross" src="./img/cross-circle-icon.png" />
</div>
<div class="total grid-item" @click="cut"> {{ total }} 条搜索结果</div>
</template>
<div v-else class="total grid-item" @click="cut"> {{ total }} 条问答</div>
</div>
<div class="look-only flexcenter" v-if="type != 'details'" @click="handleLookOnly">
<img class="look-icon" v-if="zeroreply == 0" src="@/img/tick-no.svg">
@ -204,11 +206,7 @@
<div class="operate-item flexacenter" @click="operateCollect()">
<img class="operate-icon operate-collect-icon" v-if="detailsIscollection == 0" src="./img/collect-icon.png" />
<img class="operate-icon operate-collect-icon" v-else src="./img/collect-icon-colours.svg" />
{{
detailsInfo["collectionnum"] > 0
? detailsInfo["collectionnum"]
: "收藏"
}}
{{ detailsInfo["collectionnum"] > 0 ? detailsInfo["collectionnum"] : "收藏" }}
</div>
<div class="operate-item flexacenter operate-transmit" @mouseenter.stop="closeTransmitState()" @mouseleave.stop="closeAllTransmitState()">
<img class="operate-icon operate-transmit-icon" src="./img/transmit-icon.png" />
@ -221,9 +219,7 @@
<div class="transmit-headline">{{ detailsInfo["title"] }}</div>
<div class="transmit-url">{{ getCurrentUrl() }}</div>
</div>
<div class="transmit-web-btn flexcenter" @click="
copyText(detailsInfo['title'] + getCurrentUrl())
">复制链接</div>
<div class="transmit-web-btn flexcenter" @click="copyText(detailsInfo['title'] + getCurrentUrl())">复制链接</div>
</div>
<div class="transmit-right transmit-mini">
<div class="transmit-title">转发小程序版</div>
@ -310,9 +306,7 @@
<div class="transmit-headline">{{ detailsInfo["title"] }}</div>
<div class="transmit-url">{{ getCurrentUrl() }}</div>
</div>
<div class="transmit-web-btn flexcenter" @click="
copyText(detailsInfo['title'] + getCurrentUrl())
">复制链接</div>
<div class="transmit-web-btn flexcenter" @click="copyText(detailsInfo['title'] + getCurrentUrl())">复制链接</div>
</div>
<div class="transmit-right transmit-mini">
<div class="transmit-title">转发小程序版</div>
@ -794,13 +788,9 @@ export default {
emulateJSON: true,
withCredentials: true,
headers: {
// authorization: process.env.NODE_ENV !== "production" && "9c92af854f552bbd2aab43230bcf8438", //
authorization:
process.env.NODE_ENV !== "production" &&
"7a89997c2ccd8cb5ed8cb20d843dafdd", // ada
// authorization: "2e25ccc21d5f86b670e7476f3b58ea5d", //
// "Cache-Control": "no-cache",
// Pragma: "no-cache",
},
})
.then(function (res) {
@ -812,12 +802,10 @@ export default {
if (data["code"] != 200)
handleMsg("error", data["message"] || "报错了,请重试!!!");
// if (data["code"] == 401) window.location.href = "https://passport.gter.net"
} catch (error) { }
resolve(data);
})
.catch((err) => {
// if (err.response.status == 401) window.location.href = "https://passport.gter.net"
if (err.response.status == 401) isNeedLogin.value = true;
resolve(err.response.data);
});
@ -835,8 +823,6 @@ export default {
authorization:
process.env.NODE_ENV !== "production" &&
"7a89997c2ccd8cb5ed8cb20d843dafdd", //
// "Cache-Control": "no-cache",
// Pragma: "no-cache",
},
})
.then(function (res) {
@ -848,12 +834,10 @@ export default {
if (data["code"] != 200)
handleMsg("error", data["message"] || "报错了,请重试!!!");
// if (data["code"] == 401) window.location.href = "https://passport.gter.net"
} catch (error) { }
resolve(data);
})
.catch((err) => {
// if (err.response.status == 401) window.location.href = "https://passport.gter.net"
if (err.response.status == 401) isNeedLogin.value = true;
resolve(err.response.data);
});
@ -873,8 +857,6 @@ export default {
let type = ref("list"); // list details
onMounted(() => {
// getUrlParams()
// getUserData()
if (process.env.NODE_ENV !== "production") isNeedLogin.value = false;
else determineIsLogin();
@ -894,10 +876,8 @@ export default {
const params = route.query;
// console.log(params['ispublish']);
//
if (params['ispublish']) questionsInit()
});
@ -918,9 +898,6 @@ export default {
detailShare.value = data["share"] || {};
type.value = "details";
// calculateListIndex(data.info, params["uniqid"]);
answerList.value = [];
answerPage.value = 1;
getAnswerList();
@ -975,9 +952,11 @@ export default {
window.removeEventListener("scroll", handleScroll);
});
// url
// url url
const getCurrentUrl = () => {
return window.location.href;
const params = route.query;
let url = `${window.location['origin']}?uniqid=${params['uniqid']}`
return url;
};
//
@ -1019,14 +998,15 @@ export default {
//
const searchClick = () => {
// if (keyword.value == "") return
setHistoricalSearchList();
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0
type.value = "list";
openBottom();
pitchIndex.value = null;
openBottom();
myModelState.value = false
deleteState(["uniqid"]);
replaceState({
@ -1059,6 +1039,7 @@ export default {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0
type.value = "list";
openBottom();
pitchIndex.value = null;
@ -1084,7 +1065,6 @@ export default {
getList();
//
// if (scrollTop > 115 && type.value == "list") tabListFixeState.value = true
if (scrollTop > 115) tabListFixeState.value = true;
else tabListFixeState.value = false;
};
@ -1121,6 +1101,7 @@ export default {
let data = res.data;
data.data.forEach(element => {
element['content'] = element['content'].replace(/<[^>]*>/g, "");
element['content'] = element['content'].replace(/&nbsp;/g, '');
})
list.value = list.value.concat(data.data || []);
@ -1270,6 +1251,9 @@ export default {
if (!valve) {
let content = "";
if (info["content"].indexOf("<img") == -1) content = info["content"];
content = content.replace(/<[^>]*>/g, "");
content = content.replace(/&nbsp;/g, '');
const obj = {
answers: info["answers"],
content,
@ -1389,7 +1373,6 @@ export default {
nextTick(() => handleInput());
} else {
// IAnswerInfo.value = answerList.value[index]
if (type == "my") {
IAnswerInfo.value = {
title: detailsInfo.value["title"],
@ -1478,7 +1461,6 @@ export default {
)
getAnswerCommentList(index);
// answerList.value[index]['commentState'] = true
};
let answerCommentLimit = 3;
@ -1510,9 +1492,7 @@ export default {
),
];
// answerList.value[index]['commentList'] = answerList.value[index]['commentList'].concat(data.data.slice(3))
answerList.value[index]["commentList"] = merged1;
// handleMsg("success", res["message"] || "")
});
};
@ -1521,7 +1501,6 @@ export default {
return new Promise((resolve, reject) => {
$ajax("/api/comment/lists", {
token: answerList.value[index]["token"],
// limit: answerCommentLimit,
limit,
childlimit: 1,
}).then((res) => {
@ -1545,12 +1524,8 @@ export default {
let token = targetAnswerList[index]["token"];
if (i != null) {
content =
targetAnswerList[index]["commentList"][ind]["child"][i][
"commentInput"
];
parentid =
targetAnswerList[index]["commentList"][ind]["child"][i]["id"];
content = targetAnswerList[index]["commentList"][ind]["child"][i]["commentInput"];
parentid = targetAnswerList[index]["commentList"][ind]["child"][i]["id"];
} else if (ind != null) {
content = targetAnswerList[index]["commentList"][ind]["commentInput"];
parentid = targetAnswerList[index]["commentList"][ind]["id"];
@ -1580,12 +1555,8 @@ export default {
...data,
};
targetAnswerList[index]["commentList"][ind]["child"][i][
"commentInput"
] = "";
targetAnswerList[index]["commentList"][ind]["child"].unshift(
targetData
);
targetAnswerList[index]["commentList"][ind]["child"][i]["commentInput"] = "";
targetAnswerList[index]["commentList"][ind]["child"].unshift(targetData);
targetAnswerList[index]["commentList"][ind]["childnum"]++;
} else if (ind != null) {
let targetData = {
@ -1597,9 +1568,7 @@ export default {
reply: [],
...data,
};
targetAnswerList[index]["commentList"][ind]["child"].unshift(
targetData
);
targetAnswerList[index]["commentList"][ind]["child"].unshift(targetData);
targetAnswerList[index]["commentList"][ind]["childnum"]++;
targetAnswerList[index]["commentList"][ind]["commentInput"] = "";
} else {
@ -1619,8 +1588,6 @@ export default {
targetAnswerList[index]["commentnum"] = data["count"];
// targetAnswerList[index]["commentcomments"] = data['count']
closeAnswerCommentsChild();
handleMsg("success", res["message"] || "操作成功");
@ -1643,15 +1610,11 @@ export default {
const targetAnswerList = [...answerList.value];
if (i == null) {
targetAnswerList[index]["commentList"][ind]["islike"] =
data["status"];
targetAnswerList[index]["commentList"][ind]["likenum"] =
data["likenum"];
targetAnswerList[index]["commentList"][ind]["islike"] = data["status"];
targetAnswerList[index]["commentList"][ind]["likenum"] = data["likenum"];
} else {
targetAnswerList[index]["commentList"][ind]["child"][i]["islike"] =
data["status"];
targetAnswerList[index]["commentList"][ind]["child"][i]["likenum"] =
data["likenum"];
targetAnswerList[index]["commentList"][ind]["child"][i]["islike"] = data["status"];
targetAnswerList[index]["commentList"][ind]["child"][i]["likenum"] = data["likenum"];
}
answerList.value = targetAnswerList;
@ -1668,12 +1631,8 @@ export default {
closeAnswerCommentsChild();
if (i == null)
answerList.value[index].commentList[ind]["childState"] = true;
else
answerList.value[index].commentList[ind]["child"][i][
"childState"
] = true;
if (i == null) answerList.value[index].commentList[ind]["childState"] = true;
else answerList.value[index].commentList[ind]["child"][i]["childState"] = true;
};
// -
@ -1713,14 +1672,7 @@ export default {
let data = res.data;
let merged1 = [
...targetAnswerList[index]["commentList"][ind]["child"],
...data.data.filter(
(item2) =>
!targetAnswerList[index]["commentList"][ind]["child"].find(
(item1) => item1.id == item2.id
)
),
];
...targetAnswerList[index]["commentList"][ind]["child"], ...data.data.filter((item2) => !targetAnswerList[index]["commentList"][ind]["child"].find((item1) => item1.id == item2.id)),];
targetAnswerList[index]["commentList"][ind]["child"] = merged1;
answerList.value = targetAnswerList;
@ -1796,18 +1748,14 @@ export default {
var parser = new DOMParser();
var doc = parser.parseFromString(html, "text/html");
var img = doc.querySelector("img");
if (img) {
return `<img src="${img.src}">`;
} else {
return doc.body.textContent;
}
if (img) return `<img src="${img.src}">`;
else return doc.body.textContent;
};
//
const cancelCollection = (token, index) => {
$ajax("/api/user/deleteCollect", {
token,
}).then((res) => {
$ajax("/api/user/deleteCollect", { token }).then((res) => {
if (res.code == 200) {
myCollectionList.value.splice(index, 1);
myCollectionCount.value--;
@ -1835,27 +1783,26 @@ export default {
$ajax("/api/user/answer", {
limit: 20,
page: myAnswerPage,
}).then((res) => {
if (res.code != 200) return;
let data = res.data;
data.data.forEach((element) => {
element["popupState"] = false;
});
data.data.forEach((element) => {
let content = element["content"];
element["content"] = processHtml(content);
});
myAnswerList.value = myAnswerList.value.concat(data.data);
myAnswerCount.value = data.count;
if (myAnswerList.value.length != data["count"]) myAnswerPage++;
else myAnswerPage = 0;
myType.value = "answers";
})
.then((res) => {
if (res.code != 200) return;
let data = res.data;
data.data.forEach((element) => {
element["popupState"] = false;
});
data.data.forEach((element) => {
let content = element["content"];
element["content"] = processHtml(content);
});
myAnswerList.value = myAnswerList.value.concat(data.data);
myAnswerCount.value = data.count;
if (myAnswerList.value.length != data["count"]) myAnswerPage++;
else myAnswerPage = 0;
myType.value = "answers";
})
.finally(() => (myAnswerloadimg = false));
};
@ -1877,8 +1824,7 @@ export default {
answerIndexOld = null;
} else {
myAnswerList.value[index]["popupState"] = true;
if (answerIndexOld != null)
myAnswerList.value[answerIndexOld]["popupState"] = false;
if (answerIndexOld != null) myAnswerList.value[answerIndexOld]["popupState"] = false;
answerIndexOld = index;
}
};
@ -1953,7 +1899,6 @@ export default {
anonymous,
}).then((res) => {
if (res.code != 200) return;
let data = res.data;
myQuestionsList.value[index]["anonymous"] = anonymous;
cutQuestionsPopupState(index);
handleMsg("success", res["message"] || "操作成功");
@ -2025,7 +1970,6 @@ export default {
};
handleMsg("success", res["message"] || "操作成功");
let data = res.data;
// calculateListIndex(res)
getDetails(data["uniqid"]);
return;
}
@ -2052,8 +1996,6 @@ export default {
}
let list = document.querySelector(".list-box");
let item = list.querySelector(`.item${pitchIndex.value}`);
// let prevNode = list.previousElementSibling; //
// var previousElement = item.previousElementSibling; //
// 136 68item
let top = item.offsetTop - pageListHeight.value / 2 + 136;
@ -2073,11 +2015,9 @@ export default {
if (newtype == "list") {
width = "1200px";
margin = "0 auto";
// height = Math.ceil(list.value.length / 2) * 128 + "px"
} else {
width = "calc((100vw - 1200px) / 2 + 512px)";
margin = "initial";
// height = list.value.length * 128 + "px"
}
return {
width,
@ -2130,15 +2070,13 @@ export default {
obj["paddingLeft"] = "calc((100vw - 1200px) / 2)";
}
//
if (index + 1 == list.value.length)
listHeight.value = Math.max(itemHeightLeft, itemHeightRight);
if (index + 1 == list.value.length) listHeight.value = Math.max(itemHeightLeft, itemHeightRight);
return obj;
};
const bottomTpsStyle = (index, content) => {
const newtype = type.value;
// let itemHeight = content == "" ? 106 : 128
let obj = {};
if (newtype == "list") {
} else {
@ -2253,18 +2191,13 @@ export default {
//
const handleListScroll = (e) => {
const el = e.target;
if (
el.scrollHeight - el.scrollTop >= el.clientHeight + 40 ||
myModelState.value
)
return;
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 40 || myModelState.value) return;
getList();
};
// type:you
const handlePaste = (event, type) => {
const items = (event.clipboardData || event.originalEvent.clipboardData)
.items;
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
for (const item of items) {
if (item.type.indexOf("image") === 0) {
//
@ -2504,6 +2437,7 @@ export default {
page = 1;
list.value = [];
backupsList = [];
listHeight.value = 0
myModelState.value = false
type.value = "list";
openBottom();
@ -2735,6 +2669,8 @@ export default {
data.data.forEach(element => {
element['content'] = element['content'].replace(/<[^>]*>/g, "");
element['content'] = element['content'].replace(/&nbsp;/g, '');
})
list.value = data.data
@ -2942,6 +2878,7 @@ export default {
page = 1;
list.value = []
backupsList = [];
listHeight.value = 0
getList();
}

View File

@ -301,6 +301,7 @@ a {
max-width: 400px;
padding-right: 20px;
margin-right: 20px;
border-right: 1px solid #ebebeb;
}
#answer-app .main .main-header .search-keyword .search-keyword-cross {
width: 14px;

View File

@ -371,7 +371,7 @@ a {
padding-right: 20px;
margin-right: 20px;
// border-right: 1px solid #ebebeb;
border-right: 1px solid #ebebeb;
}
height: 68px;