修复前端打包问题
提取基础接口为配置
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import axios, { AxiosError } from 'axios'
|
||||
import router from '../router'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { ADMIN_API_BASE_URL } from '../config/api'
|
||||
|
||||
// 防重复提示标志
|
||||
let lastErrorTime = 0
|
||||
@@ -8,7 +9,7 @@ let lastErrorMessage = ''
|
||||
const ERROR_DEBOUNCE_TIME = 1000 // 1秒内不重复显示相同错误
|
||||
|
||||
const adminApi = axios.create({
|
||||
baseURL: 'http://wcy111.top:8088/admin/api',
|
||||
baseURL: ADMIN_API_BASE_URL,
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
@@ -210,6 +211,9 @@ export const adminCouponApi = {
|
||||
},
|
||||
deleteCoupon: (id: number) => {
|
||||
return adminApi.delete<boolean>(`/coupon/delete/${id}`)
|
||||
},
|
||||
distributeCoupon: (data: any) => {
|
||||
return adminApi.post<boolean>('/coupon/distribute', data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +327,7 @@ export interface PageResult<T> {
|
||||
}
|
||||
|
||||
export const adminUserApi = {
|
||||
listUsers: (params: { page: number; size: number; keyword?: string; type?: number; shopId?: number }) => {
|
||||
listUsers: (params: { page: number; size: number; keyword?: string; type?: number; shopId?: number; status?: number }) => {
|
||||
return adminApi.get<PageResult<UserVO>>('/user/list', { params })
|
||||
},
|
||||
listAllUsers: () => {
|
||||
@@ -392,6 +396,7 @@ export interface RecentActivityVO {
|
||||
type: string
|
||||
description: string
|
||||
time: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
export interface DashboardStats {
|
||||
|
||||
Reference in New Issue
Block a user