[1078] 增加连接到指定服务器

This commit is contained in:
lin
2025-07-17 15:12:23 +08:00
parent f7b35e8e14
commit 47e4f2343b
6 changed files with 155 additions and 77 deletions

View File

@@ -1,6 +1,6 @@
import {
add,
addChannel, controlPlayback, deleteDevice, factoryReset,
addChannel, connection, controlPlayback, deleteDevice, factoryReset,
fillLight, getRecordTempUrl, linkDetection,
play, ptz, queryAttribute,
queryChannels, queryConfig,
@@ -290,6 +290,16 @@ const actions = {
reject(error)
})
})
},
connection({ commit }, data) {
return new Promise((resolve, reject) => {
connection(data).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
}
}