|
|
@ -4,16 +4,16 @@ |
|
|
|
<view class="sm-tit"> |
|
|
|
<text>{{pageInfo.name || '-'}}</text> |
|
|
|
<text>{{pageInfo.tips || ''}}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="slider-box"> |
|
|
|
<text>音量</text> |
|
|
|
<slider :value="voiceLevel" activeColor="#009874" block-color="#009874" block-size="22" @change="sliderChange" min="0" max="100" /> |
|
|
|
<view class=""> |
|
|
|
<text>0%</text> |
|
|
|
<text>100%</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="slider-box"> |
|
|
|
<text>音量</text> |
|
|
|
<slider :value="voiceLevel" activeColor="#009874" block-color="#009874" block-size="22" @change="sliderChange" min="0" max="100" /> |
|
|
|
<view class=""> |
|
|
|
<text>0%</text> |
|
|
|
<text>100%</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="sm-list"> |
|
|
|
<view class="sl-item" v-for="(e, i) in deviceList" :key="i"> |
|
|
@ -117,7 +117,7 @@ |
|
|
|
mapState |
|
|
|
} from 'vuex'; |
|
|
|
import util from '../../../../utils/util'; |
|
|
|
|
|
|
|
|
|
|
|
import DEVICE_FUN from '../../js/device_fun.js'; |
|
|
|
|
|
|
|
export default { |
|
|
@ -132,7 +132,7 @@ |
|
|
|
return i => { |
|
|
|
return `../../static/images/i_voice_${i}.png` |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getVoiceTxt() { |
|
|
|
return i => { |
|
|
|
return [,'请按住说话','录音中...','录音已完成','播放中...'][i] |
|
|
@ -146,7 +146,7 @@ |
|
|
|
this.getDeviceList({ |
|
|
|
stadium_id: newVal.id, |
|
|
|
hardware_type: this.pageInfo.hardware_type |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -160,237 +160,237 @@ |
|
|
|
txt: "", |
|
|
|
voicePath: "", |
|
|
|
voiceUrl: "", |
|
|
|
}, |
|
|
|
}, |
|
|
|
voiceLevel:0 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
this.initAudio(); |
|
|
|
this.initPage(options); |
|
|
|
this.initPage(options); |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//初始化音频 |
|
|
|
initAudio(){ |
|
|
|
let self = this; |
|
|
|
recorderManager.onStop(function(res) { |
|
|
|
console.log('recorder stop' + JSON.stringify(res)); |
|
|
|
self.voicePadConfig.voicePath = res.tempFilePath; |
|
|
|
}); |
|
|
|
innerAudioContext.onPlay(function(res) { |
|
|
|
console.log('play voice onPlay' + JSON.stringify(res)); |
|
|
|
if(self.voicePadConfig.step==3)self.voicePadConfig.step = 4 |
|
|
|
}); |
|
|
|
innerAudioContext.onEnded(function(res) { |
|
|
|
console.log('play voice onEnded' + JSON.stringify(res)); |
|
|
|
if(self.voicePadConfig.step == 4)self.voicePadConfig.step = 3 |
|
|
|
}); |
|
|
|
}, |
|
|
|
initPage(options){ |
|
|
|
let _pageInfo = showArr[`s${options.sid}`] || {}; |
|
|
|
this.pageInfo = _pageInfo; |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: _pageInfo.name |
|
|
|
}); |
|
|
|
|
|
|
|
this.getDeviceList({ |
|
|
|
stadium_id: this.curStoreInfo.id, |
|
|
|
hardware_type: _pageInfo.hardware_type |
|
|
|
}) |
|
|
|
this.updateVoiceSlider(); |
|
|
|
|
|
|
|
}, |
|
|
|
//滑动更改音响音量 |
|
|
|
sliderChange(e) { |
|
|
|
console.log('value 发生变化:' + e.detail.value) |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player-volume", |
|
|
|
"value": { |
|
|
|
"volume": e.detail.value.toString() |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
this.operateReq({ |
|
|
|
data: _data, |
|
|
|
isTip:true |
|
|
|
}) |
|
|
|
}, |
|
|
|
//更新音响音量 |
|
|
|
updateVoiceSlider(){ |
|
|
|
let that = this |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player-volume", |
|
|
|
"value": { |
|
|
|
"volume": "-1" |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
this.operateReq({ |
|
|
|
data: _data, |
|
|
|
succFun: (res) => { |
|
|
|
console.log("操作结果:",res); |
|
|
|
that.voiceLevel = res.data |
|
|
|
}, |
|
|
|
isTip:false |
|
|
|
}) |
|
|
|
methods: { |
|
|
|
//初始化音频 |
|
|
|
initAudio(){ |
|
|
|
let self = this; |
|
|
|
recorderManager.onStop(function(res) { |
|
|
|
console.log('recorder stop' + JSON.stringify(res)); |
|
|
|
self.voicePadConfig.voicePath = res.tempFilePath; |
|
|
|
}); |
|
|
|
innerAudioContext.onPlay(function(res) { |
|
|
|
console.log('play voice onPlay' + JSON.stringify(res)); |
|
|
|
if(self.voicePadConfig.step==3)self.voicePadConfig.step = 4 |
|
|
|
}); |
|
|
|
innerAudioContext.onEnded(function(res) { |
|
|
|
console.log('play voice onEnded' + JSON.stringify(res)); |
|
|
|
if(self.voicePadConfig.step == 4)self.voicePadConfig.step = 3 |
|
|
|
}); |
|
|
|
}, |
|
|
|
initPage(options){ |
|
|
|
let _pageInfo = showArr[`s${options.sid}`] || {}; |
|
|
|
this.pageInfo = _pageInfo; |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: _pageInfo.name |
|
|
|
}); |
|
|
|
|
|
|
|
this.getDeviceList({ |
|
|
|
stadium_id: this.curStoreInfo.id, |
|
|
|
hardware_type: _pageInfo.hardware_type |
|
|
|
}) |
|
|
|
this.updateVoiceSlider(); |
|
|
|
|
|
|
|
}, |
|
|
|
//滑动更改音响音量 |
|
|
|
sliderChange(e) { |
|
|
|
console.log('value 发生变化:' + e.detail.value) |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player-volume", |
|
|
|
"value": { |
|
|
|
"volume": e.detail.value.toString() |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
this.operateReq({ |
|
|
|
data: _data, |
|
|
|
isTip:true |
|
|
|
}) |
|
|
|
}, |
|
|
|
//更新音响音量 |
|
|
|
updateVoiceSlider(){ |
|
|
|
let that = this |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player-volume", |
|
|
|
"value": { |
|
|
|
"volume": "-1" |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
this.operateReq({ |
|
|
|
data: _data, |
|
|
|
succFun: (res) => { |
|
|
|
console.log("操作结果:",res); |
|
|
|
that.voiceLevel = res.data |
|
|
|
}, |
|
|
|
isTip:false |
|
|
|
}) |
|
|
|
}, |
|
|
|
longPressHandle(e) { |
|
|
|
console.log("长按开始..."); |
|
|
|
this.voicePadConfig.step = 2 |
|
|
|
console.log('开始录音'); |
|
|
|
recorderManager.start({ |
|
|
|
format: "wav" |
|
|
|
console.log("长按开始..."); |
|
|
|
this.voicePadConfig.step = 2 |
|
|
|
console.log('开始录音'); |
|
|
|
recorderManager.start({ |
|
|
|
format: "wav" |
|
|
|
}); |
|
|
|
}, |
|
|
|
touchEndHandle(e) { |
|
|
|
console.log("触摸结束..."); |
|
|
|
this.voicePadConfig.step = 3 |
|
|
|
console.log('录音结束'); |
|
|
|
this.voicePadConfig.step = 3 |
|
|
|
console.log('录音结束'); |
|
|
|
recorderManager.stop(); |
|
|
|
}, |
|
|
|
//处理音响数据 |
|
|
|
HandleVoiceOperate({ |
|
|
|
switchInfo, |
|
|
|
status |
|
|
|
}) { |
|
|
|
console.log(switchInfo, status); |
|
|
|
if (status === 1) { //文字转语音 |
|
|
|
console.log("文字转语音"); |
|
|
|
this.voicePadConfig.showVoicePad = true |
|
|
|
this.voicePadConfig.step = 0 |
|
|
|
} else { //语音发送 |
|
|
|
console.log("语音发送"); |
|
|
|
this.voicePadConfig.showVoicePad = true |
|
|
|
this.voicePadConfig.step = 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
//发送语音到中控 |
|
|
|
async sendVoice() { |
|
|
|
let that = this |
|
|
|
console.log(deviceApi.ORIGIN) |
|
|
|
//文字转语音 |
|
|
|
let _url = ""; //需上传给后台的语音地址 |
|
|
|
if(this.voicePadConfig.step==0){ |
|
|
|
let txt = this.voicePadConfig.txt |
|
|
|
if(!txt)return util.showNone("请先输入您要说的话后重试") |
|
|
|
_url = `${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`; |
|
|
|
} |
|
|
|
//已录音 |
|
|
|
if(this.voicePadConfig.step==3){ |
|
|
|
console.log("本地录音path:",that.voicePadConfig.voicePath); |
|
|
|
let e = await deviceServer.uploadFile({ |
|
|
|
url: deviceApi.uploadAudio, |
|
|
|
filePath: that.voicePadConfig.voicePath |
|
|
|
}); |
|
|
|
let _res = util.jsonPar(e.data); |
|
|
|
if (_res.code == 0) { |
|
|
|
that.voicePadConfig.voiceUrl = _res.data.url |
|
|
|
console.log("上传成功后path:", that.voicePadConfig.voiceUrl); |
|
|
|
_url = _res.data.url // 上传后地址 |
|
|
|
} else { |
|
|
|
console.error('上传录音失败--->', _res); |
|
|
|
util.showNone(_res.message || '上传录音失败,请重试!') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
//组装中控所需data |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player", |
|
|
|
"value": { |
|
|
|
"url": _url |
|
|
|
} |
|
|
|
}, |
|
|
|
// "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464" |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
}, |
|
|
|
//处理音响数据 |
|
|
|
HandleVoiceOperate({ |
|
|
|
switchInfo, |
|
|
|
status |
|
|
|
}) { |
|
|
|
console.log(switchInfo, status); |
|
|
|
if (status === 1) { //文字转语音 |
|
|
|
console.log("文字转语音"); |
|
|
|
this.voicePadConfig.showVoicePad = true |
|
|
|
this.voicePadConfig.step = 0 |
|
|
|
} else { //语音发送 |
|
|
|
console.log("语音发送"); |
|
|
|
this.voicePadConfig.showVoicePad = true |
|
|
|
this.voicePadConfig.step = 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
//发送语音到中控 |
|
|
|
async sendVoice() { |
|
|
|
let that = this |
|
|
|
console.log(deviceApi.ORIGIN) |
|
|
|
//文字转语音 |
|
|
|
let _url = ""; //需上传给后台的语音地址 |
|
|
|
if(this.voicePadConfig.step==0){ |
|
|
|
let txt = this.voicePadConfig.txt |
|
|
|
if(!txt)return util.showNone("请先输入您要说的话后重试") |
|
|
|
_url = `${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`; |
|
|
|
} |
|
|
|
//已录音 |
|
|
|
if(this.voicePadConfig.step==3){ |
|
|
|
console.log("本地录音path:",that.voicePadConfig.voicePath); |
|
|
|
let e = await deviceServer.uploadFile({ |
|
|
|
url: deviceApi.uploadAudio, |
|
|
|
filePath: that.voicePadConfig.voicePath |
|
|
|
}); |
|
|
|
let _res = util.jsonPar(e.data); |
|
|
|
if (_res.code == 0) { |
|
|
|
that.voicePadConfig.voiceUrl = _res.data.url |
|
|
|
console.log("上传成功后path:", that.voicePadConfig.voiceUrl); |
|
|
|
_url = _res.data.url // 上传后地址 |
|
|
|
} else { |
|
|
|
console.error('上传录音失败--->', _res); |
|
|
|
util.showNone(_res.message || '上传录音失败,请重试!') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
//组装中控所需data |
|
|
|
let _data = { |
|
|
|
"device": this.curStoreInfo.device_name, |
|
|
|
"data": { |
|
|
|
"name": "audio-player", |
|
|
|
"value": { |
|
|
|
"url": _url |
|
|
|
} |
|
|
|
}, |
|
|
|
// "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464" |
|
|
|
} |
|
|
|
//发送命令到中控 |
|
|
|
if(_url)this.operateReq({ |
|
|
|
data: _data |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
//试听/播放 语音/录音 |
|
|
|
async listenVoice() { |
|
|
|
let self = this |
|
|
|
if(this.voicePadConfig.step==0){ |
|
|
|
//需要将语音下载到本地,然后播放 |
|
|
|
let txt = this.voicePadConfig.txt; |
|
|
|
if(!txt)return util.showNone("请先输入您要说的话后重试") |
|
|
|
let url =`${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`; |
|
|
|
let updated_url = await this.getDownloadUrl(url) |
|
|
|
innerAudioContext.src = updated_url |
|
|
|
} |
|
|
|
if(this.voicePadConfig.step==3){ |
|
|
|
innerAudioContext.src = this.voicePadConfig.voicePath; |
|
|
|
} |
|
|
|
console.log('播放录音文件:', innerAudioContext.src); |
|
|
|
if(innerAudioContext.src)innerAudioContext.play(); |
|
|
|
}, |
|
|
|
getDownloadUrl(url) { |
|
|
|
console.log('下载录音'); |
|
|
|
util.showLoad() |
|
|
|
return new Promise((rs,rj)=>{ |
|
|
|
uni.downloadFile({ |
|
|
|
url: url, //资源路径e |
|
|
|
success: (res) => { |
|
|
|
if (res.statusCode === 200) { |
|
|
|
console.log('下载成功',res); |
|
|
|
util.hideLoad() |
|
|
|
rs(res.tempFilePath) |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: (e) => { |
|
|
|
console.log('文字转录音文件下载失败',e); |
|
|
|
util.hideLoad() |
|
|
|
rj(e) |
|
|
|
}, |
|
|
|
complete: (e) => { |
|
|
|
util.hideLoad() |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
getDeviceList({ |
|
|
|
stadium_id, |
|
|
|
hardware_type, |
|
|
|
limit = 100, |
|
|
|
page = 1 |
|
|
|
}) { |
|
|
|
util.showLoad(); |
|
|
|
deviceServer.get({ |
|
|
|
url: deviceApi.hardwareList, |
|
|
|
data: { |
|
|
|
'filter[hardware_type]': hardware_type, |
|
|
|
'filter[stadium_id]': stadium_id, |
|
|
|
'limit': limit, |
|
|
|
'page': page, |
|
|
|
}, |
|
|
|
failMsg: '加载失败!' |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
util.hideLoad(); |
|
|
|
let _list = res.list || []; |
|
|
|
|
|
|
|
//直接拿中控在线状态 做下临时处理先用中控状态的数据填一下 |
|
|
|
let deviceInfo = uni.getStorageSync("deviceInfo"); |
|
|
|
_list = _list.map((e,i)=>{ |
|
|
|
e['defineStatusCode'] = deviceInfo.Online==1? 1 : 0; |
|
|
|
return e |
|
|
|
}) |
|
|
|
this.deviceList = _list; |
|
|
|
console.log(res) |
|
|
|
|
|
|
|
this.updateVoiceSlider(); |
|
|
|
}) |
|
|
|
.catch(util.hideLoad) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
//试听/播放 语音/录音 |
|
|
|
async listenVoice() { |
|
|
|
let self = this |
|
|
|
if(this.voicePadConfig.step==0){ |
|
|
|
//需要将语音下载到本地,然后播放 |
|
|
|
let txt = this.voicePadConfig.txt; |
|
|
|
if(!txt)return util.showNone("请先输入您要说的话后重试") |
|
|
|
let url =`${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`; |
|
|
|
let updated_url = await this.getDownloadUrl(url) |
|
|
|
innerAudioContext.src = updated_url |
|
|
|
} |
|
|
|
if(this.voicePadConfig.step==3){ |
|
|
|
innerAudioContext.src = this.voicePadConfig.voicePath; |
|
|
|
} |
|
|
|
console.log('播放录音文件:', innerAudioContext.src); |
|
|
|
if(innerAudioContext.src)innerAudioContext.play(); |
|
|
|
}, |
|
|
|
getDownloadUrl(url) { |
|
|
|
console.log('下载录音'); |
|
|
|
util.showLoad() |
|
|
|
return new Promise((rs,rj)=>{ |
|
|
|
uni.downloadFile({ |
|
|
|
url: url, //资源路径e |
|
|
|
success: (res) => { |
|
|
|
if (res.statusCode === 200) { |
|
|
|
console.log('下载成功',res); |
|
|
|
util.hideLoad() |
|
|
|
rs(res.tempFilePath) |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: (e) => { |
|
|
|
console.log('文字转录音文件下载失败',e); |
|
|
|
util.hideLoad() |
|
|
|
rj(e) |
|
|
|
}, |
|
|
|
complete: (e) => { |
|
|
|
util.hideLoad() |
|
|
|
}, |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
getDeviceList({ |
|
|
|
stadium_id, |
|
|
|
hardware_type, |
|
|
|
limit = 100, |
|
|
|
page = 1 |
|
|
|
}) { |
|
|
|
util.showLoad(); |
|
|
|
deviceServer.get({ |
|
|
|
url: deviceApi.hardwareList, |
|
|
|
data: { |
|
|
|
'filter[hardware_type]': hardware_type, |
|
|
|
'filter[stadium_id]': stadium_id, |
|
|
|
'limit': limit, |
|
|
|
'page': page, |
|
|
|
}, |
|
|
|
failMsg: '加载失败!' |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
util.hideLoad(); |
|
|
|
let _list = res.list || []; |
|
|
|
|
|
|
|
//直接拿中控在线状态 做下临时处理先用中控状态的数据填一下 |
|
|
|
let deviceInfo = uni.getStorageSync("deviceInfo"); |
|
|
|
_list = _list.map((e,i)=>{ |
|
|
|
e['defineStatusCode'] = deviceInfo.Online==1? 1 : 0; |
|
|
|
return e |
|
|
|
}) |
|
|
|
this.deviceList = _list; |
|
|
|
console.log(res) |
|
|
|
|
|
|
|
this.updateVoiceSlider(); |
|
|
|
}) |
|
|
|
.catch(util.hideLoad) |
|
|
|
}, |
|
|
|
// 按钮操作, status 0 -> 关(左), 1 -> 开(右) |
|
|
|
operateBtn: util.debounce(function({ |
|
|
@ -405,9 +405,9 @@ |
|
|
|
let _data = this.getOperateReqData({ |
|
|
|
switchInfo, |
|
|
|
status |
|
|
|
}) |
|
|
|
|
|
|
|
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); |
|
|
|
}) |
|
|
|
|
|
|
|
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); |
|
|
|
|
|
|
|
//针对门禁没有关按钮发两条命令->开&关 20201224 后端: 直接发两条 关的那条这里填5 然后你那边不用管返回 |
|
|
|
if (switchInfo.hardware_type === 'AccessControl' && status == 1) { |
|
|
@ -457,13 +457,13 @@ |
|
|
|
}, |
|
|
|
// 操作接口请求 |
|
|
|
operateReq({ |
|
|
|
data, |
|
|
|
data, |
|
|
|
succFun, |
|
|
|
isTip = true, |
|
|
|
isLoad = true |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
let that = this |
|
|
|
if (isLoad) util.showLoad(); |
|
|
|
if (isLoad) util.showLoad(); |
|
|
|
|
|
|
|
deviceServer.post({ |
|
|
|
url: deviceApi.ouxuanac, |
|
|
@ -472,9 +472,9 @@ |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (isLoad) util.hideLoad(); |
|
|
|
if (res.data.code == 0) { |
|
|
|
if (res.data.code == 0) { |
|
|
|
succFun(res.data); |
|
|
|
if (isTip) util.showNone(res.data.message || '操作成功!'); |
|
|
|
if (isTip) util.showNone(res.data.message || '操作成功!'); |
|
|
|
that.voicePadConfig.showVoicePad = false; //操作成功后关闭voicePad |
|
|
|
} else { |
|
|
|
if (isTip) util.showNone(res.data.message || '操作失败!'); |
|
|
@ -516,12 +516,12 @@ |
|
|
|
// this.getStatusReq({ |
|
|
|
// data: this.getSwitchStatusQuery(switchInfo), |
|
|
|
// index, |
|
|
|
// }) |
|
|
|
//TODO 等待后续音响设备调试后,再开放更新设备状态功能 |
|
|
|
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); |
|
|
|
|
|
|
|
util.showLoad(); |
|
|
|
setTimeout(()=>util.hideLoad(),1000) |
|
|
|
// }) |
|
|
|
//TODO 等待后续音响设备调试后,再开放更新设备状态功能 |
|
|
|
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); |
|
|
|
|
|
|
|
util.showLoad(); |
|
|
|
setTimeout(()=>util.hideLoad(),1000) |
|
|
|
}, 300, 300), |
|
|
|
// 获取设备状态 |
|
|
|
getStatusReq({ |
|
|
@ -674,7 +674,7 @@ |
|
|
|
let _obj = { |
|
|
|
'Gpio': 'get-rpio', // 全设备 |
|
|
|
'SerialPort485': 'zzio404d-gpio-status', |
|
|
|
'Tcp': 'zzio404d-gpio-status-tcp', |
|
|
|
'Tcp': 'zzio404d-gpio-status-tcp', |
|
|
|
'YZK':'zzio404d-gpio-status' |
|
|
|
}; |
|
|
|
|
|
|
@ -689,7 +689,7 @@ |
|
|
|
let _obj = { |
|
|
|
'Gpio': 'set-rpio', // 全设备 |
|
|
|
'SerialPort485': 'zzio404d-gpio', |
|
|
|
'Tcp': 'zzio404d-gpio-tcp', |
|
|
|
'Tcp': 'zzio404d-gpio-tcp', |
|
|
|
'YZK':'zzio404d-gpio' |
|
|
|
}; |
|
|
|
|
|
|
@ -707,7 +707,7 @@ |
|
|
|
let _obj = { |
|
|
|
'acmelec': 'acmelec', |
|
|
|
'zhongnan': 'zhongnan', |
|
|
|
'jianda': 'ray-air-rs', |
|
|
|
'jianda': 'ray-air-rs', |
|
|
|
"XiaoHuiXiong":"xhx-lora-air-tcp" |
|
|
|
}; |
|
|
|
return _obj[this.changeLowerCase(hardware_model)] || ''; |
|
|
@ -726,20 +726,25 @@ |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
@import '~style/public.scss'; |
|
|
|
.slider-box{ |
|
|
|
margin-bottom: 40rpx; |
|
|
|
> text { |
|
|
|
margin-left: 30rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #9C9C9F; |
|
|
|
} |
|
|
|
> view{ |
|
|
|
width: 100%; |
|
|
|
color: #9C9C9F; |
|
|
|
font-size: 28rpx; |
|
|
|
@include centerFlex(space-between); |
|
|
|
padding: 0 34rpx; |
|
|
|
} |
|
|
|
page{ |
|
|
|
background:url(../../static/images/page_bg.jpg) repeat-y; |
|
|
|
background-size: 100%; |
|
|
|
background-attachment: fixed; |
|
|
|
} |
|
|
|
.slider-box{ |
|
|
|
margin-bottom: 40rpx; |
|
|
|
> text { |
|
|
|
margin-left: 30rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #9C9C9F; |
|
|
|
} |
|
|
|
> view{ |
|
|
|
width: 100%; |
|
|
|
color: #9C9C9F; |
|
|
|
font-size: 28rpx; |
|
|
|
@include centerFlex(space-between); |
|
|
|
padding: 0 34rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.sm-tit { |
|
|
|
padding-left: 40upx; |
|
|
@ -758,7 +763,7 @@ |
|
|
|
|
|
|
|
text:last-child { |
|
|
|
width: 466rpx; |
|
|
|
color: #9C9C9F; |
|
|
|
color: #fff; |
|
|
|
font-size: 24rpx; |
|
|
|
} |
|
|
|
} |
|
|
@ -773,8 +778,8 @@ |
|
|
|
margin-bottom: 30upx; |
|
|
|
width: 328upx; |
|
|
|
border-radius: 10upx; |
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
box-shadow: 0 4upx 12upx 0 #00987454, inset 0 0 40upx 0 #ffffff80; |
|
|
|
background-image: linear-gradient(180deg, #eff6f44d 0%, #FFFFFF 100%); |
|
|
|
.si-top { |
|
|
|
padding: 20upx 20upx 30upx; |
|
|
|
display: flex; |
|
|
@ -973,4 +978,4 @@ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |