166 lines
3.5 KiB
JavaScript
166 lines
3.5 KiB
JavaScript
import request from '@/common/system/request';
|
|
|
|
/**
|
|
* 获取默认商店
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getDefaultStore = async () => {
|
|
const res = await request.post("Store/GetDefaultStore");
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取商家订单分页
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getOrderPageByMerchant = async (params) => {
|
|
const res = await request.post("Store/GetOrderPageByMerchant", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取商家订单搜索分页
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getOrderPageByMerchantSearch = async (params) => {
|
|
const res = await request.post("Store/GetOrderPageByMerchantSearch", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取推荐关键词
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getRecommendKeys = async () => {
|
|
const res = await request.post("Store/GetRecommendKeys");
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 根据ID获取商店
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getStoreById = async (params) => {
|
|
const res = await request.post("Store/GetStoreById", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 根据用户ID获取商店
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getStoreByUserId = async (params) => {
|
|
const res = await request.post("Store/GetStoreByUserId", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取商店列表
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getStoreList = async (params) => {
|
|
const res = await request.post("Store/GetStoreList", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取商店开关
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const getStoreSwitch = async () => {
|
|
const res = await request.post("Store/GetStoreSwitch");
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 是否店员
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const isClerk = async () => {
|
|
const res = await request.post("Store/IsClerk");
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 装载
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const lading = async (params) => {
|
|
const res = await request.post("Store/Lading", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 删除装载
|
|
* @param {Object} params 删除参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const ladingDelete = async (params) => {
|
|
const res = await request.post("Store/LadingDelete", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取装载信息
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const ladingInfo = async (params) => {
|
|
const res = await request.post("Store/LadingInfo", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 获取商店装载列表
|
|
* @param {Object} params 查询参数
|
|
* @returns {Promise<any>}
|
|
*/
|
|
export const storeLadingList = async (params) => {
|
|
const res = await request.post("Store/StoreLadingList", params);
|
|
if (res.code == 0) {
|
|
return res.data;
|
|
}
|
|
return null;
|
|
}
|