Shannon_mu 3 роки тому
батько
коміт
ce3e80c9ec

+ 7 - 2
operationSupport/public/index.html

@@ -18,7 +18,12 @@
   <title>智慧社区管理平台</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
-  <!-- <script src="https://webapi.amap.com/maps?v=1.4.15&key=def65c683e32ae89dd7f8982b433b7f8&plugin=AMap.Autocomplete"></script> -->
+
+  <meta http-equiv="pragram" content="no-cache">
+  <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
+  <meta http-equiv="expires" content="0">
+
+
   <script type="text/javascript" src="https://webapi.amap.com/demos/js/liteToolbar.js"></script>
 </head>
 
@@ -39,4 +44,4 @@
   <script src="<%= BASE_URL %>loctionJs/axios@0.20.0.js"></script>
 </body>
 
-</html>
+</html>

+ 0 - 8
operationSupport/src/main.js

@@ -162,11 +162,3 @@ new Vue({
 }).$mount('#app');
 Vue.prototype.$http = http;
 Vue.prototype.$api = apiService(http);
-
-const VUE_APP_VERSION = require('../package.json').version
-const vers = window.localStorage.getItem("SC_Version");
-if (VUE_APP_VERSION != vers) {
-    localStorage.clear()
-    window.localStorage.setItem("SC_Version", VUE_APP_VERSION);
-    location.reload()
-}

+ 7 - 2
operationSupport/vue.config.js

@@ -15,6 +15,7 @@ function resolve(dir) {
 module.exports = {
     publicPath: process.env.NODE_ENV === 'sit' ? '/sc-operation' : '/',
     productionSourceMap: false,
+    filenameHashing: false,
     chainWebpack: config => {
         // 配置别名
         config.resolve.alias
@@ -33,8 +34,8 @@ module.exports = {
                 viewportWidth: 1920,//传参
             })
         // 配置每次打包浏览器缓存文件名的随机性
-        // const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
-        // config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename)
+        const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
+        config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename)
     },
     // 配置全局样式变量
     css: {
@@ -57,6 +58,10 @@ module.exports = {
             //         resources: path.relative(__dirname, '../src/assets/css/punlic-style.scss')
             //     }
             // })
+        },
+        extract: { // 打包后css文件名称添加时间戳
+            filename: `css/[name].${new Date().getTime()}.css`,
+            chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`,
         }
     },
     configureWebpack: {