调整停止按钮参数方式

This commit is contained in:
lin
2025-11-11 22:03:28 +08:00
parent 99b292b023
commit c1254b5b09
2 changed files with 5 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ const actions = {
}) })
}) })
}, },
stop({ commit }, [deviceId, channelId]) { stop({ commit }, { deviceId, channelId }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
stop(deviceId, channelId).then(response => { stop(deviceId, channelId).then(response => {
const { data } = response const { data } = response

View File

@@ -422,7 +422,10 @@ export default {
}) })
}, },
stopDevicePush: function(itemData) { stopDevicePush: function(itemData) {
this.$store.dispatch('play/stop', [this.deviceId, itemData.deviceId]).then(data => { this.$store.dispatch('play/stop', {
deviceId: this.deviceId,
channelId: itemData.deviceId
}).then(data => {
this.initData() this.initData()
}).catch((error) => { }).catch((error) => {
if (error.response.status === 402) { // 已经停止过 if (error.response.status === 402) { // 已经停止过