| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import type { UserInfo } from '~/stores/use-transfer-store'
- import { post, get } from '@/utils/request';
- export interface LoginParams {
- loginName: string
- password: string
- }
- export interface TokenInfo {
- data: string
- }
- export interface RegisterParams extends LoginParams {
- email: string
- phone: string
- }
- export interface ResetPasswordParams {
- email: string
- code: string
- newPassword: string
- }
- export const userApi = {
- // 登录
- login: (params: LoginParams) => {
- return post<string>('/custom/login', params)
- },
- // 获取用户信息
- getUserInfo: () => {
- return post<UserInfo>('/custom/info')
- },
- // 获取用户信息
- getUserSingle: () => {
- return post<UserInfo>('/wasabi/api/merchant/user/single', {
- // uniqueId: '63dbefafc83e4b47bc2364a8f6266450',
- })
- },
- // 退出登录
- logout: () => {
- return post('/custom/logout', {})
- },
- // 忘记密码
- forgetPwd: (params: { email: string }) => {
- return post('/custom/update/password/send/email', params)
- },
- // 账户
- accountDropdown: (params = {}) => {
- return post('/wasabi/api/account/dropdown', params)
- },
- // 修改密码
- updateEmailPassword: (params = {}) => {
- return post('/custom/update/login/password', params)
- },
- // 获取客户经理信息
- getManagerInfo: () => {
- return post('/chat/get/manager/info', {})
- },
- // 获取客户经理信息
- getChatToken: () => {
- return post('/chat/token/create', {})
- },
- // 获取APP扫描登录
- getAppScanLogin: () => {
- return post('/custom/app/scan/login/create', {})
- },
- // 扫码确认
- confirmAppScanLogin: (params: { scene: string }) => {
- return post('/custom/app/scan/login/confirm', params)
- },
- // 查询扫码状态
- getAppScanLoginStatus: (params: { scene: string }) => {
- return post('/custom/app/scan/login/status', params)
- },
- // 更新扫码状态
- updateAppScanLoginStatus: (params: { scene: string; status: string }) => {
- return post('/custom/app/scan/login/status/update', params)
- },
- }
|