提交 985362f4 编写于 作者: W weixin_44463441

Thu Jan 11 16:07:00 CST 2024 inscode

上级 3bd76397
...@@ -51,20 +51,24 @@ class RepEs { ...@@ -51,20 +51,24 @@ class RepEs {
user_token: token, user_token: token,
content: content, content: content,
}, },
{ withCredentials: true} {
).then(res => { withCredentials: true,
headers: {
if (res?.status === 200 && res?.data?.code === 200) { 'Content-Type': 'application/json'
const result = [] }
res?.data?.data?.hits.forEach(element => { }).then(res => {
result.push({
page_content: element?._source?.content if (res?.status === 200 && res?.data?.code === 200) {
}) const result = []
}); res?.data?.data?.hits.forEach(element => {
resolve(result) result.push({
page_content: element?._source?.content
} })
console.info(res) });
resolve(result)
}
console.info(res)
}).catch((err) => { }).catch((err) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册