feat: 登录逻辑调整
This commit is contained in:
@@ -1,49 +1,49 @@
|
||||
import { removeStorageSyncToken } from "@/constant/token";
|
||||
import { removeAccessToken } from "@/constant/token";
|
||||
import request from "../base/request";
|
||||
|
||||
const wxLogin = (args) => {
|
||||
const config = {
|
||||
header: {
|
||||
Authorization: "Basic Y3VzdG9tOmN1c3RvbQ==", // 可在此动态设置 token
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
};
|
||||
const config = {
|
||||
header: {
|
||||
Authorization: "Basic Y3VzdG9tOmN1c3RvbQ==", // 可在此动态设置 token
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
};
|
||||
|
||||
removeStorageSyncToken();
|
||||
removeAccessToken();
|
||||
|
||||
return request.post("/auth/oauth2/token", args, config);
|
||||
return request.post("/auth/oauth2/token", args, config);
|
||||
};
|
||||
|
||||
// 绑定用户手机号
|
||||
const bindUserPhone = (args) => {
|
||||
return request.post("/hotelBiz/user/bindUserPhone", args);
|
||||
return request.post("/hotelBiz/user/bindUserPhone", args);
|
||||
};
|
||||
|
||||
// 检测用户是否绑定手机号
|
||||
const checkUserPhone = (args) => {
|
||||
return request.get("/hotelBiz/user/checkUserHasBindPhone", args);
|
||||
const checkUserPhone = (config) => {
|
||||
return request.get("/hotelBiz/user/checkUserHasBindPhone", {}, config);
|
||||
};
|
||||
|
||||
// 获取登录用户手机号
|
||||
const getLoginUserPhone = (args) => {
|
||||
return request.get("/hotelBiz/user/getLoginUserPhone", args);
|
||||
return request.get("/hotelBiz/user/getLoginUserPhone", args);
|
||||
};
|
||||
|
||||
// 获取服务协议
|
||||
const getServiceAgreement = (args) => {
|
||||
return request.get("/hotelBiz/mainScene/serviceAgreement", args);
|
||||
return request.get("/hotelBiz/mainScene/serviceAgreement", args);
|
||||
};
|
||||
|
||||
// 获取隐私协议
|
||||
const getPrivacyAgreement = (args) => {
|
||||
return request.get("/hotelBiz/mainScene/privacyPolicy", args);
|
||||
return request.get("/hotelBiz/mainScene/privacyPolicy", args);
|
||||
};
|
||||
|
||||
export {
|
||||
wxLogin,
|
||||
bindUserPhone,
|
||||
checkUserPhone,
|
||||
getLoginUserPhone,
|
||||
getServiceAgreement,
|
||||
getPrivacyAgreement,
|
||||
wxLogin,
|
||||
bindUserPhone,
|
||||
checkUserPhone,
|
||||
getLoginUserPhone,
|
||||
getServiceAgreement,
|
||||
getPrivacyAgreement,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user