feat: 新增登录功能交互

This commit is contained in:
duanshuwen
2025-07-26 17:57:25 +08:00
parent 5321b27176
commit 00c2b9e2d7
20 changed files with 393 additions and 100 deletions

View File

@@ -1,14 +1,26 @@
import request from "../base/request";
function login(args) {
const wxLogin = (args) => {
const config = {
header: {
Authorization: 'Basic Y3VzdG9tOmN1c3RvbQ==', // 可在此动态设置 token
'Content-Type': 'application/x-www-form-urlencoded'
},
header: {
'Authorization': 'Basic Y3VzdG9tOmN1c3RvbQ==', // 可在此动态设置 token
'Content-Type': 'application/x-www-form-urlencoded'
},
};
uni.setStorageSync('token', '')
return request.post('/auth/oauth2/token', args, config);
return request.post('/auth/oauth2/token', args, config);
}
export { login }
// 绑定用户手机号
const bindUserPhone = (args) => {
return request.post('/hotelBiz/user/bindUserPhone', args);
}
// 检测用户是否绑定手机号
const checkUserPhone = (args) => {
return request.get('/hotelBiz/user/checkUserHasBindPhone', args);
}
export { wxLogin, bindUserPhone, checkUserPhone }