work-order/work-order-uniapp/api/app/mch.js
2025-07-27 20:34:15 +08:00

60 lines
1.0 KiB
JavaScript
Raw Permalink 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'
/**
* 商户申请
* @param {Object} data - 商户信息
* @returns {Promise}
*/
export function applyMch(data) {
return request({
url: '/app/mch',
method: 'post',
data
})
}
/**
* 获取商户列表
* @param {Object} query - 查询参数
* @returns {Promise}
*/
export function getMchList(query) {
return request({
url: '/app/mch/list',
method: 'get',
params: query
})
}
/**
* 获取商户详情
* @param {Number} id - 商户ID
* @returns {Promise}
*/
export function getMchDetail(id) {
return request({
url: `/app/mch/${id}`,
method: 'get'
})
}
/**
* 修改商户信息
* @param {Object} data - 商户信息需包含商户ID及需修改的字段
* @returns {Promise}
* @description
* 用于修改商户信息,需传入完整的商户数据对象。接口会校验当前用户是否有权限修改该商户。
*/
export function updateMch(data) {
return request({
url: '/app/mch',
method: 'put',
data
})
}