用户登录流程开发接口对接

This commit is contained in:
唐明明
2021-08-09 17:20:38 +08:00
parent 3c3d946eb5
commit bfea54eb8f
37 changed files with 8399 additions and 8539 deletions

View File

@@ -30,6 +30,9 @@ const request = (parameter) => {
'Accept': 'application/json',
'Authorization': store.getters.getToken || ''
}
console.log('发送数据调试用', parameter)
// 请求实例
return new Promise((resolve, reject) => {
uni.request({
@@ -83,9 +86,6 @@ const errToast = (code) => {
icon : 'none'
})
break;
case 401:
console.log('重新登录')
break;
}
}

View File

@@ -9,7 +9,7 @@
import request from '../index'
// 一键登录
const auth = (data) => {
const keyAuth = (data) => {
return request({
url: 'user/socialite/login/unicloud/app',
method: 'POST',
@@ -17,6 +17,26 @@ const auth = (data) => {
})
}
export {
auth
// 验证码登录
const smsAuth = (data) =>{
return request({
url: "user/auth/sms",
method: 'POST',
data: data
})
}
// 获取验证码
const getSms = (data) =>{
return request({
url: "user/auth/verify",
method: 'POST',
data: data
})
}
export {
keyAuth,
smsAuth,
getSms
}