12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import request from '@/utils/request'
- // 查询代理商列表
- export function listAgent(query) {
- return request({
- url: '/module/agent/list',
- method: 'get',
- params: query
- })
- }
- // 查询客户商家列表
- export function listMerchant(query) {
- return request({
- url: '/module/merchant/list',
- method: 'get',
- params: query
- })
- }
- // 查询门店列表
- export function listShop(query) {
- return request({
- url: '/module/agent/shopListByAgentId',
- method: 'get',
- params: query
- })
- }
- // 查询代理商详细
- export function getAgent(id) {
- var url = '/module/agent/info'
- if (id != undefined){
- url = '/module/agent/info?id=' + id
- }
- return request({
- url: url,
- method: 'get'
- })
- }
- // 新增代理商
- export function addAgent(data) {
- return request({
- url: '/module/agent',
- method: 'post',
- data: data
- })
- }
- // 修改代理商
- export function updateAgent(data) {
- return request({
- url: '/module/agent',
- method: 'put',
- data: data
- })
- }
- // 删除代理商
- export function delAgent(id) {
- return request({
- url: '/module/agent/' + id,
- method: 'delete'
- })
- }
- // 导出代理商
- export function exportAgent(query) {
- return request({
- url: '/module/agent/export',
- method: 'get',
- params: query
- })
- }
- export function getLoginUser() {
- return request({
- url: '/module/agent/getLoginUser',
- method: 'get'
- })
- }
|