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",
|
"test": "echo \"No test specified\" && exit 0",
|
||||||
"dev": "quasar dev",
|
"dev": "quasar dev",
|
||||||
"build": "quasar build",
|
"build": "quasar build",
|
||||||
|
"build:test": "set NODE_ENV=test&&quasar build",
|
||||||
|
"build:publish": "set NODE_ENV=publish&&quasar build",
|
||||||
"protoc": "node scripts/proto.cjs",
|
"protoc": "node scripts/proto.cjs",
|
||||||
"sync": "node scripts/sync.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
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||||
build: {
|
build: {
|
||||||
|
env: {
|
||||||
|
// test:测试服务器;publish:正式服务器;其他本地
|
||||||
|
ENV_MODE: process.env.NODE_ENV,
|
||||||
|
},
|
||||||
target: {
|
target: {
|
||||||
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
||||||
node: 'node16',
|
node: 'node16',
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
function getHost(): string {
|
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.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';
|
||||||
@ -6,18 +11,28 @@ function getHost(): string {
|
|||||||
// return '192.168.3.5:9091';
|
// return '192.168.3.5:9091';
|
||||||
// return '192.168.3.37:9091';
|
// return '192.168.3.37:9091';
|
||||||
return '192.168.3.233:9091';
|
return '192.168.3.233:9091';
|
||||||
// return 'test.joylink.club/bjrtss-server';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getHttpBase() {
|
export function getHttpBase() {
|
||||||
return `http://${getHost()}`;
|
let protocol = 'http';
|
||||||
// return `https://${getHost()}`;
|
if (['test', 'publish'].includes(process.env.ENV_MODE as string)) {
|
||||||
|
protocol = 'https';
|
||||||
|
}
|
||||||
|
return `${protocol}://${getHost()}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWebsocketUrl() {
|
export function getWebsocketUrl() {
|
||||||
const host = '192.168.3.233';
|
let protocol = 'ws';
|
||||||
const port = 8000;
|
let host = '192.168.3.233';
|
||||||
// return `ws://${host}/ws-bj`;
|
let port = '8000';
|
||||||
return `ws://${host}:${port}/connection/websocket`;
|
if (process.env.ENV_MODE == 'test') {
|
||||||
// return `wss://${getHost()}/ws-bj`;
|
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>
|
</template>
|
||||||
</q-btn-toggle>
|
</q-btn-toggle>
|
||||||
</q-toolbar-title>
|
</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-btn square color="purple" style="margin-right: 10px" icon="search">
|
||||||
<q-popup-edit
|
<q-popup-edit
|
||||||
ref="popupEdit"
|
ref="popupEdit"
|
||||||
@ -76,6 +70,11 @@
|
|||||||
<q-item-label>关联设备列表</q-item-label>
|
<q-item-label>关联设备列表</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</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-list>
|
||||||
</q-btn-dropdown>
|
</q-btn-dropdown>
|
||||||
<q-btn color="info" label="返回" @click="backConfirm" />
|
<q-btn color="info" label="返回" @click="backConfirm" />
|
||||||
|
Loading…
Reference in New Issue
Block a user