整理系统菜单及权限
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { MerchantApply, MerchantApplyParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import { SERVER_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商户入驻申请
|
||||
*/
|
||||
export async function pageMerchantApply(params: MerchantApplyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<MerchantApply>>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply/page',
|
||||
SERVER_API_URL + '/system/merchant-apply/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +24,7 @@ export async function pageMerchantApply(params: MerchantApplyParam) {
|
||||
*/
|
||||
export async function listMerchantApply(params?: MerchantApplyParam) {
|
||||
const res = await request.get<ApiResult<MerchantApply[]>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply',
|
||||
SERVER_API_URL + '/system/merchant-apply',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export async function listMerchantApply(params?: MerchantApplyParam) {
|
||||
*/
|
||||
export async function addMerchantApply(data: MerchantApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply',
|
||||
SERVER_API_URL + '/system/merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +54,7 @@ export async function addMerchantApply(data: MerchantApply) {
|
||||
*/
|
||||
export async function updateMerchantApply(data: MerchantApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply',
|
||||
SERVER_API_URL + '/system/merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +68,7 @@ export async function updateMerchantApply(data: MerchantApply) {
|
||||
*/
|
||||
export async function removeMerchantApply(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply/' + id
|
||||
SERVER_API_URL + '/system/merchant-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +81,7 @@ export async function removeMerchantApply(id?: number) {
|
||||
*/
|
||||
export async function removeBatchMerchantApply(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply/batch',
|
||||
SERVER_API_URL + '/system/merchant-apply/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export async function removeBatchMerchantApply(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getMerchantApply(id: number) {
|
||||
const res = await request.get<ApiResult<MerchantApply>>(
|
||||
MODULES_API_URL + '/shop/merchant-apply/' + id
|
||||
SERVER_API_URL + '/system/merchant-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
Reference in New Issue
Block a user