Files
HTFX-CRM-APP/services/home/home.ts
2025-07-07 15:55:44 +08:00

426 lines
8.9 KiB
TypeScript
Raw 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 { UserLanguage } from '@/utils/const';
import { request } from '@/utils/request';
/**
* 查询菜单列表
* GET /app/login/queryMenuList
* 接口ID201380554
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-201380554
* @return
*/
export function queryMenuList() {
return request({ url: '/api/app/login/queryMenuList', method: 'GET' });
}
/**
* 查询公告列表
* GET /app/notice/getNoticeByUserId
* 接口ID191216197
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-191216197
* @return
*/
export function getNotice() {
return request({ url: '/api/app/notice/getNoticeByUserId', method: 'GET' });
}
/**
* 设置公告为已读
* GET /app/notice/setNoticeReadStatus
* 接口ID191223041
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-191223041
* @param {{ id: number }} data
* @return
*/
export function setNoticeReadStatus(data: { id: number }) {
return request({ url: '/api/app/notice/setNoticeReadStatus', method: 'POST', data });
}
type QueryMTAccountsParams = {
/**
* 语言
*/
language?: string;
/**
* mt服务器编码
*/
mt4_server?: string;
/**
* mt服务器类型livetest
*/
server_type?: string;
};
/**
* 我的账户列表
* GET /app/customer/getMtTableInfo
* 接口ID189675257
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-189675257
* @param {QueryMTAccountsParams} data
* @return
*/
export function getMTAccounts(data: QueryMTAccountsParams) {
return request({ url: '/api/app/customer/getMtTableInfo', method: 'GET', data });
}
/**
* 我的账户列表2(过滤禁止出金账号)
* GET /app/customer/getMtTableInfo2
*/
export function getMTAccounts2(data: QueryMTAccountsParams) {
return request({ url: '/api/app/customer/getMtTableInfo2', method: 'GET', data });
}
/**
* 我的账户列表2(过滤禁止出金账号)
* GET /app/customer/getMtTableInfo2
*/
export function getIfChargeCommission() {
return request({ url: '/api//app/common/getIfChargeCommission', method: 'GET'});
}
/**
* 查询IB佣金钱包余额
* GET /app/ibHome/getIbFund
* 接口ID189653470
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-189653470
* @return
*/
export function getIbFund() {
return request({ url: '/api/app/ibHome/getIbFund', method: 'GET' });
}
export function getIbFundSum() {
return request({ url: '/api/app/ibHome/getIbFundSum', method: 'GET' });
}
type UpdateMTPasswordParams = {
/**
* 邮箱
*/
email: string;
/**
* MT账号
*/
mt4_login: string;
/**
* MT密码
*/
mt4_password: string;
/**
* MT 观摩密码
*/
mt4_password_investor: string;
/**
* MT服务器编码
*/
mt4_server: string;
/**
* 语言
*/
qcc_language: string;
/**
* 签名
*/
sign: string;
};
/**
* 修改MT账户密码
* POST /app/customer/editOwnMtPassword
* 接口ID193270891
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-193270891
* @param {UpdateMTPasswordParams} data
* @return
*/
export function updateMTPassword(data: UpdateMTPasswordParams) {
return request({ url: '/api/app/customer/editOwnMtPassword', method: 'POST', data });
}
type QueryMyTradeListParams = {
curr_page: string;
/**
* mt账号
*/
mt4_login: string;
/**
* mt服务器编码
*/
mt4_server: string;
/**
* 开仓结束时间格式2024-06-01
*/
open_time_end?: string;
/**
* 开仓开始时间格式2024-05-01
*/
open_time_start?: string;
page_size: string;
/**
* 语言
*/
qcc_language: string;
};
/**
* 我的交易列表
* GET /app/customer/queryMyTradeList
* 接口ID190867176
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-190867176
* @param {QueryMyTradeListParams} data
* @return
*/
export function getMyTradeList(data: QueryMyTradeListParams) {
return request({ url: '/api/app/customer/queryMyTradeList', method: 'GET', data });
}
type UpdateLeverageParams = {
/**
* 申请备注
*/
apply_opinion?: string;
/**
* 新杠杆
*/
mt4_leverage_new: string;
/**
* 旧杠杆
*/
mt4_leverage_old: string;
/**
* MT账号
*/
mt4_login: string;
/**
* MT服务器编码
*/
mt4_server: string;
/**
* 语言
*/
qcc_language: string;
/**
* 安全密码
*/
safe_pass: string;
};
/**
* 申请调整杠杆
* POST /app/customer/editMtLeverage
* 接口ID194207303
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-194207303
* @param {UpdateLeverageParams} data
* @return
*/
export function updateLeverage(data: UpdateLeverageParams) {
return request({ url: '/api/app/customer/editMtLeverage', method: 'POST', data });
}
type SendCodeMTParams = {
/**
* 邮箱
*/
email: string;
/**
* MT账户
*/
mt4_login: string;
/**
* 语言
*/
qcc_language: string;
};
/**
* 修改MT交易密码发送验证码
* POST /app/customer/sendCode
* 接口ID194467394
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-194467394
* @param {SendCodeMTParams} data
* @return
*/
export function sendCodeMT(data: SendCodeMTParams) {
return request({ url: '/api/app/customer/sendCode', method: 'POST', data });
}
type CheckCodeMTParams = {
/**
* 验证码
*/
code: string;
/**
* 邮箱
*/
email: string;
/**
* 语言
*/
qcc_language: string;
};
/**
* 修改MT交易密码校验验证码
* POST /app/customer/checkCode
* 接口ID194468274
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-194468274
* @param {CheckCodeMTParams} data
* @return
*/
export function checkCodeMT(data: CheckCodeMTParams) {
return request({ url: '/api/app/customer/checkCode', method: 'POST', data });
}
/**
* 我的已归档列表
* GET /app/customer/queryHistoryMtLogin
* 接口ID195565510
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-195565510
* @return
*/
export function getHistoryMtLogin() {
return request({
url: '/api/app/customer/queryHistoryMtLogin',
method: 'GET',
data: {
language: UserLanguage
}
});
}
type QueryMTTypeListParams = {
/**
* 返回的id值
*/
id?: string;
/**
* 语言
*/
qcc_language?: string;
};
/**
* 查询开户MT类型列表
* GET /app/customer/queryMtTypeList
* 接口ID195684199
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-195684199
* @param {QueryMTTypeListParams} data
* @return
*/
export function getMTTypeList(data: QueryMTTypeListParams) {
return request({
url: '/api/app/customer/queryMtTypeList',
method: 'GET',
data
});
}
export function getMTDemoTypeList(data: QueryMTTypeListParams) {
return request({
url: '/api/app/customer/queryMtTypeListByDemo',
method: 'GET',
data
});
}
/**
* 查询开户申请待审核数量
* GET /app/customer/getApplyMTAwaitAuditNum
* 接口ID195717460
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-195717460
* @return
*/
export function getApplyMTAwaitAuditNum() {
return request({
url: '/api/app/customer/getApplyMTAwaitAuditNum',
method: 'GET'
});
}
type SaveApplyMTParams = {
/**
* 申请备注
*/
apply_opinion: string;
/**
* 初始金额
*/
mt4_init_amount: string;
/**
* 杠杆
*/
mt4_leverage: string;
/**
* 交易密码
*/
mt4_password: string;
/**
* MT服务器
*/
mt4_server: string;
/**
* MT类型id
*/
mt4_type_id: string;
};
export function saveApplyMT(data: SaveApplyMTParams) {
return request({
url: '/api/app/customer/saveApplyMT',
method: 'POST',
data
});
}
type QueryApplyLeverageListParams = {
mt_login?: string;
mt_server?: string;
};
/**
* 查询申请杠杆列表
* GET /app/customer/queryApplyLeverageList
* 接口ID196978871
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-196978871
* @param {QueryApplyLeverageListParams} data
* @return
*/
export function getApplyLeverageList(data: QueryApplyLeverageListParams) {
return request({ url: '/api/app/customer/queryApplyLeverageList', method: 'GET', data });
}
type SavePlaceFileParams = {
/**
* MT账户记录的主键id
*/
id: string;
};
/**
* 保存MT账户归档
* POST /app/customer/savePlaceFile
* 接口ID197975965
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-197975965
* @param {SavePlaceFileParams} data
* @return
*/
export function savePlaceFile(data: SavePlaceFileParams) {
return request({ url: '/api/app/customer/savePlaceFile', method: 'POST', data });
}
/**
* 查询轮播图接口
* GET /app/common/queryBannerList
* 接口ID189645015
* 接口地址https://app.apifox.com/link/project/4728063/apis/api-189645015
* @param {number} position 1 首页
* @return
*/
export function getSwiperList(position: number) {
return request({
url: '/api/app/common/queryBannerList',
method: 'GET',
data: {
qcc_language: UserLanguage,
position,
type: 1 //1移动端2PC
}
});
}
export function cancelFundApply(url: string, data: Record<string, any>) {
return request({
url: `/api${url}`,
method: 'POST',
data
});
}