| | |
| | | VITE_APP_ENV = 'production'
|
| | |
|
| | | #基础域名
|
| | | VITE_APP_BASE = 'https://jmy.jinmingyuan.com'
|
| | | # VITE_APP_BASE = 'https://cxsm.jinmingyuan.com'
|
| | | VITE_APP_BASE = 'http://36.108.168.12:9000'
|
| | |
|
| | | # 入企扫码/生产环境
|
| | | VITE_APP_BASE_API = '/sqys-prod-api'
|
| | | VITE_APP_BASE_API = '/smrq-api'
|
| | |
|
| | | # 是否在打包时开启压缩,支持 gzip 和 brotli
|
| | | VITE_BUILD_COMPRESS = gzip
|
| | |
| | | .DS_Store |
| | | node_modules/ |
| | | ctomsWeb/ |
| | | dist/ |
| | | npm-debug.log* |
| | | yarn-debug.log* |
| | | yarn-error.log* |
| | |
| | | })
|
| | | .then(() => {
|
| | | userStore.logOut().then(() => {
|
| | | location.href = "/sqys-web/index";
|
| | | // location.href = "/sqys-web/index";
|
| | | location.href = "/smrq/index";
|
| | | });
|
| | | })
|
| | | .catch(() => {});
|
| | |
| | | ];
|
| | |
|
| | | const router = createRouter({
|
| | | history: createWebHistory("/sqys-web/"),
|
| | | // history: createWebHistory("/sqys-web/"),
|
| | | history: createWebHistory("/smrq/"),
|
| | | routes: constantRoutes,
|
| | | scrollBehavior(to, from, savedPosition) {
|
| | | if (savedPosition) {
|
| | |
| | | // 部署生产环境和开发环境下的URL。
|
| | | // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
| | | // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
| | | base: VITE_APP_ENV === "production" ? "/sqys-web/" : "/",
|
| | | // 测试环境 sqys-web 正式环境 smrq
|
| | | base: VITE_APP_ENV === "production" ? "/smrq/" : "/",
|
| | | plugins: [...createVitePlugins(env, command === "build")],
|
| | | resolve: {
|
| | | // https://cn.vitejs.dev/config/#resolve-alias
|
| | |
| | | changeOrigin: true,
|
| | | rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
| | | },
|
| | | "/sqys-prod-api": {
|
| | | "/smrq-api": {
|
| | | target: VITE_APP_BASE,
|
| | | changeOrigin: true,
|
| | | rewrite: (p) => p.replace(/^\/sqys-prod-api/, ""),
|
| | | rewrite: (p) => p.replace(/^\/smrq-api/, ""),
|
| | | },
|
| | | },
|
| | | port: 81,
|