代码更新

This commit is contained in:
GaoHao
2025-03-04 18:30:16 +08:00
parent fd0c452a76
commit 4f65b08c06
32 changed files with 622 additions and 1616 deletions

View File

@@ -4,30 +4,9 @@ const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
// devServer: {
// proxy: {
// '/shopApi': {
// target: 'https://wxcashiertest.sxczgkj.cn/cashierService',
// changeOrigin: true,
// pathRewrite: {
// '^/shopApi': ''
// },
// bypass(req, res, options) {
// const proxyURL = options.target + options.rewrite(req.url);
// req.headers['x-req-proxyURL'] = proxyURL; // 设置未生效
// res.setHeader('x-req-proxyURL', proxyURL); // 设置响应头可以看到
// },
// onProxyRes(proxyRes, req, res) {
// const realUrl = process.env.BASEURL + req.url || ''; // 真实请求网址
// console.log(realUrl); // 在终端显示
// proxyRes.headers['A-Real-Url'] = realUrl; // 添加响应标头(A-Real-Url为自定义命名),在浏览器中显示
// }
// }
// }
// },
devServer: {
proxy: {
'/account': {
'/api': {
target: 'https://tapi.cashier.sxczgkj.cn', // 目标服务器地址
changeOrigin: true, // 是否改变源地址
rewrite: '/' // 重写路径