diff --git a/README.md b/README.md index 3d81106..dd52660 100644 --- a/README.md +++ b/README.md @@ -318,10 +318,10 @@ be imported. ``` 此时升级微信开发者工具,或者安装`@babel/plugin-proposal-private-property-in-object`依赖即可解决问题。 -### 捐赠 + diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 3c2b9c8..eb46fe5 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -2,21 +2,23 @@ * 用户信息相关接口 */ import type { CommonRes } from '@/api/common/types'; -import type { LoginByCodeReq, LoginByCodeRes, LoginReq, LoginRes, ProfileReq, ProfileRes } from './types'; +import type { LoginByCodeReq, LoginByCodeRes, LoginReq, LoginRes, ProfileRes } from './types'; import { get, post } from '@/utils/request'; /** 获取用户信息 */ -export const profile = (params?: ProfileReq) => get('/user/profile', { params }); +// export const profile = (params?: ProfileReq) => get('/user/profile', { params }); +export const profile = (data: any) => get('/api/user', { data, custom: { toast: false } }); /** 登录 */ -export const login = (data: LoginReq) => post('/user/login', { data, custom: { auth: false } }); +export const login = (data: LoginReq) => post('/api/auth/login', { data, custom: { auth: false } }); +// 账号登录 +export const passwordLogin = (data: any) => post('/api/auth/login', { data, custom: { toast: false } }); /** 验证码登录 */ export const loginByCode = (data: LoginByCodeReq) => post('/user/loginByCode', { data }); /** 退出登录 */ -export const logout = () => post('/user/logout'); - +export const logout = () => post('/api/logout'); export const goodsMenu = () => get('/api/config'); // export const goodsMenu = (data:any) => get('/api/config', { data, custom: { toast: false } }); diff --git a/src/api/user/types.ts b/src/api/user/types.ts index 6867b1d..82db2cb 100644 --- a/src/api/user/types.ts +++ b/src/api/user/types.ts @@ -7,12 +7,16 @@ export interface ProfileRes { user_name?: string; avatar?: string; token?: string; + user?: any; } - export interface LoginReq { phone: string; code: string; } +export interface LoginReqPassword { + account: string; + password: string; +} export interface LoginRes { token: string; diff --git a/src/pages/common/goods/order.vue b/src/pages/common/goods/order.vue index d0fd70b..21022e4 100644 --- a/src/pages/common/goods/order.vue +++ b/src/pages/common/goods/order.vue @@ -1,12 +1,15 @@ @@ -15,9 +18,11 @@ - + - 江阳区学校2016工作室放假咯解fafsf方法 18181941463 + 江阳区学校2016工作室放假咯解fafsf方法 + 18181941463 - + - @@ -47,9 +52,10 @@ - - \ No newline at end of file + }, +}); + diff --git a/src/pages/common/login/index.vue b/src/pages/common/login/index.vue index 369e773..d0833ee 100644 --- a/src/pages/common/login/index.vue +++ b/src/pages/common/login/index.vue @@ -4,22 +4,32 @@ 欢迎登录 - - - + + + + + + + + + + - - + 密码登录 + + 验证码登录 + + 遇到问题 @@ -52,20 +62,24 @@ + + -