From cb54800165eee0ea795938302bb352b02a64d0c6 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Wed, 21 Sep 2022 15:08:30 +0800 Subject: [PATCH] 去缓存 --- build/webpack.prod.conf.js | 7 ++++--- config/index.js | 4 ++-- config/prod.env.js | 8 ++++---- src/views/parkPay/coupon.vue | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 3769676..2b60dc6 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -12,7 +12,7 @@ const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const env = require('../config/prod.env') -const Version = new Date().getTime() +const Version = new Date().getTime() const webpackConfig = merge(baseWebpackConfig, { module: { rules: utils.styleLoaders({ @@ -25,8 +25,8 @@ const webpackConfig = merge(baseWebpackConfig, { output: { publicPath: './', path: config.build.assetsRoot, - filename: utils.assetsPath('js/[name].[chunkhash].'+Version+'js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].'+Version+'js') + filename: utils.assetsPath(`js/[name].[chunkhash].${Version}.js`), + chunkFilename: utils.assetsPath(`js/[id].[chunkhash].${Version}.js`) }, plugins: [ // http://vuejs.github.io/vue-loader/en/workflow/production.html @@ -65,6 +65,7 @@ const webpackConfig = merge(baseWebpackConfig, { filename: config.build.index, template: 'index.html', inject: true, + hash:Version, minify: { removeComments: true, collapseWhitespace: true, diff --git a/config/index.js b/config/index.js index 2b2c992..44e1caf 100644 --- a/config/index.js +++ b/config/index.js @@ -13,14 +13,14 @@ module.exports = { open: true,//vue项目启动时自动打开浏览器 proxyTable: { '/api':{ - target:"http://221.228.70.87:8096",//这里设置你要访问的域名(或IP+端口) + target:"https://bus.jycrtc.com",//这里设置你要访问的域名(或IP+端口) changeOrigin:true, pathRewrite:{ '^/api':''//base_api是自定义用来代替 } }, '/payapi':{ - target:"http://221.228.70.87:8096",//这里设置你要访问的域名(或IP+端口) + target:"https://pay.jycrtc.com",//这里设置你要访问的域名(或IP+端口) changeOrigin:true, pathRewrite:{ '^/payapi':''//base_api是自定义用来代替 diff --git a/config/prod.env.js b/config/prod.env.js index bd7463b..db4cb54 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,9 +1,9 @@ 'use strict' module.exports = { - APP_BASE_APP_API:'"http://221.228.70.87:8096"', //项目api地址1 注意里面的双引号 - APP_BASE_WWW_API:'"http://221.228.70.87:8096"', //项目api地址2 - VUE_APP_API:'"http://221.228.70.87:8096"', - VUE_APP_PAYAPI:'"http://221.228.70.87:8096"', + APP_BASE_APP_API:'"https://bus.jycrtc.com"', //项目api地址1 注意里面的双引号 + APP_BASE_WWW_API:'"https://pay.jycrtc.com"', //项目api地址2 + VUE_APP_API:'"https://bus.jycrtc.com"', + VUE_APP_PAYAPI:'"https://pay.jycrtc.com"', NODE_ENV: '"production"' } diff --git a/src/views/parkPay/coupon.vue b/src/views/parkPay/coupon.vue index 05400ed..78bce1a 100644 --- a/src/views/parkPay/coupon.vue +++ b/src/views/parkPay/coupon.vue @@ -9,7 +9,7 @@ :disabled="disabledFlag"> {{btnText}} - 返回 + -- libgit2 0.21.4