12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- import http from './interface'
- //手机号登录
- export const login = (data) => {
- return http.request({
- url: '/home/v1/login',
- method:'POST',
- data,
- })
- }
- //退出登录
- export const logout = () => {
- return http.request({
- url: '/home/v1/logout',
- method:'GET',
- })
- }
- //使用手机号注册账户
- export const phoneReg = (data) => {
- return http.request({
- url: '/home/v1/reg/phone',
- method:'POST',
- data,
- })
- }
- /**
- * 修改密码
- * oldPwd 原密码
- * newPwd 新密码
- */
- export const updatePassword = (data) => {
- return http.request({
- url: '/home/v1/password/update',
- method:'POST',
- data,
- })
- }
- /**
- * 密码验证
- * oldPwd 原密码
- * newPwd 新密码
- */
- export const passwordValidation = (data) => {
- return http.request({
- url: '/home/v1/password/validation',
- method:'POST',
- data,
- })
- }
- /**
- * 检查是否登录
- * oldPwd 原密码
- * newPwd 新密码
- */
- export const hasLogin = () => {
- return http.request({
- url: '/home/v1/user/islogin',
- method:'GET'
- })
- }
- /**
- * 更新手机号
- * phone 手机号
- * code 手机验证码
- */
- export const updatePhone = (data) =>{
- return http.request({
- url: '/home/v1/user/phone/update',
- method:'POST',
- data,
- })
- }
- export default {
- login,
- logout,
- phoneReg,
- updatePassword,
- passwordValidation,
- updatePhone,
- hasLogin
- }
|