| | |
| | | // 可以直接访问的静态数据 |
| | | web.ignoring() |
| | | .antMatchers("/") |
| | | .antMatchers("/css/**") |
| | | .antMatchers("/img/**") |
| | | .antMatchers("/fonts/**") |
| | | .antMatchers("/static/**") |
| | | .antMatchers("/index.html") |
| | | .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**" |
| | | .antMatchers("/webjars/**") |
| | |
| | | @Override |
| | | protected void configure(HttpSecurity http) throws Exception { |
| | | http.cors().and().csrf().disable(); |
| | | // 设置允许添加静态文件 |
| | | http.headers().contentTypeOptions().disable(); |
| | | http.authorizeRequests() |
| | | // 放行接口 |
| | | .antMatchers("/api/user/login","/index/hook/**").permitAll() |
| | |
| | | to: config.dev.assetsSubDirectory, |
| | | ignore: ['.*'] |
| | | }, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm'}, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'js/'} |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm', to: 'static/'}, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'static/js/'} |
| | | ]) |
| | | ] |
| | | }) |
| | |
| | | filename: utils.assetsPath('css/[name].[contenthash].css'), |
| | | // Setting the following option to `false` will not extract CSS from codesplit chunks. |
| | | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. |
| | | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, |
| | | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, |
| | | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 |
| | | allChunks: true, |
| | | }), |
| | |
| | | to: config.build.assetsSubDirectory, |
| | | ignore: ['.*'] |
| | | }, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm'}, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'js/'} |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm', to: 'static/'}, |
| | | { from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'static/js/'} |
| | | ]) |
| | | ] |
| | | }) |
| | |
| | | |
| | | // Paths |
| | | assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'), |
| | | assetsSubDirectory: '.', |
| | | assetsSubDirectory: './static', |
| | | assetsPublicPath: '/', |
| | | |
| | | /** |
| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <title>国标28181</title> |
| | | <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css"> |
| | | <link rel="stylesheet" type="text/css" href="/static/css/login.css"> |
| | | <link rel="stylesheet" type="text/css" href="./static/css/font-awesome.min.css"> |
| | | <link rel="stylesheet" type="text/css" href="./static/css/login.css"> |
| | | </head> |
| | | <body> |
| | | <script type="text/javascript" src="./js/EasyWasmPlayer.js"></script> |
| | | <script type="text/javascript" src="/static/js/ZLMRTCClient.js"></script> |
| | | <script type="text/javascript" src="./static/js/EasyWasmPlayer.js"></script> |
| | | <script type="text/javascript" src="./static/js/ZLMRTCClient.js"></script> |
| | | <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=rk73w8dv1rkE4UdZsataG68VarhYQzrx&s=1"></script> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | |
| | | created() { |
| | | if(!this.$cookies.get("session")){ |
| | | //如果没有登录状态则跳转到登录页 |
| | | console.log("33333333") |
| | | this.$router.push('/login'); |
| | | } |
| | | }, |
| | |
| | | //cookie操作方法在源码里有或者参考网上的即可 |
| | | if(!this.$cookies.get("session")){ |
| | | //如果没有登录状态则跳转到登录页 |
| | | console.log("222222222") |
| | | this.$router.push('/login'); |
| | | } |
| | | }, |
| | |
| | | axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : ""; |
| | | |
| | | // api 返回401自动回登陆页面 |
| | | axios.interceptors.response.use(function (response) { |
| | | // 对响应数据做点什么 |
| | | return response; |
| | | }, function (error) { |
| | | // 对响应错误做点什么 |
| | | if (error.response.status === 401) { |
| | | router.push('/login'); |
| | | } |
| | | return Promise.reject(error); |
| | | }); |
| | | // axios.interceptors.response.use(function (response) { |
| | | // // 对响应数据做点什么 |
| | | // return response; |
| | | // }, function (error) { |
| | | // // 对响应错误做点什么 |
| | | // if (error.response.status === 401) { |
| | | // console.log((1111)) |
| | | // router.push('/login'); |
| | | // } |
| | | // return Promise.reject(error); |
| | | // }); |
| | | |
| | | Vue.prototype.$cookies.config(60*30); |
| | | |