登录页面调整
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 用户信息相关接口
|
||||
*/
|
||||
import type { LoginParams, LoginResult } from './types';
|
||||
import type { LoginParams, LoginResult, RegisterParams } from './types';
|
||||
import { get, post } from '@/utils/request';
|
||||
import type { UserState } from '@/store/modules/user/types';
|
||||
|
||||
@@ -9,6 +9,7 @@ enum URL {
|
||||
// login = '/member/login',
|
||||
login = '/wc/wechat/LoginByMa',
|
||||
loginByCode = '/wc/wechat/LoginByMaCode',
|
||||
register = '/wc/wechat/register',
|
||||
logout = '/user/logout',
|
||||
profile = '/user/profile',
|
||||
addressList = '/ext/addr/list',
|
||||
@@ -22,6 +23,9 @@ enum URL {
|
||||
export const getUserProfile = () => get<UserState>({ url: URL.profile });
|
||||
export const login = (data: LoginParams) => post<LoginResult>({ url: URL.login, data });
|
||||
export const loginByCode = (code: string, companyId: string) => post<any>({ url: URL.loginByCode + `?code=${code}` });
|
||||
|
||||
export const register = (data: RegisterParams) => post<LoginResult>({ url: URL.register, data });
|
||||
|
||||
export const logout = () => post<any>({ url: URL.logout });
|
||||
|
||||
export const getAddressList = () => get<any>({ url: URL.addressList });
|
||||
@@ -31,3 +35,9 @@ export const addressUpdate = (data: any) => post<any>({ url: URL.addressUpdate,
|
||||
export const addressDelete = (id: string) => post<any>({ url: URL.addressDelete + `?id=${id}` });
|
||||
|
||||
export const getDynamicCode = () => post<any>({ url: URL.dynamicCode });
|
||||
|
||||
export const getCouponList = (params: {
|
||||
obj: { memberId: string, status: number },
|
||||
pageNum: number,
|
||||
pageSize: number
|
||||
}) => get<any>({ url: '/couponseUse/pageList' });
|
||||
|
Reference in New Issue
Block a user