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
朱建香
DoorLock
Commits
e9cdb5a5
Commit
e9cdb5a5
authored
Feb 23, 2018
by
wjd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jianxiang' into 'test/96'
Jianxiang See merge request iot-project-js/doorlock!46
parents
87f1f583
3e9d3cdc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
7 deletions
+70
-7
dev/src/public/config.js
+1
-0
dev/src/view/addDevice/v_scanCodeAdd.js
+30
-3
dev/src/view/addDevice/v_wifiAdd.js
+28
-2
dev/src/view/device/v_index.js
+2
-0
dev/src/view/doorlockUsers/v_addUnlockInfo.js
+1
-0
dev/src/view/doorlockUsers/v_addUser.js
+8
-2
No files found.
dev/src/public/config.js
View file @
e9cdb5a5
...
...
@@ -23,6 +23,7 @@ export default {
},
"hijackMode"
:
{
2
:
"hijackingAlarm"
,
20
:
"hijackingAlarm"
},
"model"
:
"USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK"
,
"GET_MSG_INTERVAL"
:
5000
,
...
...
dev/src/view/addDevice/v_scanCodeAdd.js
View file @
e9cdb5a5
...
...
@@ -148,8 +148,8 @@ function openScanCode(self){
console
.
log
(
response
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
//
云端绑定
deviceBind
(
self
,
lockId
,
relI
d
);
//
获取设备详情
getInfo
(
self
,
lockId
,
relId
,
data
.
uui
d
);
}
else
{}
},
error
:
(
error
)
=>
{
...
...
@@ -183,11 +183,38 @@ function openScanCode(self){
});
}
function
deviceBind
(
self
,
lockId
,
relId
){
//获取设备详情
function
getInfo
(
self
,
lockId
,
relId
,
uuid
){
if
(
uuid
){
iot
.
business
.
device
.
getInfo
({
data
:
{
sds
:
true
,
uuid
:
uuid
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
//云端绑定
deviceBind
(
self
,
lockId
,
relId
,
data
.
auid
);
// deviceBind(self, lockId, relId);
}
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
},
complete
:
()
=>
{}
});
}
}
// 云端绑定
function
deviceBind
(
self
,
lockId
,
relId
,
auid
){
iot
.
business
.
api
.
sendCustom
(
'lock/bindUser'
,{
data
:
{
device_id
:
lockId
,
rel_id
:
relId
,
auid
:
auid
,
// mac: parameters.mac,
nickname
:
''
},
...
...
dev/src/view/addDevice/v_wifiAdd.js
View file @
e9cdb5a5
...
...
@@ -338,7 +338,7 @@ function sendDeviceStatus(self, deviceId, productId, uuid){
},
success
:
(
response
)
=>
{
//激活成功
bind
(
self
,
deviceId
,
productI
d
);
getInfo
(
self
,
deviceId
,
productId
,
uui
d
);
console
.
log
(
response
);
},
error
:
(
error
)
=>
{
...
...
@@ -382,12 +382,38 @@ function unbind(self, deviceId, productId){
});
}
//获取设备详情
function
getInfo
(
self
,
deviceId
,
productId
,
uuid
){
if
(
uuid
){
iot
.
business
.
device
.
getInfo
({
data
:
{
sds
:
true
,
uuid
:
uuid
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
//云端绑定
bind
(
self
,
deviceId
,
productId
,
data
.
auid
);
// bind(self, deviceId, productId);
}
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
},
complete
:
()
=>
{}
});
}
}
//云端绑定
function
bind
(
self
,
deviceId
,
productId
){
function
bind
(
self
,
deviceId
,
productId
,
auid
){
iot
.
business
.
api
.
sendCustom
(
'lock/bind'
,{
data
:
{
product_id
:
productId
,
device_id
:
deviceId
,
auid
:
auid
,
// mac: sn,
nickname
:
''
},
...
...
dev/src/view/device/v_index.js
View file @
e9cdb5a5
...
...
@@ -1270,11 +1270,13 @@ function doorlockManageTap(self){
//tap 门铃(停止响铃)
function
stopDoorbellRing
(
self
){
if
(
self
.
getMsgClass
()
==
'doorbell_img'
){
self
.
setDoorbellRingingFlag
(
false
);
self
.
setNormalApertureShow
(
false
);
self
.
setRingTime
(
0
);
window
.
clearInterval
(
self
.
time
);
window
.
clearTimeout
(
self
.
timeout
);
}
}
//tap 保存二维码到相册
...
...
dev/src/view/doorlockUsers/v_addUnlockInfo.js
View file @
e9cdb5a5
...
...
@@ -292,6 +292,7 @@ function sleep(time){
mui
.
back
=
function
(){
iot
.
navigator
.
fire
(
plus
.
webview
.
currentWebview
().
opener
(),
'returnPage'
,{});
console
.
log
(
"returnPage"
);
iot
.
navigator
.
back
();
}
...
...
dev/src/view/doorlockUsers/v_addUser.js
View file @
e9cdb5a5
...
...
@@ -86,11 +86,17 @@ function initComponentsConfig() {
}
}
//tap <
function
backTap
(){
mui
.
back
=
function
()
{
iot
.
navigator
.
fire
(
plus
.
webview
.
currentWebview
().
opener
(),
'returnPage'
,
{});
console
.
log
(
"returnPage"
);
iot
.
navigator
.
back
();
}
//tap <
function
backTap
()
{
iot
.
navigator
.
aback
();
}
function
nameChange
(
self
,
text
){
self
.
textName
=
text
;
self
.
setTextErrorTip
(
''
);
...
...
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