123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- import request from '@/utils/request'
- /********************************* 物流公司 ***************************************/
- /**
- * 获取物流公司列表
- * @param params
- * @returns
- */
- export function getCompanyList(params: Record<string, any>) {
- return request.get(`mall/shop/delivery/company`, {params})
- }
- /**
- * 获取物流公司详情
- * @param company_id 物流公司company_id
- * @returns
- */
- export function getCompanyInfo(company_id: number) {
- return request.get(`mall/shop/delivery/company/${company_id}`);
- }
- /**
- * 添加物流公司
- * @param params
- * @returns
- */
- export function addCompany(params: Record<string, any>) {
- return request.post('mall/shop/delivery/company', params, {showErrorMessage: true, showSuccessMessage: true})
- }
- /**
- * 编辑物流公司
- * @param params
- * @returns
- */
- export function editCompany(params: Record<string, any>) {
- return request.put(`mall/shop/delivery/company/${params.company_id}`, params, {
- showErrorMessage: true,
- showSuccessMessage: true
- })
- }
- /**
- * 删除物流公司
- * @param company_id
- * @returns
- */
- export function deleteCompany(company_id: number) {
- return request.delete(`mall/shop/delivery/company/${company_id}`, {showErrorMessage: true, showSuccessMessage: true})
- }
- /********************************* 运费模版 ***************************************/
- /**
- * 获取运费模版分页列表
- * @param params
- * @returns
- */
- export function getShippingTemplatePageList(params: Record<string, any>) {
- return request.get(`mall/shop/shipping/template`, {params})
- }
- /**
- * 获取运费模版列表
- * @param params
- * @returns
- */
- export function getShippingTemplateList(params: Record<string, any>) {
- return request.get(`mall/shop/shipping/template/list`, {params})
- }
- /**
- * 获取物运费模版详情
- * @param template_id 运费模版template_id
- * @returns
- */
- export function getShippingTemplateInfo(template_id: number) {
- return request.get(`mall/shop/shipping/template/${template_id}`);
- }
- /**
- * 添加运费模版
- * @param params
- * @returns
- */
- export function addShippingTemplate(params: Record<string, any>) {
- return request.post('mall/shop/shipping/template', params, {showErrorMessage: true, showSuccessMessage: true})
- }
- /**
- * 编辑运费模版
- * @param params
- * @returns
- */
- export function editShippingTemplate(params: Record<string, any>) {
- return request.put(`mall/shop/shipping/template/${params.template_id}`, params, {
- showErrorMessage: true,
- showSuccessMessage: true
- })
- }
- /**
- * 删除运费模版
- * @param template_id
- * @returns
- */
- export function deleteShippingTemplate(template_id: number) {
- return request.delete(`mall/shop/shipping/template/${template_id}`, {showErrorMessage: true, showSuccessMessage: true})
- }
|