167 lines
5.8 KiB
TypeScript
167 lines
5.8 KiB
TypeScript
import Http from '@/api';
|
||
// 导出一个函数,用于获取行业树
|
||
export const fetchIndustriesTree = (params = {}) => {
|
||
// 发送GET请求,获取行业树
|
||
return Http.get('/v1/industries/tree', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取菜单树
|
||
export const fetchMenusTree = (params = {}) => {
|
||
// 使用Http.get方法,发送GET请求,获取菜单树
|
||
return Http.get('/v1/menus/tree', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取行业话题列表
|
||
export const fetchIndustryTopics = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-topics/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取行业话题详情
|
||
export const fetchIndustryTopicDetail = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-topics/' + params, {});
|
||
};
|
||
|
||
export const fetchindustryTerms = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-terms/list', params);
|
||
};
|
||
|
||
// 导出一个函数fetchKeywordTrendsList,用于获取行业话题列表
|
||
export const fetchKeywordTrendsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-keyword-trends/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取行业话题列表
|
||
export const fetchIndustryEmotions = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-emotions', params);
|
||
};
|
||
|
||
export const fetchNewKeywordList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-new-keywords/list', params);
|
||
};
|
||
|
||
export const fetchNewKeywordDetail = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/industry-new-keywords/' + params, {});
|
||
};
|
||
|
||
// 导出一个函数fetchUserPainPointsList,用于获取用户痛点列表
|
||
export const fetchUserPainPointsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/user-pain-points/list', params);
|
||
};
|
||
|
||
// 导出一个函数fetchUserPainPointsDetail,用于获取用户痛点详情
|
||
export const fetchUserPainPointsDetail = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/user-pain-points/' + params, {});
|
||
};
|
||
|
||
// 导出一个函数fetchFocusBrandsList,用于获取行业话题列表
|
||
export const fetchFocusBrandsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/focus-brands/list', params);
|
||
};
|
||
|
||
// 导出一个函数fetchFocusBrandsList,用于获取行业话题列表
|
||
// 导出一个函数,用于获取行业话题列表
|
||
export const fetchEventDynamicsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取行业话题列表
|
||
return Http.get('/v1/event-dynamics/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取年龄分布列表
|
||
export const fetchAgeDistributionsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取年龄分布列表
|
||
return Http.get('/v1/age-distributions/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取地理分布列表
|
||
export const fetchGeoDistributionsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取地理分布列表
|
||
return Http.get('/v1/geo-distributions/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取性别分布列表
|
||
export const fetchGenderDistributionsList = (params: any) => {
|
||
// 使用Http.get方法,发送GET请求,获取性别分布列表
|
||
return Http.get('/v1/gender-distributions/list', params);
|
||
};
|
||
|
||
// 导出一个函数,用于获取产品列表
|
||
export const fetchProductList = () => {
|
||
// 使用Http.get方法,发送GET请求,获取产品列表
|
||
return Http.get('/v1/products/list');
|
||
};
|
||
|
||
// 导出一个函数,用于获取成功案例列表
|
||
export const fetchSuccessCaseList = () => {
|
||
// 使用Http.get方法,发送GET请求,获取成功案例列表
|
||
return Http.get('/v1/success-cases/list');
|
||
};
|
||
|
||
// 试用产品
|
||
export const trialProduct = (id: number) => {
|
||
return Http.post(`/v1/products/${id}/try`);
|
||
};
|
||
|
||
// 修改企业名称
|
||
export const updateEnterpriseName = (data: any) => {
|
||
return Http.patch(`/v1/enterprises/name`, data);
|
||
};
|
||
|
||
// 发送修改手机号验证码
|
||
export const sendUpdateMobileCaptcha = (data: any) => {
|
||
return Http.post(`/v1/sms/update-mobile-captcha`, data);
|
||
};
|
||
|
||
// 修改绑定的手机号
|
||
export const updateMobile = (data: any) => {
|
||
return Http.post(`/v1/me/mobile`, data);
|
||
};
|
||
|
||
// 修改我的信息
|
||
export const updateMyInfo = (data: any) => {
|
||
return Http.put(`/v1/me`, data);
|
||
};
|
||
|
||
// 获取企业账号分页
|
||
export const fetchSubAccountPage = (params: any) => {
|
||
return Http.get(`/v1/enterprises/users`, params);
|
||
};
|
||
|
||
// 获取企业账号分页
|
||
export const fetchImageUploadFile = (params: any) => {
|
||
return Http.get(`/v1/oss/image-pre-signed-url`, params);
|
||
};
|
||
|
||
// 获取预上传文件后缀
|
||
export const fetchUploadFile = (params: any) => {
|
||
return Http.get(`/v1/oss/file-pre-signed-url`, params);
|
||
};
|
||
|
||
// 移除企业子账号
|
||
export const removeEnterpriseAccount = (userId: number) => {
|
||
return Http.delete(`/v1/enterprises/users/${userId}`);
|
||
};
|
||
|
||
// 获取企业邀请码
|
||
export const getEnterpriseInviteCode = () => {
|
||
return Http.get(`/v1/enterprises/invite-code`);
|
||
};
|
||
|
||
// 根据邀请码获取企业信息
|
||
export const getEnterpriseByInviteCode = (inviteCode: string) => {
|
||
return Http.get(`/v1/enterprises/by-invite-code`, { invite_code: inviteCode });
|
||
};
|
||
|
||
// 根据邀请码加入企业
|
||
export const joinEnterpriseByInviteCode = (inviteCode: string) => {
|
||
return Http.post(`/v1/enterprises/join`, { invite_code: inviteCode });
|
||
};
|