WEB/src/api/index/index.ts
2026-05-25 18:14:47 +08:00

370 lines
7.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/utils/request'
export function fastWhereTree(type:any) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.fastWhereTree',
v: '1.0',
timestamp: new Date().getTime()
},
data: {type},
isSystemApi: true
} as any)
}
export function loadStores(type:any) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.loadStores',
v: '1.0',
timestamp: new Date().getTime()
},
data: {type},
isSystemApi: true
} as any)
}
export function getCOSUploadConfig(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getCOSUploadConfig',
v: '1.0',
timestamp: new Date().getTime()
},
data: {data},
isSystemApi: true
} as any)
}
export function getImages(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getImages',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function uploadSuccessNotify(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.uploadSuccessNotify',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function ReferenceFile(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.ReferenceFile',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function getMessageDetail(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getMessageDetail',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
/** 生成 IM 单点登录一次性 code(有效期 5 分钟) */
export function loginToIm(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.loginToIm',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
export function getI18nMessage(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getI18nMessage',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function putI18nCollect(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.putI18nCollect',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export type GetExpressListParams = {
systemOnly?: boolean | number | string
express_code?: string
}
export function getExpressList(data?: GetExpressListParams) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getExpressList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
export function tryAutoTranslateNewKeys(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.tryAutoTranslateNewKeys',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
export function getPlatformList(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getPlatformList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
export function getPrintPlatformTemplateList(data?: { platform_code?: string; express_code: string }) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getPrintPlatformTemplateList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? ({} as any),
isSystemApi: true
} as any)
}
/** 公共无参查询淘宝菜鸟标准模板列表 */
export function getCainiaoStfTemplates(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getCainiaoStfTemplates',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 生成菠萝派授权链接(无请求参数) */
export function polyapiAuthorizeUrl(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.polyapiAuthorizeUrl',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 获取平台授权链接(当前仅支持 PDD) */
export function getPlatformOauthLink(data?: {
code?: string
platform_code?: string
platformCode?: string
}) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getPlatformOauthLink',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 获取当前登录仓库下的店铺列表(可按平台编码过滤) */
export function getShopList(data?: {
platform_code?: string
platformCode?: string
code?: string
}) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getShopList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 获取指定店铺可用快递列表 */
export function getShopExpressList(data?: { shop_id?: string | number; shopId?: string | number }) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getShopExpressList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 快递公司产品类型列表(可选按快递公司编码筛选) */
export function getExpressProductTypeList(data?: { express_code?: string }) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getExpressProductTypeList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
/** 查询所有已启用的接口类型列表(无需权限,仅需登录) */
export function listInterfaceTypes() {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.listInterfaceTypes',
v: '1.0',
timestamp: new Date().getTime()
},
data: {},
isSystemApi: true
} as any)
}
/** 获取奇门 ERP 应用列表(用于选择 ERP / AppKey) */
export function getQimenAppList(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getQimenAppList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}
export function searchSpace(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.searchSpace',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function recognizeLicensePlate(data:any){
return request({
url: '/system',
method: 'post',
params: {
method: 'index.recognizeLicensePlate',
v: '1.0',
timestamp: new Date().getTime()
},
data: data,
isSystemApi: true
} as any)
}
export function getLocationTypeList(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getLocationTypeList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}