搜索会在后台记录关键词
This commit is contained in:
parent
2d7fbe8bfc
commit
eed73da2e8
1
dist/css/325.fa8a5d86.css
vendored
Normal file
1
dist/css/325.fa8a5d86.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/css/368.9ee9e7c3.css
vendored
1
dist/css/368.9ee9e7c3.css
vendored
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1 +1 @@
|
|||||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站</title><script defer="defer" src="/js/chunk-vendors.58aa9133.js"></script><script defer="defer" src="/js/app.17364b29.js"></script><link href="/css/chunk-vendors.c52e575a.css" rel="stylesheet"><link href="/css/app.01759f36.css" rel="stylesheet"></head><body><noscript><strong>抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。</strong></noscript><div id="app"></div></body></html>
|
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站</title><script defer="defer" src="/js/chunk-vendors.58aa9133.js"></script><script defer="defer" src="/js/app.9c4499da.js"></script><link href="/css/chunk-vendors.c52e575a.css" rel="stylesheet"><link href="/css/app.01759f36.css" rel="stylesheet"></head><body><noscript><strong>抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。</strong></noscript><div id="app"></div></body></html>
|
||||||
2
dist/js/325.93755988.js
vendored
Normal file
2
dist/js/325.93755988.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/js/368.d92408a5.js
vendored
2
dist/js/368.d92408a5.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -182,6 +182,7 @@
|
|||||||
import Navbar from '@/components/NavBar.vue';
|
import Navbar from '@/components/NavBar.vue';
|
||||||
import Loading from '@/components/Loading.vue';
|
import Loading from '@/components/Loading.vue';
|
||||||
import MessageBox from '@/utils/messageBox.js';
|
import MessageBox from '@/utils/messageBox.js';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SearchView',
|
name: 'SearchView',
|
||||||
@ -343,12 +344,21 @@ export default {
|
|||||||
this.updateUrlParams(params);
|
this.updateUrlParams(params);
|
||||||
|
|
||||||
// 发送搜索请求
|
// 发送搜索请求
|
||||||
|
const token = Cookies.get('token');
|
||||||
|
const headers = {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
};
|
||||||
|
if (token) {
|
||||||
|
headers['Authorization'] = token;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await fetch('https://newfront.东北大学.com/search/general', {
|
const response = await fetch('https://newfront.东北大学.com/search/general', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: headers,
|
||||||
'Content-Type': 'application/json'
|
body: JSON.stringify({
|
||||||
},
|
...params,
|
||||||
body: JSON.stringify(params)
|
record: true // 记录搜索历史
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user