From 2d824e3fd91927fd02ef0d8b4a7dae35c69fc52e Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Tue, 30 Apr 2024 16:02:25 +0800
Subject: [PATCH] first
---
src/router/router.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/router/router.js b/src/router/router.js
index a881ce0..0729e6f 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -3,6 +3,7 @@
import store from "../store";
Vue.use(Router);
import { Toast } from "vant";
+import i18n from "@/i18n";
const router = new Router({
scrollBehavior(to, from, savedPosition) {
@@ -109,7 +110,7 @@
//提现页面
path: "/withdraw/withdrawPage",
name: "withdrawPage",
- meta: { index: 9 },
+ meta: { index: 9, kyc: true, requireAuth: true },
component: () =>
import(
/* webpackChunkName: "withdrawPage" */ /* webpackPrefetch: true */ "@/page/withdraw/withdrawPage.vue"
@@ -1376,15 +1377,18 @@
// 判断该路由是否需要登录权限
if (store.state.user.userInfo.token) {
// 通过vuex state获取当前的token是否存在
+
+ if (to.meta.kyc && store.state.user.kyc !== 2) {
+ return Toast.fail(i18n.t("请先实名认证!"));
+ }
if (to.meta.isMerchant) {
if (store.state.user.userInfo.c2c_user_type !== 0) {
next();
} else {
- Toast(this.$t("您不是承兑商"));
+ Toast.fail(i18n.t("您不是承兑商!"));
+
next("/");
}
- } else {
- next();
}
next();
} else {
--
Gitblit v1.9.3