我正在尝试使用模式创建路由,当您使用router-link访问此路由器路径时,在当前页面上方显示模式,或者如果我直接从url访问,则在上方显示具有模式的索引。
例如:我在http:// localhost / profile / 1中,然后单击侧边栏“创建团队”,URL更改为http:// localhost / team / create,但是模式后面的页面仍然是http:// localhost /配置文件/ 1。
这是我正在尝试的代码:
路由器:
Vue.component('modal', Modal);
export default new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'Hello',
component: require('@/components/Hello'),
meta: { auth: false }
},
{
path: '/team',
name: 'team',
component: require('@/components/team/Index'),
meta: { auth: true },
},
{
path: '/team/create',
name: 'CreateTeam',
components: {
b: CreateTeam
},
meta: { auth: true }
},
]
})
Run Code Online (Sandbox Code Playgroud)
应用程序
<template>
<router-view></router-view> …Run Code Online (Sandbox Code Playgroud) 我在 2 个不同的域 domain1.tld 和 domain2.tld 中创建了 2 个项目。
domain1.tld 是主要的事件生产者页面,而 domain2.tld 是其事件之一。我想共享相同的会话(它们实际上共享相同的数据库和相同的 apache 服务器)。我试图将会话驱动程序更改为“数据库”并创建一个会话表,但没有任何反应,如果我登录 domain1.tld,则在 domain2.tld 中没有任何反应。
我真的在网上搜索过,但我什么也没找到
我知道护照使用oAuth,但我的问题是..是否更好地使用Passport进行身份验证(登录和注册)或者我应该使用jwt进行登录和注册以及Passport进行外部API请求......或者使用护照进行外部API请求API和登录/ AUTH)
现在我用laravel和VueJs 2编写一个SPA网站,我陷入了困境.