Commit fd29a166 by 朱建香

1208

parent de3d8ca3
......@@ -46,6 +46,6 @@ export default {
"ringBell_timeout": 300,
"intervalTime": 3,
"getHistoryTime": 10,
// "audioUrl": "../../resources/audio/tipSound.mp3"
"audioUrl": "_www/resources/audio/tipSound.mp3"
"audioUrl": "../../resources/audio/tipSound.mp3"
// "audioUrl": "_www/resources/audio/tipSound.mp3"
}
\ No newline at end of file
......@@ -23,6 +23,7 @@ function init() {
list:[],
startId: 0,
deviceId: null,
flag: true
},
mounted(){
resolve(this);
......@@ -94,6 +95,17 @@ function initComponentsConfig() {
},
success: (response) => {
console.log(response);
if(self.flag){
let data = uPublic.checkResponseData(response.data);
if(data && data.record.length > 0){
let record = data.record;
iot.storage.setMap('notifyTime', moment(record[0].time).toISOString(), (res) => {
console.log(res);
self.flag = false;
}, () => {
});
}
}
let data = uPublic.checkResponseData(response.data);
if(data){
let list = [];
......
......@@ -24,7 +24,8 @@ function init() {
list: [],
startId: 0,
deviceId: null,
userInfo: []
userInfo: [],
flag: true
},
mounted(){
resolve(this);
......@@ -101,6 +102,17 @@ function initComponentsConfig() {
page_size: PAGE_SIZE
},
success: (response) => {
if(self.flag){
let data = uPublic.checkResponseData(response.data);
if(data && data.record.length > 0){
let record = data.record;
iot.storage.setMap('alarmTime', moment(record[0].time).toISOString(), (res) => {
console.log(res);
self.flag = false;
}, () => {
});
}
}
let data = uPublic.checkResponseData(response.data);
if(data){
console.log(data);
......
......@@ -23,7 +23,8 @@ function init() {
list: [],
startId: 0,
deviceId: null,
userInfo: []
userInfo: [],
flag: true
},
mounted(){
resolve(this);
......@@ -128,6 +129,17 @@ function getHistoryRecord(self){
},
success: (response) => {
setListData(self, response);
if(self.flag){
let data = uPublic.checkResponseData(response.data);
if(data && data.record.length > 0){
let record = data.record;
iot.storage.setMap('openTime', moment(record[0].time).toISOString(), (res) => {
console.log(res);
self.flag = false;
}, () => {
});
}
}
},
error: (error) => {
console.log(error);
......
......@@ -196,7 +196,7 @@ function setUserData(self, data){
role: data[i].role,
image: data[i].role == 0 ? '../../resources/image/green_admin_icon.png' : data[i].user_id == null ? '../../resources/image/gray_unbindHead_icon.png' : '../../resources/image/green_bindHead_icon.png',
title: data[i].nickname,
subtitle: data[i].username ? Vue.t('userList.binded'):Vue.t('userList.unbind')
subtitle: data[i].hasOwnProperty('username') ? Vue.t('userList.binded'):Vue.t('userList.unbind')
}
}
console.log(data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment