| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import { httpRequest } from '@/services/http'
- import { HttpRequest } from '@/services/http/interface'
- import { tradeServerRequest } from '@/services/socket/trade'
- import { TradeRequest } from '@/services/socket/trade/interface'
- /**
- * 用户登录
- */
- export function login(params: TradeRequest<Proto.LoginReq, Proto.LoginRsp>) {
- return tradeServerRequest('LoginReq', 'LoginRsp', params);
- }
- /**
- * 用户令牌校验
- */
- export function tokenCheck(params: TradeRequest<Proto.TokenCheckReq, Proto.TokenCheckRsp>) {
- return tradeServerRequest('TokenCheckReq', 'TokenCheckRsp', params);
- }
- /**
- * 查询登录ID
- */
- export function queryLoginId(params: HttpRequest<{ req: { username: string }, rsp: string }>) {
- return httpRequest('/User/GetLoginID', 'get', params);
- }
- /**
- * 查询登录账户配置信息
- */
- export function queryLoginData(params: HttpRequest<{ req: Ermcp.LoginQueryReq, rsp: Ermcp.LoginQueryRsp }>) {
- return httpRequest('/User/LoginQuery', 'get', params);
- }
- /**
- * 查询账户菜单
- */
- export function queryAccountMenu(params: HttpRequest<{ rsp: Ermcp.UserMenu[] }>) {
- return httpRequest('/account/menu', 'get', params);
- }
- /**
- * 查询资金账户信息
- */
- export function queryTaAccounts(params: HttpRequest<{ req: Ermcp.TaAccountsReq, rsp: Ermcp.TaAccountsRsp[] }>) {
- return httpRequest('/TaAccount/GetTaAccounts', 'get', params);
- }
- /**
- * 查询账户角色
- */
- export function queryAccountRole(params: HttpRequest<{ rsp: Ermcp.UserRole[] }>) {
- return httpRequest('/account/role', 'get', params);
- }
|