51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
|
|
import { post } from '@/utils/request'
|
||
|
|
import { get } from '../utils/request'
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 代理商相关API接口
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 申请成为代理商
|
||
|
|
* @param {Object} data - 代理商申请信息
|
||
|
|
* @param {string} data.name - 姓名
|
||
|
|
* @param {string} data.phone - 手机号
|
||
|
|
* @param {string} data.idCard - 身份证号
|
||
|
|
* @param {string} data.regionId - 行政区ID
|
||
|
|
* @param {string} data.address - 详细地址
|
||
|
|
* @returns {Promise} 返回申请结果
|
||
|
|
*/
|
||
|
|
export function applyForAgent(data) {
|
||
|
|
return post('/app/agent', data)
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 获取代理商申请状态
|
||
|
|
* @param {string} phone - 手机号
|
||
|
|
* @returns {Promise} 返回申请状态
|
||
|
|
*/
|
||
|
|
export function getAgentApplicationStatus(phone) {
|
||
|
|
return post('/app/agent/status', { phone })
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 获取代理商协议
|
||
|
|
* @returns {Promise} 返回协议内容
|
||
|
|
*/
|
||
|
|
export function getAgentAgreement() {
|
||
|
|
return (
|
||
|
|
get('/app/article/getNew'),
|
||
|
|
{
|
||
|
|
type: 3, // 3表示代理商协议
|
||
|
|
}
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 获取服务区域列表
|
||
|
|
* @returns {Promise} 返回区域列表
|
||
|
|
*/
|
||
|
|
export function getServiceAreas() {
|
||
|
|
return get('/app/region')
|
||
|
|
}
|