|
@ -164,18 +164,23 @@ export default { |
|
|
handleClickTabs() { }, |
|
|
handleClickTabs() { }, |
|
|
requestURL(functionId = 52, options = {}) { |
|
|
requestURL(functionId = 52, options = {}) { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
request |
|
|
if (!this.dialogData.iotDeviceId) { |
|
|
.post( |
|
|
reject(); |
|
|
`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, |
|
|
} else { |
|
|
options |
|
|
request |
|
|
) |
|
|
.post( |
|
|
.then((result) => { |
|
|
`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, |
|
|
if (result.code != 200) return reject(); |
|
|
options |
|
|
resolve(result.data[0]); |
|
|
) |
|
|
}) |
|
|
.then((result) => { |
|
|
.catch((err) => { |
|
|
if (result.code != 200) return reject(); |
|
|
reject(); |
|
|
resolve(result.data[0]); |
|
|
}); |
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
reject(); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|