0

我想知道对于以 laravel 6 作为后端 api 的 vue/cli/bootstrap-vue 项目/vue-router/“vue-resource”项目是否有一些商品决策/插件,如 laravel 中的维护模式,用常见消息阻止所有站点并且可以保留对某些页面的访问权限,例如管理区域?

谢谢!

4

1 回答 1

3

我在后端应用程序运行中找到了关于服务器的决定

php artisan down --message="Upgrading,,," --retry=60

并在客户端部分捕获 503 错误:

Vue.http.interceptors.push(function (request, next) {
    next(function (response) {
        if ( response.status === 503 ) {
           this.$router.push('/MaintenanceMessage') // maintenancePage
        }

...

于 2020-02-25T13:25:05.373 回答