You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

184 lines
4.5 KiB

11 months ago
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {FormMerSettledApply, MerchantListQuery, MerchantProductSeach} from '~/types/merchant'
import { PageQuery } from '~/types/global'
/**
* -id集合加载
*/
export const getMerListbyidsApi = (ids: string) => {
return $request.get({ url: `index/merchant/listbyids/${ids}` })
}
/**
*
* @param
*/
export const indexMerListApi = () => {
return $request.get({ url: `index/merchant/list` })
}
/**
*
* @param
*/
export const merchantRecommendApi = (id:number) => {
return $request.get({ url: `front/merchant/pc/${id}/recommend/product` })
}
/**
*
* @param number id
*/
export const getMerDetailApi = (id: number) => {
return $request.get({ url: `merchant/detail/${id}` })
}
/**
*
* @param id
*/
export const getMerIndexInfoApi = (id: number) => {
return $request.get({ url: `front/merchant/pc/index/${id}` })
}
/**
*
* @param data
*/
export const getMerSearchApi = (params: MerchantListQuery) => {
return $request.get({ url: `front/merchant/search/list`, params })
}
/**
*
* @param params
*/
export const getMerSettledApplyApi = (params: FormMerSettledApply) => {
return $request.post({ url: `front/merchant/settled/apply`, params })
}
/**
*
* @param params data
*/
export const getMerSettledRecordApi = (params: PageQuery) => {
return $request.get({ url: `front/merchant/settled/record`, params })
}
/**
*
* @param params
*/
export const getMerStreetApi = (params: PageQuery) => {
return $request.get({ url: `front/merchant/street`, params })
}
/**
*
* @param params
*/
export const getMerProListApi = (params: MerchantProductSeach) => {
return $request.get({ url: `front/product/merchant/pro/list`, params })
}
/**
*
* @param id
*/
export const getMerCategoryApi = (id: number) => {
return $request.get({ url: `front/merchant/product/category/cache/tree/${id}` })
}
/**
*
* @param id number
*/
export const getMerCollectAddApi = (id: number) => {
return $request.post({ url: `front/collect/add/merchant/${id}` })
}
/**
*
* @param id
*/
export const getMerCollectCancelApi = (id: number) => {
return $request.post({ url: `front/collect/cancel/merchant/${id}` })
}
/**
*
* @param Obj data
*/
export const getMerCollectListApi = (data: any) => {
return $request.get({ url: `front/collect/merchant/list`, data })
}
/**
*
*/
export const getMerCategoryListApi = () => {
return $request.get({ url: `front/merchant/all/category/list` })
}
/**
*
*/
export const getMerTypeListApi = () => {
return $request.get({ url: `front/merchant/all/type/list` })
}
/**
*
*/
export const settledAgreementApi = () => {
return $request.get({ url: `merchant/settled/agreement` })
}
/**
*
*/
export const takeTheirApi = (id: number) => {
return $request.get({ url: `merchant/get/take/their/${id}` })
}
/**
*
*/
export const sendSettledCodeApi = (params: { phone: string }) => {
return $request.post({ url: `front/merchant/send/settled/code`, params })
}
/**
*
*/
export const merCustomerApi = (id: number) => {
return $request.get({ url: `front/merchant/customer/service/info/${id}` })
}
/**
*
*/
export const getDiyMerListApi = (num: number) => {
return $request.get({ url: `index/merchant/list/${num}` })
}
/**
*
*/
export const couponReceiveApi = (id: number) => {
return $request.post({ url: `front/coupon/receive/${id}` })
}
/**
*
*/
export const merchantAddressApi = (id: number) => {
return $request.get({ url: `front/merchant/get/address/${id}` })
}