feat: 优化登录流程
This commit is contained in:
@@ -3,8 +3,8 @@ import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
import { getEvnUrl } from "@/request/api/config";
|
||||
import { refreshToken } from "@/hooks/useGoLogin";
|
||||
|
||||
onLaunch(() => {
|
||||
getEvnUrl({ versionValue: "1.0.2" });
|
||||
onLaunch(async () => {
|
||||
await getEvnUrl({ versionValue: "1.0.3" });
|
||||
refreshToken();
|
||||
});
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ import {
|
||||
getServiceAgreement,
|
||||
getPrivacyAgreement,
|
||||
} from "@/request/api/LoginApi";
|
||||
import { onLogin, goBack, loginAuth, refreshToken } from "@/hooks/useGoLogin";
|
||||
import { onLogin, goBack, refreshToken } from "@/hooks/useGoLogin";
|
||||
import CheckBox from "@/components/CheckBox/index.vue";
|
||||
import AgreePopup from "./components/AgreePopup/index.vue";
|
||||
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||
|
||||
@@ -3,14 +3,11 @@ import { isProd } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
|
||||
// 获取服务地址
|
||||
const getEvnUrl = (args) => {
|
||||
if (isProd) {
|
||||
const getEvnUrl = async (args) => {
|
||||
const res = await request.post("https://biz.nianxx.cn/hotelBiz/mainScene/getServiceUrl", args)
|
||||
if (res && res.code == 0 && res.data) {
|
||||
const appStore = useAppStore();
|
||||
request
|
||||
.post("https://biz.nianxx.cn/hotelBiz/mainScene/getServiceUrl", args)
|
||||
.then(({ data }) => {
|
||||
appStore.setServerConfig(data);
|
||||
});
|
||||
appStore.setServerConfig(res.data);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import { getCurrentConfig } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
|
||||
import { getStorageSyncToken } from "@/constant/token";
|
||||
import { removeStorageSyncToken } from "@/constant/token";
|
||||
|
||||
const clientId = getCurrentConfig().clientId;
|
||||
const defaultConfig = {
|
||||
|
||||
Reference in New Issue
Block a user