Compare commits

..

2 Commits

Author SHA1 Message Date
tt e937d047ce Merge branch 'main' of https://code.tiantongsl.com/senyao/travel 2024-10-21 11:21:34 +08:00
tt d0c66f1555 zancun 2024-10-21 11:20:32 +08:00
3 changed files with 16441 additions and 80 deletions

View File

@ -36,20 +36,24 @@
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"jsonlint": "1.6.3", "jsonlint": "1.6.3",
"jszip": "3.2.1", "jszip": "3.2.1",
"left-pad": "^1.3.0",
"moment": "^2.30.1", "moment": "^2.30.1",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"quill": "^1.3.6", "quill": "^1.3.6",
"regenerator-runtime": "^0.14.1",
"screenfull": "4.2.0", "screenfull": "4.2.0",
"script-loader": "0.7.2", "script-loader": "0.7.2",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
"svg-baker-runtime": "^1.4.7",
"tui-editor": "1.3.3", "tui-editor": "1.3.3",
"vue": "2.6.14", "vue": "2.6.14",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-router": "3.0.2", "vue-router": "3.0.2",
"vue-splitpane": "1.0.4", "vue-splitpane": "1.0.4",
"vue-style-loader": "^4.1.3",
"vuedraggable": "2.20.0", "vuedraggable": "2.20.0",
"vuex": "3.1.0", "vuex": "3.1.0",
"xlsx": "0.14.1", "xlsx": "0.14.1",

16361
admin/pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
'use strict' "use strict";
const path = require('path') const path = require("path");
const defaultSettings = require('./src/settings.js') const defaultSettings = require("./src/settings.js");
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir);
} }
const name = defaultSettings.title || 'vue Element Admin' // page title const name = defaultSettings.title || "vue Element Admin"; // page title
// If your port is set to 80, // If your port is set to 80,
// use administrator privileges to execute the command line. // use administrator privileges to execute the command line.
// For example, Mac: sudo npm run // For example, Mac: sudo npm run
// You can change the port by the following method: // You can change the port by the following method:
// port = 9527 npm run dev OR npm run dev --port = 9527 // port = 9527 npm run dev OR npm run dev --port = 9527
const port = process.env.port || process.env.npm_config_port || 9527 // dev port const port = process.env.port || process.env.npm_config_port || 9527; // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/ // All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = { module.exports = {
@ -24,40 +24,41 @@ module.exports = {
* In most cases please use '/' !!! * In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: '/', publicPath: "/",
outputDir: '../service/public', outputDir: "../service/public",
assetsDir: 'static', assetsDir: "static",
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === "development",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: port, port: port,
open: true, open: true,
overlay: { overlay: {
warnings: false, warnings: false,
errors: true errors: true,
}, },
proxy: { proxy: {
'/dev-api': { // 接口地址 以 api开头的都走下面的配置 "/dev-api": {
// 接口地址 以 api开头的都走下面的配置
// target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 // target: 'https://www.szjinao.cn', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
target: 'http://192.168.0.100:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2 target: 'http://192.168.0.100:8787', // 代理目标地址为后端服务器地址 127.0.0.1 192.168.1.2
ws: true, // 是否支持 websocket 请求 支持 ws: true, // 是否支持 websocket 请求 支持
changeOrigin: true, // 是否启用跨域 changeOrigin: true, // 是否启用跨域
pathRewrite: { pathRewrite: {
'^/dev-api': '' // 发送请求时自动去掉开头 "^/dev-api": "", // 发送请求时自动去掉开头
}, },
onProxyReq: function (proxyReq, req, res, options) { onProxyReq: function (proxyReq, req, res, options) {
if (req.body) { if (req.body) {
const bodyData = JSON.stringify(req.body) const bodyData = JSON.stringify(req.body);
// incase if content-type is application/x-www-form-urlencoded -> we need to change to application/json // incase if content-type is application/x-www-form-urlencoded -> we need to change to application/json
proxyReq.setHeader('Content-Type', 'application/json') proxyReq.setHeader("Content-Type", "application/json");
proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData)) proxyReq.setHeader("Content-Length", Buffer.byteLength(bodyData));
// stream the content // stream the content
proxyReq.write(bodyData) proxyReq.write(bodyData);
}
}
} }
}, },
before: require('./mock/mock-server.js') },
},
before: require("./mock/mock-server.js"),
}, },
configureWebpack: { configureWebpack: {
// provide the app's title in webpack's name field, so that // provide the app's title in webpack's name field, so that
@ -65,81 +66,76 @@ module.exports = {
name: name, name: name,
resolve: { resolve: {
alias: { alias: {
'@': resolve('src') "@": resolve("src"),
} },
} },
}, },
chainWebpack(config) { chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload // it can improve the speed of the first screen, it is recommended to turn on preload
// it can improve the speed of the first screen, it is recommended to turn on preload // it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [ config.plugin("preload").tap(() => [
{ {
rel: 'preload', rel: "preload",
// to ignore runtime.js // to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial' include: "initial",
} },
]) ]);
// when there are many pages, it will cause too many meaningless requests // when there are many pages, it will cause too many meaningless requests
config.plugins.delete('prefetch') config.plugins.delete("prefetch");
// set svg-sprite-loader // set svg-sprite-loader
config.module.rule("svg").exclude.add(resolve("src/icons")).end();
config.module config.module
.rule('svg') .rule("icons")
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/) .test(/\.svg$/)
.include.add(resolve('src/icons')) .include.add(resolve("src/icons"))
.end() .end()
.use('svg-sprite-loader') .use("svg-sprite-loader")
.loader('svg-sprite-loader') .loader("svg-sprite-loader")
.options({ .options({
symbolId: 'icon-[name]' symbolId: "icon-[name]",
}) })
.end() .end();
config.when(process.env.NODE_ENV !== "development", (config) => {
config config
.when(process.env.NODE_ENV !== 'development', .plugin("ScriptExtHtmlWebpackPlugin")
config => { .after("html")
config .use("script-ext-html-webpack-plugin", [
.plugin('ScriptExtHtmlWebpackPlugin') {
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/ inline: /runtime\..*\.js$/,
}]) },
.end() ])
config .end();
.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: "all",
cacheGroups: { cacheGroups: {
libs: { libs: {
name: 'chunk-libs', name: "chunk-libs",
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
priority: 10, priority: 10,
chunks: 'initial' // only package third parties that are initially dependent chunks: "initial", // only package third parties that are initially dependent
}, },
elementUI: { elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package name: "chunk-elementUI", // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
}, },
commons: { commons: {
name: 'chunk-commons', name: "chunk-commons",
test: resolve('src/Wangeditor'), // can customize your rules test: resolve("src/Wangeditor"), // can customize your rules
minChunks: 3, // minimum common number minChunks: 3, // minimum common number
priority: 5, priority: 5,
reuseExistingChunk: true reuseExistingChunk: true,
} },
} },
}) });
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single') config.optimization.runtimeChunk("single");
} });
) },
} };
}