|
|
@@ -6,7 +6,7 @@ import { userToken } from "@/composables/config";
|
|
|
import { userApi } from "@/api/user";
|
|
|
import { ucardApi } from "@/api/ucard";
|
|
|
import { customApi } from "@/service/custom";
|
|
|
-
|
|
|
+import useGlobalStore from '@/stores/use-global-store'
|
|
|
import useUserStore from "@/stores/use-user-store";
|
|
|
import useRouter from "@/hooks/useRouter";
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
@@ -14,6 +14,8 @@ import logoImage from "/static/images/logo3.png";
|
|
|
const router = useRouter();
|
|
|
const { t } = useI18n();
|
|
|
const userStore = useUserStore();
|
|
|
+const globalStore = useGlobalStore();
|
|
|
+const modeStore = computed(() => globalStore.mode);
|
|
|
// 响应式表单数据
|
|
|
const form = ref({
|
|
|
loginName: "",
|
|
|
@@ -83,7 +85,7 @@ async function getCustomLoginInfo() {
|
|
|
const res = await userApi.getUserInfo();
|
|
|
userStore.saveUserInfo(res.data);
|
|
|
if (res.code === 200) {
|
|
|
- router.push("/pages/customer/index");
|
|
|
+ router.reLaunch(modeStore.value === 'customer' ? "/pages/customer/index" : "/pages/ib/index");
|
|
|
} else {
|
|
|
uni.$u.toast(res.msg || t("login.msg0"));
|
|
|
}
|