feat: 功能
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
|
||||
import api from '@/api/http'
|
||||
import { setToken, getRefreshToken } from '@/utils/auth'
|
||||
import { API_BASE } from '@/api/config'
|
||||
// 使用公共配置
|
||||
import { API_BASE } from '@gold/config/api'
|
||||
|
||||
const SERVER_BASE = API_BASE.APP_MEMBER
|
||||
|
||||
@@ -191,6 +192,17 @@ export async function resetPasswordBySms(mobile, newPassword, smsCode) {
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息(C端)
|
||||
* GET /member/user/get
|
||||
*
|
||||
* @returns {Promise<Object>} 用户信息对象
|
||||
*/
|
||||
export async function getUserInfo() {
|
||||
const { data } = await api.get(`${SERVER_BASE}/user/get`)
|
||||
return data || {}
|
||||
}
|
||||
|
||||
/**
|
||||
* “手机+验证码+密码注册”组合流程(基于短信登录即注册 + 设置密码)
|
||||
* 说明:
|
||||
@@ -235,4 +247,5 @@ export default {
|
||||
sendResetPasswordCode,
|
||||
resetPasswordBySms,
|
||||
registerWithMobileCodePassword,
|
||||
getUserInfo,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user