mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-12 02:21:06 +08:00
feat: 修改url地址,防止307成错误的url地址
This commit is contained in:
@@ -112,7 +112,7 @@ async function addSubscribe(season = 0) {
|
||||
// 全部存在时洗版
|
||||
best_version = !seasonsNotExisted.value[season] ? 1 : 0
|
||||
// 请求API
|
||||
const result: { [key: string]: any } = await api.post('subscribe', {
|
||||
const result: { [key: string]: any } = await api.post('subscribe/', {
|
||||
name: props.media?.title,
|
||||
type: props.media?.type,
|
||||
year: props.media?.year,
|
||||
|
||||
@@ -212,7 +212,7 @@ async function updateSiteInfo() {
|
||||
// 更新按钮状态
|
||||
siteInfoDialog.value = false
|
||||
|
||||
const result: { [key: string]: any } = await api.put('site', siteForm)
|
||||
const result: { [key: string]: any } = await api.put('site/', siteForm)
|
||||
if (result.success) {
|
||||
$toast.success(`${cardProps.site?.name} 更新成功!`)
|
||||
emit('update')
|
||||
|
||||
@@ -118,7 +118,7 @@ async function searchSubscribe() {
|
||||
async function updateSubscribeInfo() {
|
||||
subscribeInfoDialog.value = false
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.put('subscribe', subscribeForm)
|
||||
const result: { [key: string]: any } = await api.put('subscribe/', subscribeForm)
|
||||
|
||||
// 提示
|
||||
if (result.success) {
|
||||
|
||||
@@ -76,7 +76,7 @@ async function handleAddDownload(_site: any = undefined,
|
||||
async function addDownload(_media: any, _torrent: any) {
|
||||
startNProgress()
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.post('download', {
|
||||
const result: { [key: string]: any } = await api.post('download/', {
|
||||
media_in: _media,
|
||||
torrent_in: _torrent,
|
||||
})
|
||||
|
||||
@@ -185,7 +185,7 @@ async function addSubscribe(season = 0) {
|
||||
// 全部存在时洗版
|
||||
best_version = !seasonsNotExisted.value[season] ? 1 : 0
|
||||
// 请求API
|
||||
const result: { [key: string]: any } = await api.post('subscribe', {
|
||||
const result: { [key: string]: any } = await api.post('subscribe/', {
|
||||
name: mediaDetail.value?.title,
|
||||
type: mediaDetail.value?.type,
|
||||
year: mediaDetail.value?.year,
|
||||
|
||||
@@ -38,7 +38,7 @@ function pluginInstalled() {
|
||||
// 获取插件列表数据
|
||||
async function fetchData() {
|
||||
try {
|
||||
dataList.value = await api.get('plugin')
|
||||
dataList.value = await api.get('plugin/')
|
||||
isRefreshed.value = true
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
@@ -17,7 +17,7 @@ const isRefreshed = ref(false)
|
||||
// 获取订阅列表数据
|
||||
async function fetchData() {
|
||||
try {
|
||||
dataList.value = await api.get('download')
|
||||
dataList.value = await api.get('download/')
|
||||
isRefreshed.value = true
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
@@ -86,7 +86,7 @@ async function saveAccountInfo() {
|
||||
accountInfo.value.password = newPassword.value
|
||||
}
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.put('user', accountInfo.value)
|
||||
const result: { [key: string]: any } = await api.put('user/', accountInfo.value)
|
||||
if (result.success)
|
||||
$toast.success('用户信息保存成功!')
|
||||
else
|
||||
@@ -100,7 +100,7 @@ async function saveAccountInfo() {
|
||||
// 调用API,查询所有用户
|
||||
async function loadAllUsers() {
|
||||
try {
|
||||
const result: User[] = await api.get('/user')
|
||||
const result: User[] = await api.get('/user/')
|
||||
|
||||
allUsers.value = result
|
||||
}
|
||||
@@ -131,7 +131,7 @@ async function deactivateUser(user: User) {
|
||||
try {
|
||||
user.is_active = !user.is_active
|
||||
|
||||
const result: { [key: string]: any } = await api.put('user', user)
|
||||
const result: { [key: string]: any } = await api.put('user/', user)
|
||||
if (result.success) {
|
||||
$toast.success('用户冻结成功!')
|
||||
loadAllUsers()
|
||||
|
||||
@@ -109,7 +109,7 @@ function addFilterCard() {
|
||||
// 查询所有站点
|
||||
async function querySites() {
|
||||
try {
|
||||
const data: Site[] = await api.get('site')
|
||||
const data: Site[] = await api.get('site/')
|
||||
|
||||
// 过滤站点,只有启用的站点才显示
|
||||
allSites.value = data.filter(item => item.is_active)
|
||||
|
||||
@@ -57,7 +57,7 @@ async function saveSelectedRssSites() {
|
||||
// 查询所有站点
|
||||
async function querySites() {
|
||||
try {
|
||||
const data: Site[] = await api.get('site')
|
||||
const data: Site[] = await api.get('site/')
|
||||
|
||||
// 过滤站点,只有启用的站点才显示
|
||||
allSites.value = data.filter(item => item.is_active)
|
||||
|
||||
@@ -58,7 +58,7 @@ const siteForm = reactive<Site>({
|
||||
// 获取站点列表数据
|
||||
async function fetchData() {
|
||||
try {
|
||||
dataList.value = await api.get('site')
|
||||
dataList.value = await api.get('site/')
|
||||
isRefreshed.value = true
|
||||
}
|
||||
catch (error) {
|
||||
@@ -77,7 +77,7 @@ async function addSite() {
|
||||
addBtnState.value = true
|
||||
|
||||
try {
|
||||
const result: { [key: string]: string } = await api.post('site', siteForm)
|
||||
const result: { [key: string]: string } = await api.post('site/', siteForm)
|
||||
if (result.success) {
|
||||
$toast.success('新增站点成功')
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ async function eventsHander(subscribe: Subscribe | Rss) {
|
||||
async function getSubscribes() {
|
||||
try {
|
||||
// 订阅
|
||||
const subscribes: Subscribe[] = await api.get('subscribe')
|
||||
const subscribes: Subscribe[] = await api.get('subscribe/')
|
||||
|
||||
const subEvents = await Promise.all(
|
||||
subscribes.map(async sub => eventsHander(sub)),
|
||||
|
||||
@@ -19,7 +19,7 @@ const dataList = ref<Subscribe[]>([])
|
||||
// 获取订阅列表数据
|
||||
async function fetchData() {
|
||||
try {
|
||||
dataList.value = await api.get('subscribe')
|
||||
dataList.value = await api.get('subscribe/')
|
||||
isRefreshed.value = true
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user