修复:统一前后端的订单状态
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ApiResult, PageResult } from '@/api/index';
|
||||
import type { ShopMerchant, ShopMerchantParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询商户
|
||||
*/
|
||||
export async function pageShopMerchant(params: ShopMerchantParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
|
||||
'/shop/shop-merchant/page',
|
||||
MODULES_API_URL + '/shop/shop-merchant/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -23,7 +24,7 @@ export async function pageShopMerchant(params: ShopMerchantParam) {
|
||||
*/
|
||||
export async function listShopMerchant(params?: ShopMerchantParam) {
|
||||
const res = await request.get<ApiResult<ShopMerchant[]>>(
|
||||
'/shop/shop-merchant',
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -39,7 +40,7 @@ export async function listShopMerchant(params?: ShopMerchantParam) {
|
||||
*/
|
||||
export async function addShopMerchant(data: ShopMerchant) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant',
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -53,7 +54,7 @@ export async function addShopMerchant(data: ShopMerchant) {
|
||||
*/
|
||||
export async function updateShopMerchant(data: ShopMerchant) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant',
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
@@ -67,7 +68,7 @@ export async function updateShopMerchant(data: ShopMerchant) {
|
||||
*/
|
||||
export async function removeShopMerchant(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant/' + id
|
||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
@@ -80,7 +81,7 @@ export async function removeShopMerchant(id?: number) {
|
||||
*/
|
||||
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant/batch',
|
||||
MODULES_API_URL + '/shop/shop-merchant/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
@@ -96,7 +97,7 @@ export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopMerchant(id: number) {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
'/shop/shop-merchant/' + id
|
||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { PageParam } from '@/api/index';
|
||||
|
||||
/**
|
||||
* 商户
|
||||
@@ -30,9 +30,9 @@ export interface ShopMerchant {
|
||||
merchantCategoryTitle?: string;
|
||||
// 经纬度
|
||||
lngAndLat?: string;
|
||||
//
|
||||
//
|
||||
lng?: string;
|
||||
//
|
||||
//
|
||||
lat?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
@@ -56,8 +56,16 @@ export interface ShopMerchant {
|
||||
price?: string;
|
||||
// 是否自营
|
||||
ownStore?: number;
|
||||
// 是否可以快递
|
||||
canExpress?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 是否营业
|
||||
isOn?: number;
|
||||
//
|
||||
startTime?: string;
|
||||
//
|
||||
endTime?: string;
|
||||
// 是否需要审核
|
||||
goodsReview?: number;
|
||||
// 管理入口
|
||||
@@ -83,8 +91,5 @@ export interface ShopMerchant {
|
||||
*/
|
||||
export interface ShopMerchantParam extends PageParam {
|
||||
merchantId?: number;
|
||||
phone?: string;
|
||||
userId?: number;
|
||||
shopType?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user