Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m27s
All checks were successful
CI / Docker-Build (push) Successful in 2m27s
# Conflicts: # quasar.config.js # src/configs/UrlManage.ts
This commit is contained in:
commit
de7c3b02e0
@ -10,9 +10,9 @@
|
|||||||
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||||
"test": "echo \"No test specified\" && exit 0",
|
"test": "echo \"No test specified\" && exit 0",
|
||||||
"dev": "quasar dev",
|
"dev": "quasar dev",
|
||||||
"build": "set URL_ENV=local_test&&quasar build",
|
"build": "URL_ENV=local quasar build",
|
||||||
"build:test": "API_URL=local quasar build",
|
"build:test": "URL_ENV=test quasar build",
|
||||||
"build:publish": "set URL_ENV=publish&&quasar build",
|
"build:publish": "URL_ENV=publish quasar build",
|
||||||
"protoc": "node scripts/proto.cjs",
|
"protoc": "node scripts/proto.cjs",
|
||||||
"sync": "node scripts/sync.cjs"
|
"sync": "node scripts/sync.cjs"
|
||||||
},
|
},
|
||||||
|
@ -55,7 +55,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
env: {
|
env: {
|
||||||
// test:测试服务器;publish:正式服务器;其他本地
|
// test:测试服务器;publish:正式服务器;其他本地
|
||||||
ENV_MODE: process.env.NODE_ENV,
|
ENV_MODE: process.env.NODE_ENV,
|
||||||
API_URL: process.env.API_URL,
|
URL_ENV: process.env.URL_ENV
|
||||||
},
|
},
|
||||||
target: {
|
target: {
|
||||||
browser: ['es2020'],
|
browser: ['es2020'],
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
function getHost(): string {
|
function getHost(): string {
|
||||||
console.log(process.env.ENV_MODE, process.env.API_URL, '000');
|
if (process.env.URL_ENV == 'test') {
|
||||||
if (process.env.ENV_MODE == 'test') {
|
|
||||||
return 'test.joylink.club/bjrtsts-server';
|
return 'test.joylink.club/bjrtsts-server';
|
||||||
} else if (process.env.ENV_MODE == 'publish') {
|
} else if (process.env.URL_ENV == 'publish') {
|
||||||
return 'joylink.club/bjrtsts-server';
|
return 'joylink.club/bjrtsts-server';
|
||||||
} else if (process.env.ENV_MODE == 'local_test') {
|
} else if (process.env.URL_ENV == 'local_test') {
|
||||||
return '192.168.33.233:9091';
|
return '192.168.33.233:9091';
|
||||||
}
|
}
|
||||||
// return '192.168.3.7:9091';
|
// return '192.168.3.7:9091';
|
||||||
// return '192.168.3.47:9091';
|
// return '192.168.3.47:9091';
|
||||||
// return '192.168.3.37: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.33.93:9091';
|
||||||
// return '192.168.3.37:9091'; //卫志宏
|
// return '192.168.3.37:9091'; //卫志宏
|
||||||
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
||||||
@ -19,7 +18,7 @@ function getHost(): string {
|
|||||||
|
|
||||||
export function getHttpBase() {
|
export function getHttpBase() {
|
||||||
let protocol = 'http';
|
let protocol = 'http';
|
||||||
if (['publish'].includes(process.env.ENV_MODE as string)) {
|
if (['publish'].includes(process.env.URL_ENV as string)) {
|
||||||
protocol = 'https';
|
protocol = 'https';
|
||||||
}
|
}
|
||||||
return `${protocol}://${getHost()}`;
|
return `${protocol}://${getHost()}`;
|
||||||
@ -31,12 +30,12 @@ export function getWebsocketUrl() {
|
|||||||
// let host = 'test.joylink.club';
|
// let host = 'test.joylink.club';
|
||||||
let port = '8083';
|
let port = '8083';
|
||||||
let url = `${protocol}://${host}:${port}`;
|
let url = `${protocol}://${host}:${port}`;
|
||||||
if (process.env.ENV_MODE == 'test') {
|
if (process.env.URL_ENV == 'test') {
|
||||||
// protocol = 'wss';
|
// protocol = 'wss';
|
||||||
host = 'test.joylink.club/bjrtsts-server';
|
host = 'test.joylink.club/bjrtsts-server';
|
||||||
port = '';
|
port = '';
|
||||||
url = `${protocol}://${host}`;
|
url = `${protocol}://${host}`;
|
||||||
} else if (process.env.ENV_MODE == 'publish') {
|
} else if (process.env.URL_ENV == 'publish') {
|
||||||
protocol = 'wss';
|
protocol = 'wss';
|
||||||
host = 'joylink.club/bjrtsts-server';
|
host = 'joylink.club/bjrtsts-server';
|
||||||
port = '';
|
port = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user