Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/api/shop/shopCoupon/model/index.ts
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopCoupon, ShopCouponParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询优惠券
|
||||
*/
|
||||
export async function pageShopCoupon(params: ShopCouponParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopCoupon>>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon/page',
|
||||
'/shop/shop-coupon/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopCoupon(params: ShopCouponParam) {
|
||||
*/
|
||||
export async function listShopCoupon(params?: ShopCouponParam) {
|
||||
const res = await request.get<ApiResult<ShopCoupon[]>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon',
|
||||
'/shop/shop-coupon',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopCoupon(params?: ShopCouponParam) {
|
||||
*/
|
||||
export async function addShopCoupon(data: ShopCoupon) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon',
|
||||
'/shop/shop-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopCoupon(data: ShopCoupon) {
|
||||
*/
|
||||
export async function updateShopCoupon(data: ShopCoupon) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon',
|
||||
'/shop/shop-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopCoupon(data: ShopCoupon) {
|
||||
*/
|
||||
export async function removeShopCoupon(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon/' + id
|
||||
'/shop/shop-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopCoupon(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopCoupon(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon/batch',
|
||||
'/shop/shop-coupon/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopCoupon(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopCoupon(id: number) {
|
||||
const res = await request.get<ApiResult<ShopCoupon>>(
|
||||
MODULES_API_URL + '/shop/shop-coupon/' + id
|
||||
'/shop/shop-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerApply, ShopDealerApplyParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商申请记录表
|
||||
*/
|
||||
export async function pageShopDealerApply(params: ShopDealerApplyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerApply>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply/page',
|
||||
'/shop/shop-dealer-apply/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerApply(params: ShopDealerApplyParam) {
|
||||
*/
|
||||
export async function listShopDealerApply(params?: ShopDealerApplyParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerApply[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply',
|
||||
'/shop/shop-dealer-apply',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerApply(params?: ShopDealerApplyParam) {
|
||||
*/
|
||||
export async function addShopDealerApply(data: ShopDealerApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply',
|
||||
'/shop/shop-dealer-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerApply(data: ShopDealerApply) {
|
||||
*/
|
||||
export async function updateShopDealerApply(data: ShopDealerApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply',
|
||||
'/shop/shop-dealer-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerApply(data: ShopDealerApply) {
|
||||
*/
|
||||
export async function removeShopDealerApply(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply/' + id
|
||||
'/shop/shop-dealer-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerApply(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply/batch',
|
||||
'/shop/shop-dealer-apply/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerApply(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopDealerApply(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerApply>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-apply/' + id
|
||||
'/shop/shop-dealer-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商申请记录表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerCapital, ShopDealerCapitalParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商资金明细表
|
||||
*/
|
||||
export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerCapital>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital/page',
|
||||
'/shop/shop-dealer-capital/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerCapital(params: ShopDealerCapitalParam) {
|
||||
*/
|
||||
export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerCapital[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital',
|
||||
'/shop/shop-dealer-capital',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerCapital(params?: ShopDealerCapitalParam) {
|
||||
*/
|
||||
export async function addShopDealerCapital(data: ShopDealerCapital) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital',
|
||||
'/shop/shop-dealer-capital',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerCapital(data: ShopDealerCapital) {
|
||||
*/
|
||||
export async function updateShopDealerCapital(data: ShopDealerCapital) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital',
|
||||
'/shop/shop-dealer-capital',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerCapital(data: ShopDealerCapital) {
|
||||
*/
|
||||
export async function removeShopDealerCapital(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital/' + id
|
||||
'/shop/shop-dealer-capital/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerCapital(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital/batch',
|
||||
'/shop/shop-dealer-capital/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerCapital(data: (number | undefined)[])
|
||||
*/
|
||||
export async function getShopDealerCapital(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerCapital>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-capital/' + id
|
||||
'/shop/shop-dealer-capital/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商资金明细表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerOrder, ShopDealerOrderParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商订单记录表
|
||||
*/
|
||||
export async function pageShopDealerOrder(params: ShopDealerOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerOrder>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order/page',
|
||||
'/shop/shop-dealer-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerOrder(params: ShopDealerOrderParam) {
|
||||
*/
|
||||
export async function listShopDealerOrder(params?: ShopDealerOrderParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerOrder[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order',
|
||||
'/shop/shop-dealer-order',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerOrder(params?: ShopDealerOrderParam) {
|
||||
*/
|
||||
export async function addShopDealerOrder(data: ShopDealerOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order',
|
||||
'/shop/shop-dealer-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerOrder(data: ShopDealerOrder) {
|
||||
*/
|
||||
export async function updateShopDealerOrder(data: ShopDealerOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order',
|
||||
'/shop/shop-dealer-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerOrder(data: ShopDealerOrder) {
|
||||
*/
|
||||
export async function removeShopDealerOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order/' + id
|
||||
'/shop/shop-dealer-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerOrder(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order/batch',
|
||||
'/shop/shop-dealer-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerOrder(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopDealerOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerOrder>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-order/' + id
|
||||
'/shop/shop-dealer-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商订单记录表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerReferee, ShopDealerRefereeParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商推荐关系表
|
||||
*/
|
||||
export async function pageShopDealerReferee(params: ShopDealerRefereeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerReferee>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee/page',
|
||||
'/shop/shop-dealer-referee/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerReferee(params: ShopDealerRefereeParam) {
|
||||
*/
|
||||
export async function listShopDealerReferee(params?: ShopDealerRefereeParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerReferee[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee',
|
||||
'/shop/shop-dealer-referee',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerReferee(params?: ShopDealerRefereeParam) {
|
||||
*/
|
||||
export async function addShopDealerReferee(data: ShopDealerReferee) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee',
|
||||
'/shop/shop-dealer-referee',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerReferee(data: ShopDealerReferee) {
|
||||
*/
|
||||
export async function updateShopDealerReferee(data: ShopDealerReferee) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee',
|
||||
'/shop/shop-dealer-referee',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerReferee(data: ShopDealerReferee) {
|
||||
*/
|
||||
export async function removeShopDealerReferee(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee/' + id
|
||||
'/shop/shop-dealer-referee/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerReferee(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee/batch',
|
||||
'/shop/shop-dealer-referee/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerReferee(data: (number | undefined)[])
|
||||
*/
|
||||
export async function getShopDealerReferee(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerReferee>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-referee/' + id
|
||||
'/shop/shop-dealer-referee/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商推荐关系表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerSetting, ShopDealerSettingParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商设置表
|
||||
*/
|
||||
export async function pageShopDealerSetting(params: ShopDealerSettingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerSetting>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting/page',
|
||||
'/shop/shop-dealer-setting/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerSetting(params: ShopDealerSettingParam) {
|
||||
*/
|
||||
export async function listShopDealerSetting(params?: ShopDealerSettingParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerSetting[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting',
|
||||
'/shop/shop-dealer-setting',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerSetting(params?: ShopDealerSettingParam) {
|
||||
*/
|
||||
export async function addShopDealerSetting(data: ShopDealerSetting) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting',
|
||||
'/shop/shop-dealer-setting',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerSetting(data: ShopDealerSetting) {
|
||||
*/
|
||||
export async function updateShopDealerSetting(data: ShopDealerSetting) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting',
|
||||
'/shop/shop-dealer-setting',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerSetting(data: ShopDealerSetting) {
|
||||
*/
|
||||
export async function removeShopDealerSetting(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting/' + id
|
||||
'/shop/shop-dealer-setting/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerSetting(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting/batch',
|
||||
'/shop/shop-dealer-setting/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerSetting(data: (number | undefined)[])
|
||||
*/
|
||||
export async function getShopDealerSetting(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerSetting>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-setting/' + id
|
||||
'/shop/shop-dealer-setting/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商设置表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerUser, ShopDealerUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商用户记录表
|
||||
*/
|
||||
export async function pageShopDealerUser(params: ShopDealerUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerUser>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user/page',
|
||||
'/shop/shop-dealer-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerUser(params: ShopDealerUserParam) {
|
||||
*/
|
||||
export async function listShopDealerUser(params?: ShopDealerUserParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerUser[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user',
|
||||
'/shop/shop-dealer-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerUser(params?: ShopDealerUserParam) {
|
||||
*/
|
||||
export async function addShopDealerUser(data: ShopDealerUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user',
|
||||
'/shop/shop-dealer-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerUser(data: ShopDealerUser) {
|
||||
*/
|
||||
export async function updateShopDealerUser(data: ShopDealerUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user',
|
||||
'/shop/shop-dealer-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerUser(data: ShopDealerUser) {
|
||||
*/
|
||||
export async function removeShopDealerUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user/' + id
|
||||
'/shop/shop-dealer-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerUser(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user/batch',
|
||||
'/shop/shop-dealer-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerUser(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopDealerUser(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerUser>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-user/' + id
|
||||
'/shop/shop-dealer-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商用户记录表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopDealerWithdraw, ShopDealerWithdrawParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询分销商提现明细表
|
||||
*/
|
||||
export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopDealerWithdraw>>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw/page',
|
||||
'/shop/shop-dealer-withdraw/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopDealerWithdraw(params: ShopDealerWithdrawParam) {
|
||||
*/
|
||||
export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) {
|
||||
const res = await request.get<ApiResult<ShopDealerWithdraw[]>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw',
|
||||
'/shop/shop-dealer-withdraw',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopDealerWithdraw(params?: ShopDealerWithdrawParam) {
|
||||
*/
|
||||
export async function addShopDealerWithdraw(data: ShopDealerWithdraw) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw',
|
||||
'/shop/shop-dealer-withdraw',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopDealerWithdraw(data: ShopDealerWithdraw) {
|
||||
*/
|
||||
export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw',
|
||||
'/shop/shop-dealer-withdraw',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopDealerWithdraw(data: ShopDealerWithdraw) {
|
||||
*/
|
||||
export async function removeShopDealerWithdraw(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw/' + id
|
||||
'/shop/shop-dealer-withdraw/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopDealerWithdraw(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw/batch',
|
||||
'/shop/shop-dealer-withdraw/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]
|
||||
*/
|
||||
export async function getShopDealerWithdraw(id: number) {
|
||||
const res = await request.get<ApiResult<ShopDealerWithdraw>>(
|
||||
MODULES_API_URL + '/shop/shop-dealer-withdraw/' + id
|
||||
'/shop/shop-dealer-withdraw/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商提现明细表
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopUserCoupon, ShopUserCouponParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询用户优惠券
|
||||
*/
|
||||
export async function pageShopUserCoupon(params: ShopUserCouponParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopUserCoupon>>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon/page',
|
||||
'/shop/shop-user-coupon/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopUserCoupon(params: ShopUserCouponParam) {
|
||||
*/
|
||||
export async function listShopUserCoupon(params?: ShopUserCouponParam) {
|
||||
const res = await request.get<ApiResult<ShopUserCoupon[]>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon',
|
||||
'/shop/shop-user-coupon',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopUserCoupon(params?: ShopUserCouponParam) {
|
||||
*/
|
||||
export async function addShopUserCoupon(data: ShopUserCoupon) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon',
|
||||
'/shop/shop-user-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopUserCoupon(data: ShopUserCoupon) {
|
||||
*/
|
||||
export async function updateShopUserCoupon(data: ShopUserCoupon) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon',
|
||||
'/shop/shop-user-coupon',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopUserCoupon(data: ShopUserCoupon) {
|
||||
*/
|
||||
export async function removeShopUserCoupon(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon/' + id
|
||||
'/shop/shop-user-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopUserCoupon(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopUserCoupon(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon/batch',
|
||||
'/shop/shop-user-coupon/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopUserCoupon(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopUserCoupon(id: number) {
|
||||
const res = await request.get<ApiResult<ShopUserCoupon>>(
|
||||
MODULES_API_URL + '/shop/shop-user-coupon/' + id
|
||||
'/shop/shop-user-coupon/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 用户优惠券
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopUserReferee, ShopUserRefereeParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询用户推荐关系表
|
||||
*/
|
||||
export async function pageShopUserReferee(params: ShopUserRefereeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopUserReferee>>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee/page',
|
||||
'/shop/shop-user-referee/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -24,7 +23,7 @@ export async function pageShopUserReferee(params: ShopUserRefereeParam) {
|
||||
*/
|
||||
export async function listShopUserReferee(params?: ShopUserRefereeParam) {
|
||||
const res = await request.get<ApiResult<ShopUserReferee[]>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee',
|
||||
'/shop/shop-user-referee',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -40,7 +39,7 @@ export async function listShopUserReferee(params?: ShopUserRefereeParam) {
|
||||
*/
|
||||
export async function addShopUserReferee(data: ShopUserReferee) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee',
|
||||
'/shop/shop-user-referee',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -54,7 +53,7 @@ export async function addShopUserReferee(data: ShopUserReferee) {
|
||||
*/
|
||||
export async function updateShopUserReferee(data: ShopUserReferee) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee',
|
||||
'/shop/shop-user-referee',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -68,7 +67,7 @@ export async function updateShopUserReferee(data: ShopUserReferee) {
|
||||
*/
|
||||
export async function removeShopUserReferee(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee/' + id
|
||||
'/shop/shop-user-referee/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -81,7 +80,7 @@ export async function removeShopUserReferee(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopUserReferee(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee/batch',
|
||||
'/shop/shop-user-referee/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -97,7 +96,7 @@ export async function removeBatchShopUserReferee(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopUserReferee(id: number) {
|
||||
const res = await request.get<ApiResult<ShopUserReferee>>(
|
||||
MODULES_API_URL + '/shop/shop-user-referee/' + id
|
||||
'/shop/shop-user-referee/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -152,6 +152,7 @@ export interface UserParam extends PageParam {
|
||||
sexName?: string;
|
||||
roleId?: string;
|
||||
isAdmin?: number;
|
||||
isSuperAdmin?: boolean;
|
||||
showProfile?: boolean;
|
||||
isStaff?: boolean;
|
||||
templateId?: number;
|
||||
|
||||
Reference in New Issue
Block a user