to: 添加前端静态资源请求版本号,防止更新导致的缓存

This commit is contained in:
xboard 2023-11-25 10:24:14 +08:00
parent e086456777
commit 25317d5f64
2 changed files with 32 additions and 33 deletions

View File

@ -239,5 +239,5 @@ return [
| The only modification by laravel config | The only modification by laravel config
| |
*/ */
'version' => '1.7.5.1685907718051' 'version' => '0.1.1-dev'
]; ];

View File

@ -1,34 +1,33 @@
<!doctype html> <!doctype html>
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<title>{{$title}}</title> <title>{{$title}}</title>
<script type="module" crossorigin src="/theme/{{$theme}}/assets/umi.js"></script> <script type="module" crossorigin src="/theme/{{$theme}}/assets/umi.js?v={{$version}}"></script>
</head> </head>
<body> <body>
<script>
<script> window.routerBase = "/";
window.routerBase = "/"; window.settings = {
window.settings = { title: '{{$title}}',
title: '{{$title}}', assets_path: '/theme/{{$theme}}/assets',
assets_path: '/theme/{{$theme}}/assets', version: '{{$version}}',
version: '{{$version}}', background_url: '{{$theme_config['background_url']}}',
background_url: '{{$theme_config['background_url']}}', description: '{{$description}}',
description: '{{$description}}', i18n: [
i18n: [ 'zh-CN',
'zh-CN', 'en-US',
'en-US', 'ja-JP',
'ja-JP', 'vi-VN',
'vi-VN', 'ko-KR',
'ko-KR', 'zh-TW',
'zh-TW', 'fa-IR'
'fa-IR' ],
], logo: '{{$logo}}'
logo: '{{$logo}}' }
} </script>
</script> <div id="app"></div>
<div id="app"></div> {!! $theme_config['custom_html'] !!}
{!! $theme_config['custom_html'] !!} </body>
</body> </html>
</html>