zzzz
2024-04-21 3f3e2d5977787b0c6e09cd5cba7b41e5fb7d3fd0
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,17 @@
    // 判断该路由是否需要登录权限
    if (store.state.user.userInfo.token) {
      // 通过vuex state获取当前的token是否存在
      if (to.meta.kyc && store.state.user.userInfo.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 {