Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DoorLock
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
felix
DoorLock
Commits
2856b73b
Commit
2856b73b
authored
Nov 10, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1110
parent
70fa574d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
85 deletions
+101
-85
dev/src/lang/zh.json
+14
-13
dev/src/view/device/v_index.js
+43
-36
web/resources/lang/zh.json
+0
-0
web/view/device/index.js
+43
-36
web/view/doorlockUsers/inviteBind.html
+1
-0
No files found.
dev/src/lang/zh.json
View file @
2856b73b
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
"myInfo"
:
"个人信息"
,
"myInfo"
:
"个人信息"
,
"editNickname"
:
"修改昵称"
,
"editNickname"
:
"修改昵称"
,
"editPassword"
:
"修改密码"
,
"editPassword"
:
"修改密码"
,
"addUnlockInfo"
:
"
绑定开锁信息
"
,
"addUnlockInfo"
:
"
关联开锁ID
"
,
"deviceList"
:
"产品型号"
"deviceList"
:
"产品型号"
},
},
"guide"
:{
"guide"
:{
...
@@ -181,10 +181,10 @@
...
@@ -181,10 +181,10 @@
"reBindDevice"
:
"请重新绑定"
"reBindDevice"
:
"请重新绑定"
},
},
"wifiAddHelp"
:
{
"wifiAddHelp"
:
{
"helpTitle"
:
"配置W
i-Fi
说明:"
,
"helpTitle"
:
"配置W
IFI
说明:"
,
"helpCont1"
:
"1.
按下指纹锁背面的按钮,进入主菜单,选择Wi-Fi设置→配置Wi-Fi,门锁进入等待配网状态
"
,
"helpCont1"
:
"1.
确认设备端进入配网模式(详情操作请见产品说明书)
"
,
"helpCont2"
:
"2.点击页面
“开始配置Wi-Fi” 按钮,进入Wi-Fi配网画
面"
,
"helpCont2"
:
"2.点击页面
下方“开始配置Wi-Fi”按钮,进入WiFi配网页
面"
,
"helpCont3"
:
"3.输入Wi-Fi密码,点击
“l连接” 按钮,等待锁端相应,直至配网成功
"
,
"helpCont3"
:
"3.输入Wi-Fi密码,点击
“连接”,等待锁端响应,至配网成功。
"
,
"helpCont4"
:
"(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"
"helpCont4"
:
"(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"
},
},
"wifiAdd"
:
{
"wifiAdd"
:
{
...
@@ -245,8 +245,8 @@
...
@@ -245,8 +245,8 @@
"inviteBind"
:
"邀请绑定"
,
"inviteBind"
:
"邀请绑定"
,
"bindUnlockInfo"
:
"关联开锁信息"
,
"bindUnlockInfo"
:
"关联开锁信息"
,
"opendoorRecord"
:
"历史开门记录"
,
"opendoorRecord"
:
"历史开门记录"
,
"unbindDialogTip"
:
"<span></span>解绑后,
您将失去对门锁所有查看功能该用户仍在用户列表中
"
,
"unbindDialogTip"
:
"<span></span>解绑后,
该用户不能对门锁下的信息进行查看
"
,
"deleteUserDialogTip"
:
"删除后,
二者不再为绑定关系,用户无法查看该门锁下的任何信息,该用户名下绑定的所有ID号仍可以显示在开门记录中
"
,
"deleteUserDialogTip"
:
"删除后,
用户对应的开锁id取消关联,同时失去信息查看权限。
"
,
"unbindSuccess"
:
"解绑成功"
,
"unbindSuccess"
:
"解绑成功"
,
"unbindFailue"
:
"解绑失败"
,
"unbindFailue"
:
"解绑失败"
,
"guideStep1Tip1"
:
"邀请绑定成功"
,
"guideStep1Tip1"
:
"邀请绑定成功"
,
...
@@ -268,12 +268,13 @@
...
@@ -268,12 +268,13 @@
"inviteBind"
:{
"inviteBind"
:{
"qrcodeExpireTip"
:
"二维码已过期,请重新生成"
,
"qrcodeExpireTip"
:
"二维码已过期,请重新生成"
,
"title"
:
"注意事项:"
,
"title"
:
"注意事项:"
,
"cont1"
:
"1.直接通过微信扫一扫添加门锁"
,
"cont1"
:
"1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁"
,
"cont2"
:
"2.将此二维码保存为图片,发送给好友,好友通过长按识别二维码"
"cont2"
:
"2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码"
,
"cont3"
:
"3.有效时间10分钟,失效后请点击“重新生成二维码"
},
},
"unlockInfo"
:{
"unlockInfo"
:{
"bindUnlockInfo"
:
"已关联的开锁信息"
,
"bindUnlockInfo"
:
"已关联的开锁信息"
,
"noInfoTip"
:
"
目前无绑定任何信息
,请添加"
,
"noInfoTip"
:
"
当前无绑定开锁ID
,请添加"
,
"passwordOpenDoor"
:
"密码"
,
"passwordOpenDoor"
:
"密码"
,
"fingerprintOpenDoor"
:
"指纹"
,
"fingerprintOpenDoor"
:
"指纹"
,
"ICcardOpenDoor"
:
"IC卡"
,
"ICcardOpenDoor"
:
"IC卡"
,
...
@@ -282,11 +283,11 @@
...
@@ -282,11 +283,11 @@
"appRemoteOpenDoor"
:
"app远程"
,
"appRemoteOpenDoor"
:
"app远程"
,
"hijackingAlarm"
:
"劫持指纹"
,
"hijackingAlarm"
:
"劫持指纹"
,
"setHijack"
:
"设为劫持"
,
"setHijack"
:
"设为劫持"
,
"setHijackTip"
:
"确认设为劫持指纹
吗
?"
,
"setHijackTip"
:
"确认设为劫持指纹?"
,
"cancelHijack"
:
"取消劫持"
,
"cancelHijack"
:
"取消劫持"
,
"cancelHijackTip"
:
"确认取消劫持指纹
吗
?"
,
"cancelHijackTip"
:
"确认取消劫持指纹?"
,
"cancelAssociated"
:
"取消关联"
,
"cancelAssociated"
:
"取消关联"
,
"cancelAssociatedTip"
:
"取消关联后,开门历史记录中将不再显示关联的用户信息"
,
"cancelAssociatedTip"
:
"取消关联后,开门历史记录中将不再显示关联的用户信息
。
"
,
"cancelAssociatedSuccess"
:
"取消关联成功"
,
"cancelAssociatedSuccess"
:
"取消关联成功"
,
"cancelAssociatedFailue"
:
"取消关联失败"
,
"cancelAssociatedFailue"
:
"取消关联失败"
,
"setHijackSuccess"
:
"设为劫持指纹成功"
,
"setHijackSuccess"
:
"设为劫持指纹成功"
,
...
...
dev/src/view/device/v_index.js
View file @
2856b73b
...
@@ -15,7 +15,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
...
@@ -15,7 +15,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot
.
ready
(
init
);
iot
.
ready
(
init
);
function
init
()
{
function
init
()
{
notificationListener
();
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
uPublic
.
componentsInit
([
'u-carousel'
,
'u-marquee'
,
'u-switch'
,
'u-button'
,
'u-dialog'
,
'u-loading'
,
'u-text'
,
'u-comm-loading'
]);
uPublic
.
componentsInit
([
'u-carousel'
,
'u-marquee'
,
'u-switch'
,
'u-button'
,
'u-dialog'
,
'u-loading'
,
'u-text'
,
'u-comm-loading'
]);
const
app
=
new
Vue
({
const
app
=
new
Vue
({
...
@@ -90,6 +90,7 @@ function init() {
...
@@ -90,6 +90,7 @@ function init() {
status
:
0
status
:
0
},
},
mounted
(){
mounted
(){
notificationListener
(
this
);
let
self
=
this
;
let
self
=
this
;
iot
.
navigator
.
closeAllBesidesItself
();
iot
.
navigator
.
closeAllBesidesItself
();
//获取设备信息
//获取设备信息
...
@@ -445,12 +446,14 @@ async function getRecordTime(self, data){
...
@@ -445,12 +446,14 @@ async function getRecordTime(self, data){
console
.
log
(
"openTime"
+
self
.
openTime
);
console
.
log
(
"openTime"
+
self
.
openTime
);
let
now
=
moment
();
let
now
=
moment
();
if
(
self
.
notifyTime
){
if
(
self
.
notifyTime
){
console
.
log
(
"notifyTime"
+
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
));
self
.
notifyTime
=
moment
(
self
.
notifyTime
,
moment
.
ISO_8601
);
self
.
notifyTime
=
moment
(
self
.
notifyTime
,
moment
.
ISO_8601
);
if
(
newNotifyTime
!=
null
&&
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
)
>
0
){
if
(
newNotifyTime
!=
null
&&
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
)
>
0
){
self
.
securityAlarmFlag
=
true
;
self
.
securityAlarmFlag
=
true
;
self
.
notifyTime
=
newNotifyTime
;
self
.
notifyTime
=
newNotifyTime
;
}
}
}
else
{
}
else
{
console
.
log
(
"notifyTime"
+
now
.
diff
(
newNotifyTime
,
'hours'
));
if
(
newNotifyTime
!=
null
&&
now
.
diff
(
newNotifyTime
,
'hours'
)
<
1
){
if
(
newNotifyTime
!=
null
&&
now
.
diff
(
newNotifyTime
,
'hours'
)
<
1
){
self
.
securityAlarmFlag
=
true
;
self
.
securityAlarmFlag
=
true
;
self
.
notifyTime
=
newNotifyTime
;
self
.
notifyTime
=
newNotifyTime
;
...
@@ -458,11 +461,13 @@ async function getRecordTime(self, data){
...
@@ -458,11 +461,13 @@ async function getRecordTime(self, data){
}
}
if
(
self
.
alarmTime
){
if
(
self
.
alarmTime
){
self
.
alarmTime
=
moment
(
self
.
alarmTime
,
moment
.
ISO_8601
);
self
.
alarmTime
=
moment
(
self
.
alarmTime
,
moment
.
ISO_8601
);
console
.
log
(
"Alarm"
+
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
));
if
(
newAlarmTime
!=
null
&&
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
)
>
0
){
if
(
newAlarmTime
!=
null
&&
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
)
>
0
){
self
.
hijackAlarmFlag
=
true
;
self
.
hijackAlarmFlag
=
true
;
self
.
alarmTime
=
newAlarmTime
.
unix
();
self
.
alarmTime
=
newAlarmTime
.
unix
();
}
}
}
else
{
}
else
{
console
.
log
(
"Alarm"
+
now
.
diff
(
newAlarmTime
,
'hours'
));
if
(
newAlarmTime
!=
null
&&
now
.
diff
(
newAlarmTime
,
'hours'
)
<
1
){
if
(
newAlarmTime
!=
null
&&
now
.
diff
(
newAlarmTime
,
'hours'
)
<
1
){
self
.
hijackAlarmFlag
=
true
;
self
.
hijackAlarmFlag
=
true
;
self
.
alarmTime
=
newAlarmTime
;
self
.
alarmTime
=
newAlarmTime
;
...
@@ -470,13 +475,14 @@ async function getRecordTime(self, data){
...
@@ -470,13 +475,14 @@ async function getRecordTime(self, data){
}
}
if
(
self
.
openTime
){
if
(
self
.
openTime
){
self
.
openTime
=
moment
(
self
.
openTime
,
moment
.
ISO_8601
);
self
.
openTime
=
moment
(
self
.
openTime
,
moment
.
ISO_8601
);
console
.
log
(
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
));
console
.
log
(
"openTime"
+
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
));
if
(
newOpenTime
!=
null
&&
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
)
>
0
){
if
(
newOpenTime
!=
null
&&
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
)
>
0
){
console
.
log
(
"innnn"
);
console
.
log
(
"innnn"
);
self
.
opendoorRecordFlag
=
true
;
self
.
opendoorRecordFlag
=
true
;
self
.
openTime
=
newOpenTime
;
self
.
openTime
=
newOpenTime
;
}
}
}
else
{
}
else
{
console
.
log
(
"openTime"
+
now
.
diff
(
newOpenTime
,
'hours'
));
if
(
newOpenTime
!=
null
&&
now
.
diff
(
newOpenTime
,
'hours'
)
<
1
){
if
(
newOpenTime
!=
null
&&
now
.
diff
(
newOpenTime
,
'hours'
)
<
1
){
console
.
log
(
"innnnn"
);
console
.
log
(
"innnnn"
);
self
.
opendoorRecordFlag
=
true
;
self
.
opendoorRecordFlag
=
true
;
...
@@ -618,15 +624,19 @@ function setDevceInfo(self, data) {
...
@@ -618,15 +624,19 @@ function setDevceInfo(self, data) {
}
else
if
(
data
.
notify_type
.
value
==
5
){
}
else
if
(
data
.
notify_type
.
value
==
5
){
//请求远程开门
//请求远程开门
// self.setRemoteOpendoorFlag(true);
// self.setRemoteOpendoorFlag(true);
let
now
=
moment
();
let
time
=
moment
(
data
.
time
.
value
,
"YY-MM-DD-hh-mm-ss"
);
if
(
now
.
diff
(
time
,
'hours'
)
<
24
){
self
.
setValueRemoteOpendoor
(
true
);
self
.
setValueRemoteOpendoor
(
true
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
}
}
else
if
(
data
.
notify_type
.
value
==
2
){
}
else
if
(
data
.
notify_type
.
value
==
2
){
getLockInfo
(
self
);
//
getLockInfo(self);
}
}
}
}
if
(
data
.
action
.
value
==
'lock_log'
&&
(
data
.
lock_action
.
value
==
'1'
||
data
.
lock_action
.
value
==
'4'
)){
if
(
data
.
action
.
value
==
'lock_log'
&&
(
data
.
lock_action
.
value
==
'1'
||
data
.
lock_action
.
value
==
'4'
)){
//开门或远程开门成功
//开门或远程开门成功
getLockInfo
(
self
);
//
getLockInfo(self);
if
(
data
.
lock_action
.
value
==
'4'
){
if
(
data
.
lock_action
.
value
==
'4'
){
uComponents
.
changeCommLoadingStatusAndText
(
self
,
1
,
Vue
.
t
(
'remoteOpendoor.openDoorSuccess'
));
uComponents
.
changeCommLoadingStatusAndText
(
self
,
1
,
Vue
.
t
(
'remoteOpendoor.openDoorSuccess'
));
uComponents
.
changeCommButtonText
(
self
,
Vue
.
t
(
'btn.confirm'
));
uComponents
.
changeCommButtonText
(
self
,
Vue
.
t
(
'btn.confirm'
));
...
@@ -663,45 +673,42 @@ function sleep(time){
...
@@ -663,45 +673,42 @@ function sleep(time){
})
})
}
}
function
pushAction
(
msg
)
{
function
pushAction
(
self
,
msg
)
{
console
.
log
(
"pushMessage"
);
console
.
log
(
msg
);
console
.
log
(
msg
);
// var payload = msg.payload;
var
payload
=
msg
.
payload
;
// if (typeof payload == 'string') {
if
(
typeof
payload
==
'string'
)
{
// payload = JSON.parse(msg.payload);
payload
=
JSON
.
parse
(
msg
.
payload
);
// }
}
// console.log(payload);
console
.
log
(
payload
);
// if (payload.hasOwnProperty('date')) {
// console.log('in evaluation');
if
(
payload
.
type
==
"open"
){
// } else if (payload.hasOwnProperty('report')) {
//开门推送
// console.log('in slim');
getLockInfo
(
self
);
// }
}
else
if
(
payload
.
type
==
"notify"
){
//安全报警
getLockInfo
(
self
);
}
else
if
(
payload
.
type
==
"alarm"
){
//劫持报警
getLockInfo
(
self
);
}
else
if
(
payload
.
type
==
"ring"
){
//门铃
ringBell
(
self
);
}
else
if
(
payload
.
type
==
"remoteOpen"
){
//远程开门通知
self
.
setValueRemoteOpendoor
(
true
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
}
}
}
function
notificationListener
()
{
function
notificationListener
(
self
)
{
// if (plus.os.name == 'Android') {
// setInterval(function () {
// console.log("innn");
// var pushMsgArray = plus.push.getAllMessage();
// plus.push.setAutoNotification(false);
// console.log(pushMsgArray);
// if (pushMsgArray) {
// var pushMsgLength = pushMsgArray.length;
// console.log(pushMsgLength);
// if (pushMsgLength) {
// var pushMsg = pushMsgArray[(pushMsgArray.length - 1)];
// pushAction(pushMsg);
// plus.push.clear();
// }
// }
// }, config.GET_MSG_INTERVAL);
// }
// 从系统消息中心点击消息启动应用事件
// 从系统消息中心点击消息启动应用事件
plus
.
push
.
addEventListener
(
'click'
,
function
(
msg
)
{
plus
.
push
.
addEventListener
(
'click'
,
function
(
msg
)
{
pushAction
(
msg
);
pushAction
(
self
,
msg
);
},
false
);
},
false
);
// 应用从推送服务器接收到推送消息事件
// 应用从推送服务器接收到推送消息事件
plus
.
push
.
addEventListener
(
'receive'
,
function
(
msg
)
{
plus
.
push
.
addEventListener
(
'receive'
,
function
(
msg
)
{
pushAction
(
msg
);
pushAction
(
self
,
msg
);
// plus.push.createMessage(msg.content, msg.payload);
// plus.push.createMessage(msg.content, msg.payload);
},
false
);
},
false
);
}
}
...
@@ -821,7 +828,7 @@ function remoteOpendoorTap(self){
...
@@ -821,7 +828,7 @@ function remoteOpendoorTap(self){
//tap 劫持报警
//tap 劫持报警
function
hijackAlarmTap
(
self
){
function
hijackAlarmTap
(
self
){
if
(
self
.
alarmTime
==
1
){
if
(
self
.
alarmTime
!=
null
){
self
.
hijackAlarmFlag
=
false
;
self
.
hijackAlarmFlag
=
false
;
setRecordTime
(
'alarmTime'
,
self
.
alarmTime
.
toISOString
());
setRecordTime
(
'alarmTime'
,
self
.
alarmTime
.
toISOString
());
}
}
...
...
web/resources/lang/zh.json
View file @
2856b73b
This diff is collapsed.
Click to expand it.
web/view/device/index.js
View file @
2856b73b
...
@@ -23855,7 +23855,7 @@ _public.iot.ready(init); /**
...
@@ -23855,7 +23855,7 @@ _public.iot.ready(init); /**
*/
*/
function
init
()
{
function
init
()
{
notificationListener
();
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
_public
.
uPublic
.
componentsInit
([
'u-carousel'
,
'u-marquee'
,
'u-switch'
,
'u-button'
,
'u-dialog'
,
'u-loading'
,
'u-text'
,
'u-comm-loading'
]);
_public
.
uPublic
.
componentsInit
([
'u-carousel'
,
'u-marquee'
,
'u-switch'
,
'u-button'
,
'u-dialog'
,
'u-loading'
,
'u-text'
,
'u-comm-loading'
]);
var
app
=
new
Vue
({
var
app
=
new
Vue
({
...
@@ -23930,6 +23930,7 @@ function init() {
...
@@ -23930,6 +23930,7 @@ function init() {
status
:
0
status
:
0
},
},
mounted
:
function
mounted
()
{
mounted
:
function
mounted
()
{
notificationListener
(
this
);
var
self
=
this
;
var
self
=
this
;
_public
.
iot
.
navigator
.
closeAllBesidesItself
();
_public
.
iot
.
navigator
.
closeAllBesidesItself
();
//获取设备信息
//获取设备信息
...
@@ -24329,12 +24330,14 @@ function getRecordTime(self, data) {
...
@@ -24329,12 +24330,14 @@ function getRecordTime(self, data) {
now
=
(
0
,
_moment2
.
default
)();
now
=
(
0
,
_moment2
.
default
)();
if
(
self
.
notifyTime
)
{
if
(
self
.
notifyTime
)
{
console
.
log
(
"notifyTime"
+
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
));
self
.
notifyTime
=
(
0
,
_moment2
.
default
)(
self
.
notifyTime
,
_moment2
.
default
.
ISO_8601
);
self
.
notifyTime
=
(
0
,
_moment2
.
default
)(
self
.
notifyTime
,
_moment2
.
default
.
ISO_8601
);
if
(
newNotifyTime
!=
null
&&
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
)
>
0
)
{
if
(
newNotifyTime
!=
null
&&
newNotifyTime
.
diff
(
self
.
notifyTime
,
'seconds'
)
>
0
)
{
self
.
securityAlarmFlag
=
true
;
self
.
securityAlarmFlag
=
true
;
self
.
notifyTime
=
newNotifyTime
;
self
.
notifyTime
=
newNotifyTime
;
}
}
}
else
{
}
else
{
console
.
log
(
"notifyTime"
+
now
.
diff
(
newNotifyTime
,
'hours'
));
if
(
newNotifyTime
!=
null
&&
now
.
diff
(
newNotifyTime
,
'hours'
)
<
1
)
{
if
(
newNotifyTime
!=
null
&&
now
.
diff
(
newNotifyTime
,
'hours'
)
<
1
)
{
self
.
securityAlarmFlag
=
true
;
self
.
securityAlarmFlag
=
true
;
self
.
notifyTime
=
newNotifyTime
;
self
.
notifyTime
=
newNotifyTime
;
...
@@ -24342,11 +24345,13 @@ function getRecordTime(self, data) {
...
@@ -24342,11 +24345,13 @@ function getRecordTime(self, data) {
}
}
if
(
self
.
alarmTime
)
{
if
(
self
.
alarmTime
)
{
self
.
alarmTime
=
(
0
,
_moment2
.
default
)(
self
.
alarmTime
,
_moment2
.
default
.
ISO_8601
);
self
.
alarmTime
=
(
0
,
_moment2
.
default
)(
self
.
alarmTime
,
_moment2
.
default
.
ISO_8601
);
console
.
log
(
"Alarm"
+
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
));
if
(
newAlarmTime
!=
null
&&
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
)
>
0
)
{
if
(
newAlarmTime
!=
null
&&
newAlarmTime
.
diff
(
self
.
alarmTime
,
'seconds'
)
>
0
)
{
self
.
hijackAlarmFlag
=
true
;
self
.
hijackAlarmFlag
=
true
;
self
.
alarmTime
=
newAlarmTime
.
unix
();
self
.
alarmTime
=
newAlarmTime
.
unix
();
}
}
}
else
{
}
else
{
console
.
log
(
"Alarm"
+
now
.
diff
(
newAlarmTime
,
'hours'
));
if
(
newAlarmTime
!=
null
&&
now
.
diff
(
newAlarmTime
,
'hours'
)
<
1
)
{
if
(
newAlarmTime
!=
null
&&
now
.
diff
(
newAlarmTime
,
'hours'
)
<
1
)
{
self
.
hijackAlarmFlag
=
true
;
self
.
hijackAlarmFlag
=
true
;
self
.
alarmTime
=
newAlarmTime
;
self
.
alarmTime
=
newAlarmTime
;
...
@@ -24354,13 +24359,14 @@ function getRecordTime(self, data) {
...
@@ -24354,13 +24359,14 @@ function getRecordTime(self, data) {
}
}
if
(
self
.
openTime
)
{
if
(
self
.
openTime
)
{
self
.
openTime
=
(
0
,
_moment2
.
default
)(
self
.
openTime
,
_moment2
.
default
.
ISO_8601
);
self
.
openTime
=
(
0
,
_moment2
.
default
)(
self
.
openTime
,
_moment2
.
default
.
ISO_8601
);
console
.
log
(
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
));
console
.
log
(
"openTime"
+
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
));
if
(
newOpenTime
!=
null
&&
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
)
>
0
)
{
if
(
newOpenTime
!=
null
&&
newOpenTime
.
diff
(
self
.
openTime
,
'seconds'
)
>
0
)
{
console
.
log
(
"innnn"
);
console
.
log
(
"innnn"
);
self
.
opendoorRecordFlag
=
true
;
self
.
opendoorRecordFlag
=
true
;
self
.
openTime
=
newOpenTime
;
self
.
openTime
=
newOpenTime
;
}
}
}
else
{
}
else
{
console
.
log
(
"openTime"
+
now
.
diff
(
newOpenTime
,
'hours'
));
if
(
newOpenTime
!=
null
&&
now
.
diff
(
newOpenTime
,
'hours'
)
<
1
)
{
if
(
newOpenTime
!=
null
&&
now
.
diff
(
newOpenTime
,
'hours'
)
<
1
)
{
console
.
log
(
"innnnn"
);
console
.
log
(
"innnnn"
);
self
.
opendoorRecordFlag
=
true
;
self
.
opendoorRecordFlag
=
true
;
...
@@ -24507,15 +24513,19 @@ function setDevceInfo(self, data) {
...
@@ -24507,15 +24513,19 @@ function setDevceInfo(self, data) {
}
else
if
(
data
.
notify_type
.
value
==
5
)
{
}
else
if
(
data
.
notify_type
.
value
==
5
)
{
//请求远程开门
//请求远程开门
// self.setRemoteOpendoorFlag(true);
// self.setRemoteOpendoorFlag(true);
var
_now
=
(
0
,
_moment2
.
default
)();
var
_time
=
(
0
,
_moment2
.
default
)(
data
.
time
.
value
,
"YY-MM-DD-hh-mm-ss"
);
if
(
_now
.
diff
(
_time
,
'hours'
)
<
24
)
{
self
.
setValueRemoteOpendoor
(
true
);
self
.
setValueRemoteOpendoor
(
true
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
}
}
else
if
(
data
.
notify_type
.
value
==
2
)
{
}
else
if
(
data
.
notify_type
.
value
==
2
)
{
getLockInfo
(
self
);
//
getLockInfo(self);
}
}
}
}
if
(
data
.
action
.
value
==
'lock_log'
&&
(
data
.
lock_action
.
value
==
'1'
||
data
.
lock_action
.
value
==
'4'
))
{
if
(
data
.
action
.
value
==
'lock_log'
&&
(
data
.
lock_action
.
value
==
'1'
||
data
.
lock_action
.
value
==
'4'
))
{
//开门或远程开门成功
//开门或远程开门成功
getLockInfo
(
self
);
//
getLockInfo(self);
if
(
data
.
lock_action
.
value
==
'4'
)
{
if
(
data
.
lock_action
.
value
==
'4'
)
{
_public
.
uComponents
.
changeCommLoadingStatusAndText
(
self
,
1
,
Vue
.
t
(
'remoteOpendoor.openDoorSuccess'
));
_public
.
uComponents
.
changeCommLoadingStatusAndText
(
self
,
1
,
Vue
.
t
(
'remoteOpendoor.openDoorSuccess'
));
_public
.
uComponents
.
changeCommButtonText
(
self
,
Vue
.
t
(
'btn.confirm'
));
_public
.
uComponents
.
changeCommButtonText
(
self
,
Vue
.
t
(
'btn.confirm'
));
...
@@ -24590,45 +24600,42 @@ function sleep(time) {
...
@@ -24590,45 +24600,42 @@ function sleep(time) {
});
});
}
}
function
pushAction
(
msg
)
{
function
pushAction
(
self
,
msg
)
{
console
.
log
(
"pushMessage"
);
console
.
log
(
msg
);
console
.
log
(
msg
);
// var payload = msg.payload;
var
payload
=
msg
.
payload
;
// if (typeof payload == 'string') {
if
(
typeof
payload
==
'string'
)
{
// payload = JSON.parse(msg.payload);
payload
=
JSON
.
parse
(
msg
.
payload
);
// }
}
// console.log(payload);
console
.
log
(
payload
);
// if (payload.hasOwnProperty('date')) {
// console.log('in evaluation');
if
(
payload
.
type
==
"open"
)
{
// } else if (payload.hasOwnProperty('report')) {
//开门推送
// console.log('in slim');
getLockInfo
(
self
);
// }
}
else
if
(
payload
.
type
==
"notify"
)
{
//安全报警
getLockInfo
(
self
);
}
else
if
(
payload
.
type
==
"alarm"
)
{
//劫持报警
getLockInfo
(
self
);
}
else
if
(
payload
.
type
==
"ring"
)
{
//门铃
ringBell
(
self
);
}
else
if
(
payload
.
type
==
"remoteOpen"
)
{
//远程开门通知
self
.
setValueRemoteOpendoor
(
true
);
self
.
setRemoteOpendoorDisabledFlag
(
false
);
}
}
}
function
notificationListener
()
{
function
notificationListener
(
self
)
{
// if (plus.os.name == 'Android') {
// setInterval(function () {
// console.log("innn");
// var pushMsgArray = plus.push.getAllMessage();
// plus.push.setAutoNotification(false);
// console.log(pushMsgArray);
// if (pushMsgArray) {
// var pushMsgLength = pushMsgArray.length;
// console.log(pushMsgLength);
// if (pushMsgLength) {
// var pushMsg = pushMsgArray[(pushMsgArray.length - 1)];
// pushAction(pushMsg);
// plus.push.clear();
// }
// }
// }, config.GET_MSG_INTERVAL);
// }
// 从系统消息中心点击消息启动应用事件
// 从系统消息中心点击消息启动应用事件
plus
.
push
.
addEventListener
(
'click'
,
function
(
msg
)
{
plus
.
push
.
addEventListener
(
'click'
,
function
(
msg
)
{
pushAction
(
msg
);
pushAction
(
self
,
msg
);
},
false
);
},
false
);
// 应用从推送服务器接收到推送消息事件
// 应用从推送服务器接收到推送消息事件
plus
.
push
.
addEventListener
(
'receive'
,
function
(
msg
)
{
plus
.
push
.
addEventListener
(
'receive'
,
function
(
msg
)
{
pushAction
(
msg
);
pushAction
(
self
,
msg
);
// plus.push.createMessage(msg.content, msg.payload);
// plus.push.createMessage(msg.content, msg.payload);
},
false
);
},
false
);
}
}
...
@@ -24746,7 +24753,7 @@ function remoteOpendoorTap(self) {
...
@@ -24746,7 +24753,7 @@ function remoteOpendoorTap(self) {
//tap 劫持报警
//tap 劫持报警
function
hijackAlarmTap
(
self
)
{
function
hijackAlarmTap
(
self
)
{
if
(
self
.
alarmTime
==
1
)
{
if
(
self
.
alarmTime
!=
null
)
{
self
.
hijackAlarmFlag
=
false
;
self
.
hijackAlarmFlag
=
false
;
setRecordTime
(
'alarmTime'
,
self
.
alarmTime
.
toISOString
());
setRecordTime
(
'alarmTime'
,
self
.
alarmTime
.
toISOString
());
}
}
...
...
web/view/doorlockUsers/inviteBind.html
View file @
2856b73b
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<li>
{{ $t('inviteBind.title') }}
</li>
<li>
{{ $t('inviteBind.title') }}
</li>
<li>
{{ $t('inviteBind.cont1') }}
</li>
<li>
{{ $t('inviteBind.cont1') }}
</li>
<li>
{{ $t('inviteBind.cont2') }}
</li>
<li>
{{ $t('inviteBind.cont2') }}
</li>
<li>
{{ $t('inviteBind.cont3') }}
</li>
</ul>
</ul>
<u-button
:init-param=
"componentsConfig.qrcodeButton.initParam"
v-on:u-button-tap=
"onQRcodeButtonTap"
></u-button>
<u-button
:init-param=
"componentsConfig.qrcodeButton.initParam"
v-on:u-button-tap=
"onQRcodeButtonTap"
></u-button>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment