Compare commits

...

2 Commits

Author SHA1 Message Date
joylink_fanyuhong
f80dcbb2f7 环境变量测试 2024-04-02 19:37:32 +08:00
joylink_fanyuhong
c6c1876c29 取消环境变量测试内容 2024-04-02 19:33:54 +08:00
7 changed files with 13 additions and 10 deletions

View File

@ -19,8 +19,6 @@ jobs:
version: 'v18.19.1'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
env: URL_ENV: 'local'
environment: URL_ENV: 'test'
- name: 安装yarn,并run build
run: |
node -v

View File

@ -37,6 +37,7 @@
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"autoprefixer": "^10.4.2",
"dotenv": "^16.4.5",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0",

View File

@ -7,7 +7,7 @@
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
require('dotenv').config()
const { configure } = require('quasar/wrappers');
const BasePath = 'bjrtss';
@ -54,7 +54,7 @@ module.exports = configure(function (/* ctx */) {
build: {
env: {
// test:测试服务器publish正式服务器其他本地
ENV_MODE: process.env.URL_ENV,
ENV_MODE: process.env.NODE_ENV,
},
target: {
browser: ['es2020'],

@ -1 +1 @@
Subproject commit 8117a06f1ebccc1e239e56cfc0a3137f499c8515
Subproject commit 78f0ddfd2413bdac81d33ea2b199edaa4de9e6fb

View File

@ -1,16 +1,16 @@
function getHost(): string {
console.log(process.env.ENV_MODE, process.env.URL_ENV, '000');
if (process.env.URL_ENV == 'test') {
if (process.env.ENV_MODE == 'test') {
return 'test.joylink.club/bjrtsts-server';
} else if (process.env.URL_ENV == 'publish') {
} else if (process.env.ENV_MODE == 'publish') {
return 'joylink.club/bjrtsts-server';
} else if (process.env.URL_ENV == 'local_test') {
} else if (process.env.ENV_MODE == 'local_test') {
return '192.168.33.233:9091';
}
// return '192.168.3.7:9091';
// return '192.168.3.47:9091';
// return '192.168.3.37:9091';
return '192.168.33.207:9091'; // 张骞
// return '192.168.33.207:9091'; // 张骞
// return '192.168.33.93:9091';
// return '192.168.3.37:9091'; //卫志宏
// return 'test.joylink.club/bjrtsts-service'; // 测试

1
src/env.d.ts vendored
View File

@ -5,6 +5,5 @@ declare namespace NodeJS {
NODE_ENV: string;
VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined;
VUE_ROUTER_BASE: string | undefined;
URL_ENV: string;
}
}

View File

@ -1387,6 +1387,11 @@ dot-prop@6.0.1:
dependencies:
is-obj "^2.0.0"
dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.npmmirror.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==
earcut@^2.2.4:
version "2.2.4"
resolved "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a"