From e18291b57135cbe1e7b7c470ee8f782de4d6fe6b Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Jul 2025 13:56:13 +0800
Subject: [PATCH] feat: 复制地址错误
---
src/views/device/addDevice.vue | 49 +++++++++++++++----------------------------------
1 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/src/views/device/addDevice.vue b/src/views/device/addDevice.vue
index 88a8a89..a1c4833 100644
--- a/src/views/device/addDevice.vue
+++ b/src/views/device/addDevice.vue
@@ -231,41 +231,22 @@
methods: {
copyInfo (row, index) {
- if (import.meta.env.VITE_APP_ENV === 'development') {
- // alert('地址'+import.meta.env.VITE_APP_ENV);
- let params = `
- host: tcp://139.196.74.78:1883
- 账号:drone
- 密码:123456
- 组织id:${row.bing_id}
- 设备码:${row.bind_code}
- 机场名称:${row.workspace_name}
- aircrattName:${row.workspace_desc}`
- $Clipboard({
- text: params,
- }).then(() => {
- this.$message.success("复制成功")
- }).catch(() => {
- this.$message.error("复制失败")
- })
- } else {
- // alert('地址'+import.meta.env.VITE_APP_ENV);
- let params = `
- host: tcp://101.132.85.201:1883
- 账号:drone
+ const ipAddress = import.meta.env.VITE_APP_DEVICE_IP
+ let params = `
+ host: tcp://${ipAddress}
+ 账号:drone
密码:drone@123
- 组织id:${row.bing_id}
- 设备码:${row.bind_code}
- 机场名称:${row.workspace_name}
+ 组织id:${row.bing_id}
+ 设备码:${row.bind_code}
+ 机场名称:${row.workspace_name}
aircrattName:${row.workspace_desc}`
- $Clipboard({
- text: params,
- }).then(() => {
- this.$message.success("复制成功")
- }).catch(() => {
- this.$message.error("复制失败")
- })
- }
+ $Clipboard({
+ text: params,
+ }).then(() => {
+ this.$message.success("复制成功")
+ }).catch(() => {
+ this.$message.error("复制失败")
+ })
},
init () {
this.onLoad(this.page)
@@ -443,4 +424,4 @@
border-color: #409eff;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3