mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-04 19:19:29 +08:00
调整api, 清理无用代码, 更新打包文件
This commit is contained in:
BIN
build/dist.zip
BIN
build/dist.zip
Binary file not shown.
@@ -8,9 +8,9 @@ import axios from "axios";
|
||||
*/
|
||||
const addBangumi = (type: string, rss_link: string) => {
|
||||
if(type === 'new') {
|
||||
return axios.post('/api/v1/subscribe', { rss_link });
|
||||
return axios.post('api/v1/subscribe', { rss_link });
|
||||
} else if(type === 'old') {
|
||||
return axios.post('/api/v1/collection', { rss_link });
|
||||
return axios.post('api/v1/collection', { rss_link });
|
||||
} else {
|
||||
console.error('type错误, type应为 new 或 old');
|
||||
return false;
|
||||
@@ -20,13 +20,13 @@ const addBangumi = (type: string, rss_link: string) => {
|
||||
/**
|
||||
* 获取AB存储的数据
|
||||
*/
|
||||
const getABData = () => axios.get('/api/v1/data');
|
||||
const getABData = () => axios.get('api/v1/data');
|
||||
|
||||
/**
|
||||
* 删除番剧规则
|
||||
* @param {string} name 番名 (title_raw)
|
||||
*/
|
||||
const removeRule = (name: string) => axios.get(`/api/v1/removeRule/${name}`);
|
||||
const removeRule = (name: string) => axios.get(`api/v1/removeRule/${name}`);
|
||||
|
||||
export {
|
||||
addBangumi,
|
||||
|
||||
@@ -3,12 +3,12 @@ import axios from 'axios'
|
||||
/**
|
||||
* 获取AB的日志
|
||||
*/
|
||||
const getABLog = () => axios.get('/api/v1/log');
|
||||
const getABLog = () => axios.get('api/v1/log');
|
||||
|
||||
/**
|
||||
* 重置 AB 的数据,程序会在下一轮检索中重新添加 RSS 订阅信息。
|
||||
*/
|
||||
const resetRule = () => axios.get('/api/v1/resetRule');
|
||||
const resetRule = () => axios.get('api/v1/resetRule');
|
||||
|
||||
export {
|
||||
getABLog,
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import ShowResults from '@/components/ShowResults.vue';
|
||||
import { getABData, removeRule } from '@/api/bangumi';
|
||||
import { getABData } from '@/api/bangumi';
|
||||
|
||||
const res = await getABData();
|
||||
const bangumiData = ref(res.data);
|
||||
console.log(res);
|
||||
|
||||
const activeName = ref('1');
|
||||
const dialogData = ref(null);
|
||||
|
||||
@@ -26,11 +26,7 @@ export default defineConfig({
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:7892',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '/api')
|
||||
}
|
||||
'/api': 'http://192.168.0.2:7892'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user