Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit e4e6542

Browse files
committed
调整api, 清理无用代码, 更新打包文件
1 parent 9eda458 commit e4e6542

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

build/dist.zip

-22 Bytes
Binary file not shown.

src/api/bangumi.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import axios from "axios";
88
*/
99
const addBangumi = (type: string, rss_link: string) => {
1010
if(type === 'new') {
11-
return axios.post('/api/v1/subscribe', { rss_link });
11+
return axios.post('api/v1/subscribe', { rss_link });
1212
} else if(type === 'old') {
13-
return axios.post('/api/v1/collection', { rss_link });
13+
return axios.post('api/v1/collection', { rss_link });
1414
} else {
1515
console.error('type错误, type应为 new 或 old');
1616
return false;
@@ -20,13 +20,13 @@ const addBangumi = (type: string, rss_link: string) => {
2020
/**
2121
* 获取AB存储的数据
2222
*/
23-
const getABData = () => axios.get('/api/v1/data');
23+
const getABData = () => axios.get('api/v1/data');
2424

2525
/**
2626
* 删除番剧规则
2727
* @param {string} name 番名 (title_raw)
2828
*/
29-
const removeRule = (name: string) => axios.get(`/api/v1/removeRule/${name}`);
29+
const removeRule = (name: string) => axios.get(`api/v1/removeRule/${name}`);
3030

3131
export {
3232
addBangumi,

src/api/debug.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import axios from 'axios'
33
/**
44
* 获取AB的日志
55
*/
6-
const getABLog = () => axios.get('/api/v1/log');
6+
const getABLog = () => axios.get('api/v1/log');
77

88
/**
99
* 重置 AB 的数据,程序会在下一轮检索中重新添加 RSS 订阅信息。
1010
*/
11-
const resetRule = () => axios.get('/api/v1/resetRule');
11+
const resetRule = () => axios.get('api/v1/resetRule');
1212

1313
export {
1414
getABLog,

src/pages/bangumi/components/BangumiData.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<script setup lang="ts">
22
import ShowResults from '@/components/ShowResults.vue';
3-
import { getABData, removeRule } from '@/api/bangumi';
3+
import { getABData } from '@/api/bangumi';
44
55
const res = await getABData();
66
const bangumiData = ref(res.data);
7-
console.log(res);
87
98
const activeName = ref('1');
109
const dialogData = ref(null);

vite.config.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ export default defineConfig({
2626
server: {
2727
host: '0.0.0.0',
2828
proxy: {
29-
'/api': {
30-
target: 'http://127.0.0.1:7892',
31-
changeOrigin: true,
32-
rewrite: path => path.replace(/^\/api/, '/api')
33-
}
29+
'/api': 'http://192.168.0.2:7892'
3430
}
3531
}
3632
})

0 commit comments

Comments
 (0)