Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtss-client
This commit is contained in:
commit
8835059c0e
@ -11,6 +11,8 @@
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"dev": "quasar dev",
|
||||
"build": "quasar build",
|
||||
"build:test": "set NODE_ENV=test&&quasar build",
|
||||
"build:publish": "set NODE_ENV=publish&&quasar build",
|
||||
"protoc": "node scripts/proto.cjs",
|
||||
"sync": "node scripts/sync.cjs"
|
||||
},
|
||||
|
@ -52,6 +52,10 @@ module.exports = configure(function (/* ctx */) {
|
||||
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||
build: {
|
||||
env: {
|
||||
// test:测试服务器;publish:正式服务器;其他本地
|
||||
ENV_MODE: process.env.NODE_ENV,
|
||||
},
|
||||
target: {
|
||||
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
||||
node: 'node16',
|
||||
|
@ -1,4 +1,9 @@
|
||||
function getHost(): string {
|
||||
if (process.env.ENV_MODE == 'test') {
|
||||
return 'test.joylink.club/bjrtss-server';
|
||||
} else if (process.env.ENV_MODE == 'publish') {
|
||||
return 'joylink.club/bjrtss-server';
|
||||
}
|
||||
// return '192.168.3.7:9091';
|
||||
// return '192.168.3.47:9091';
|
||||
// return '192.168.3.37:9091';
|
||||
@ -6,18 +11,28 @@ function getHost(): string {
|
||||
// return '192.168.3.5:9091';
|
||||
// return '192.168.3.37:9091';
|
||||
return '192.168.3.233:9091';
|
||||
// return 'test.joylink.club/bjrtss-server';
|
||||
}
|
||||
|
||||
export function getHttpBase() {
|
||||
return `http://${getHost()}`;
|
||||
// return `https://${getHost()}`;
|
||||
let protocol = 'http';
|
||||
if (['test', 'publish'].includes(process.env.ENV_MODE as string)) {
|
||||
protocol = 'https';
|
||||
}
|
||||
return `${protocol}://${getHost()}`;
|
||||
}
|
||||
|
||||
export function getWebsocketUrl() {
|
||||
const host = '192.168.3.233';
|
||||
const port = 8000;
|
||||
// return `ws://${host}/ws-bj`;
|
||||
return `ws://${host}:${port}/connection/websocket`;
|
||||
// return `wss://${getHost()}/ws-bj`;
|
||||
let protocol = 'ws';
|
||||
let host = '192.168.3.233';
|
||||
let port = '8000';
|
||||
if (process.env.ENV_MODE == 'test') {
|
||||
protocol = 'wss';
|
||||
host = 'test.joylink.club/bjrtss-server';
|
||||
port = '';
|
||||
} else if (process.env.ENV_MODE == 'publish') {
|
||||
protocol = 'wss';
|
||||
host = 'joylink.club/bjrtss-server';
|
||||
port = '';
|
||||
}
|
||||
return `${protocol}://${host}:${port}/connection/websocket`;
|
||||
}
|
||||
|
@ -36,12 +36,6 @@
|
||||
</template>
|
||||
</q-btn-toggle>
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
color="orange"
|
||||
label="公里标转换"
|
||||
style="margin-right: 10px"
|
||||
@click="openkilometerConvertList"
|
||||
/>
|
||||
<q-btn square color="purple" style="margin-right: 10px" icon="search">
|
||||
<q-popup-edit
|
||||
ref="popupEdit"
|
||||
@ -76,6 +70,11 @@
|
||||
<q-item-label>关联设备列表</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="openkilometerConvertList">
|
||||
<q-item-section>
|
||||
<q-item-label>公里标转换</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
<q-btn color="info" label="返回" @click="backConfirm" />
|
||||
|
Loading…
Reference in New Issue
Block a user