diff --git a/babel.config.js b/babel.config.js index 87d8475..fc889eb 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,8 +1,8 @@ let plugins = []; // production -if (process.env.NODE_ENV === "production") { - plugins = ["transform-remove-console"]; -} +// if (process.env.NODE_ENV === "production") { +// plugins = ["transform-remove-console"]; +// } module.exports = { presets: ["@vue/cli-plugin-babel/preset"], plugins: [ diff --git a/favicon.ico b/favicon.ico index 306ea74..bc7f765 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/public/favicon.ico b/public/favicon.ico index 306ea74..bc7f765 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/components/main/index.vue b/src/components/main/index.vue index bb37eab..3bc9e71 100644 --- a/src/components/main/index.vue +++ b/src/components/main/index.vue @@ -10,7 +10,7 @@ diff --git a/src/utils/request.js b/src/utils/request.js index ac82570..d15b44f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -13,8 +13,8 @@ console.log(baseURL); axios.defaults.withCredentials = true; //添加这行代码 // console.log(axios); const service = axios.create({ - baseURL: "/api_prod", // url = base url + request url 测试 - // baseURL: baseURL, // baseURL: "/api", // url = base url + request url 正式 + // baseURL: "/api_prod", // url = base url + request url 测试 + baseURL: baseURL, // baseURL: "/api", // url = base url + request url 正式 withCredentials: true, // send cookies when cross-domain requests timeout: 60000, // request timeout crossDomain: true, diff --git a/static/img/【伯才稻田】小程序.png b/static/img/【伯才稻田】小程序.png index 35e677b..127b9ac 100644 Binary files a/static/img/【伯才稻田】小程序.png and b/static/img/【伯才稻田】小程序.png differ diff --git a/static/img/【伯才稻田】小程序1.png b/static/img/【伯才稻田】小程序1.png new file mode 100644 index 0000000..35e677b Binary files /dev/null and b/static/img/【伯才稻田】小程序1.png differ diff --git a/vue.config.js b/vue.config.js index 4000923..226b68d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,8 +1,8 @@ "use strict"; const path = require("path"); const defaultSettings = require("./src/settings.js"); -const webpack = require("webpack"); -const CompressionPlugin = require("compression-webpack-plugin"); +// const webpack = require("webpack"); +// const CompressionPlugin = require("compression-webpack-plugin"); // const zlib = require("zlib"); function resolve(dir) { return path.join(__dirname, dir); @@ -21,7 +21,6 @@ module.exports = { productionSourceMap: false, devServer: { // 配置反向代理 - compress: true, // 配置webpack的压缩,但是在package.json中需要配置 --compress port: port, open: true, overlay: { @@ -32,9 +31,9 @@ module.exports = { // 地址中有 /api 的时候会触发代理 "/api_prod": { // target: "http://localhost:8001/", - // target: "http://bl7.matripe.com.cn:8001", //测试修改这个地方 + target: "http://bl7.matripe.com.cn:8001", // target: "http://1shoudan.renminshitang.com.cn", - target: "https://d.matripe.com.cn", //正式修改这个地方 + // target: "https://d.matripe.com.cn", ws: true, // proxy websockets changeOrigin: true, // 确定是否跨域 pathRewrite: { @@ -93,32 +92,31 @@ module.exports = { "@ant-design/icons/lib/dist.$": resolve("src/icons.js"), }, }, - plugins: [ - // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - // // 下面两项配置才是 compression-webpack-plugin 压缩配置 - // // 压缩成 .gz 文件 - // new CompressionPlugin({ - // algorithm: "gzip", - // test: /\.js$|\.html$|\.css/, //匹配文件名 - // threshold: 10240, - // minRatio: 0.8, - // deleteOriginalAssets: false, // 是否删除源文件 - // }), - // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 - // new CompressionPlugin({ - // filename: '[path].br', - // algorithm: 'brotliCompress', - // test: /\.(js|css|html|svg)$/, - // compressionOptions: { - // params: { - // [zlib.constants.BROTLI_PARAM_QUALITY]: 11 - // } - // }, - // threshold: 10240, - // minRatio: 0.8, - // deleteOriginalAssets: true //是否删除原文件 - // }) - ], + // plugins: [ + // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + // // 下面两项配置才是 compression-webpack-plugin 压缩配置 + // // 压缩成 .gz 文件 + // new CompressionPlugin({ + // filename: '[path][base].gz', + // algorithm: 'gzip', + // test: /\.js$|\.css$|\.html$/, + // threshold: 10240, + // minRatio: 0.8 + // }), + // // 压缩成 .br 文件,如果 zlib 报错无法解决,可以注释这段使用代码,一般本地没问题,需要注意线上服务器会可能发生找不到 zlib 的情况。 + // new CompressionPlugin({ + // filename: '[path][base].br', + // algorithm: 'brotliCompress', + // test: /\.(js|css|html|svg)$/, + // compressionOptions: { + // params: { + // [zlib.constants.BROTLI_PARAM_QUALITY]: 11 + // } + // }, + // threshold: 10240, + // minRatio: 0.8 + // }) + // ], // }, optimization: { runtimeChunk: "single",