diff --git a/src/utils/http/index.ts b/src/utils/http/index.ts index 8b8bd2b..176de86 100644 --- a/src/utils/http/index.ts +++ b/src/utils/http/index.ts @@ -5,7 +5,7 @@ import { HttpError, handleError, showError } from './error' import { $t } from '@/locales' // 常量定义 -const REQUEST_TIMEOUT = 15000 // 请求超时时间(毫秒) +const REQUEST_TIMEOUT = 30000 // 请求超时时间(毫秒) const LOGOUT_DELAY = 1000 // 退出登录延迟时间(毫秒) const MAX_RETRIES = 2 // 最大重试次数 const RETRY_DELAY = 1000 // 重试延迟时间(毫秒) diff --git a/src/views/admin/publish/publish_list.vue b/src/views/admin/publish/publish_list.vue index b5af47b..e9ce197 100644 --- a/src/views/admin/publish/publish_list.vue +++ b/src/views/admin/publish/publish_list.vue @@ -722,15 +722,25 @@ } // 标记售出 const statusfn = (row: any) => { - manageService - .updatestatus({ id: row.id, status: 2 }) - .then(() => { - ElMessage.success('标记售出成功') - getWorkList() + ElMessageBox.confirm('确定要标记售出吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + manageService + .updatestatus({ id: row.id, status: 2 }) + .then(() => { + ElMessage.success('标记售出成功') + getWorkList() + }) + .catch((err) => { + console.log(err) + ElMessage.error('操作失败,请稍后重试') + }) }) - .catch((err) => { - console.log(err) - ElMessage.error('操作失败,请稍后重试') + .catch(() => { + // 用户点击了取消 }) } diff --git a/src/views/admin/publish/publish_my_list.vue b/src/views/admin/publish/publish_my_list.vue index 0447cde..c239c98 100644 --- a/src/views/admin/publish/publish_my_list.vue +++ b/src/views/admin/publish/publish_my_list.vue @@ -1350,15 +1350,25 @@ } // 标记售出 const statusfn = (row: any) => { - manageService - .updatestatus({ id: row.id, status: 2 }) - .then(() => { - ElMessage.success('标记售出成功') - getWorkList() + ElMessageBox.confirm('确定要标记售出吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + manageService + .updatestatus({ id: row.id, status: 2 }) + .then(() => { + ElMessage.success('标记售出成功') + getWorkList() + }) + .catch((err) => { + console.log(err) + ElMessage.error('操作失败,请稍后重试') + }) }) - .catch((err) => { - console.log(err) - ElMessage.error('操作失败,请稍后重试') + .catch(() => { + // 用户点击了取消 }) } diff --git a/src/views/admin/publish/publish_yw_list.vue b/src/views/admin/publish/publish_yw_list.vue index 0447cde..c239c98 100644 --- a/src/views/admin/publish/publish_yw_list.vue +++ b/src/views/admin/publish/publish_yw_list.vue @@ -1350,15 +1350,25 @@ } // 标记售出 const statusfn = (row: any) => { - manageService - .updatestatus({ id: row.id, status: 2 }) - .then(() => { - ElMessage.success('标记售出成功') - getWorkList() + ElMessageBox.confirm('确定要标记售出吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + manageService + .updatestatus({ id: row.id, status: 2 }) + .then(() => { + ElMessage.success('标记售出成功') + getWorkList() + }) + .catch((err) => { + console.log(err) + ElMessage.error('操作失败,请稍后重试') + }) }) - .catch((err) => { - console.log(err) - ElMessage.error('操作失败,请稍后重试') + .catch(() => { + // 用户点击了取消 }) }