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
d8d8d909
Commit
d8d8d909
authored
Oct 12, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1012
parent
a6ab7446
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
56 deletions
+71
-56
dev/src/view/addDevice/v_wifiAdd.js
+1
-1
dev/src/view/addDevice/v_wifiAddHelp.js
+15
-14
dev/src/view/device/v_index.js
+4
-3
dev/src/view/doorlockManage/v_index.js
+45
-38
dev/src/view/login/v_index.js
+1
-0
dev/src/view/myInfo/v_index.js
+5
-0
web/lib/js/p.js
+0
-0
No files found.
dev/src/view/addDevice/v_wifiAdd.js
View file @
d8d8d909
...
...
@@ -158,7 +158,7 @@ function connectButtonTap(self){
}
else
{
iot
.
business
.
sds
.
findWifi
({
data
:
{
model
:
'
THM_LIVING_ELECTRICALBLANKET_TH_1507
'
,
model
:
'
UGEN_LIVING_ELECTRICALBLANKET_THM_BL
'
,
ssid
:
self
.
getTextWiFiName
(),
wifiPwd
:
self
.
getTextPassword
(),
timeout
:
20000
...
...
dev/src/view/addDevice/v_wifiAddHelp.js
View file @
d8d8d909
...
...
@@ -63,19 +63,19 @@ function backTap(){
//tap 开始配置Wi-Fi
function
wifiAddButtonTap
(){
//
iot.navigator.openWindow({
//
url: './wifiAdd.html',
//
id: 'wifiAdd'
//
});
iot
.
navigator
.
openWindow
({
url
:
'./wifiAdd.html'
,
id
:
'wifiAdd'
});
console
.
log
(
"in"
);
iot
.
business
.
sds
.
wifiDeviceConfig
({
success
:
function
(
response
)
{
console
.
log
(
'wifiDeviceConfig success'
);
console
.
log
(
response
);
},
error
:
function
(
error
)
{
console
.
log
(
'wifiDeviceConfig error'
);
console
.
log
(
error
);
}
});
//
iot.business.sds.wifiDeviceConfig({
//
success: function (response) {
//
console.log('wifiDeviceConfig success');
//
console.log(response);
//
},
//
error: function (error) {
//
console.log('wifiDeviceConfig error');
//
console.log(error);
//
}
//
});
}
\ No newline at end of file
dev/src/view/device/v_index.js
View file @
d8d8d909
...
...
@@ -460,6 +460,7 @@ function doorlockManageTap(self){
url
:
'../doorlockManage/'
,
id
:
'doorlockManage'
,
extras
:
{
deviceId
:
self
.
deviceId
,
uuid
:
self
.
getUuid
()
}
});
...
...
@@ -481,7 +482,7 @@ function opendoorRecordTap(self){
//tap 安全报警
function
securityAlarmTap
(
self
){
if
(
self
.
getValueSecurityAlarm
==
1
){
if
(
self
.
getValueSecurityAlarm
()
==
1
){
iot
.
navigator
.
openWindow
({
url
:
'./alarmInfo.html'
,
id
:
'alarmInfo'
,
...
...
@@ -504,7 +505,7 @@ function doorlockUserTap(){
//tap 远程开门
function
remoteOpendoorTap
(
self
){
if
(
self
.
getValueRemoteOpendoor
==
1
){
if
(
self
.
getValueRemoteOpendoor
()
==
1
){
iot
.
navigator
.
openWindow
({
url
:
'./remoteOpendoor.html'
,
id
:
'remoteOpendoor'
,
...
...
@@ -517,7 +518,7 @@ function remoteOpendoorTap(self){
//tap 劫持报警
function
hijackAlarmTap
(
self
){
if
(
self
.
setValueHijackAlarm
==
1
){
if
(
self
.
setValueHijackAlarm
()
==
1
){
iot
.
navigator
.
openWindow
({
url
:
'./hijackRecord.html'
,
id
:
'hijackRecord'
,
...
...
dev/src/view/doorlockManage/v_index.js
View file @
d8d8d909
...
...
@@ -118,13 +118,14 @@ function initComponentsConfig() {
function
getDoorlockInfo
(
self
){
uComponents
.
showLoading
(
self
);
iot
.
business
.
device
.
getList
(
{
iot
.
business
.
api
.
send
(
'device/getList'
,
{
data
:
{
sds
:
false
,
device_id
:
self
.
extras
.
deviceId
,
product_id
:
2
,
parent_id
:
0
,
start_id
:
0
,
number
:
1
number
:
1
0
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
...
...
@@ -143,7 +144,7 @@ function getDoorlockInfo(self){
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
}
});
}
,
true
);
}
//tap <
...
...
@@ -157,7 +158,7 @@ function editNameTap(self){
url
:
'./editName.html'
,
id
:
'editName'
,
extras
:
{
deviceId
:
self
.
getDoorlock
().
device_
id
,
deviceId
:
self
.
getDoorlock
().
id
,
nickname
:
self
.
getTextNickname
()
}
});
...
...
@@ -165,55 +166,61 @@ function editNameTap(self){
//tap 解绑门锁
function
unbindDoorlockButtonTap
(
self
){
uComponents
.
openConfirm
(
self
,
Vue
.
t
(
'doorlockUser.unbindDialogTip'
),
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
uComponents
.
showLoading
(
self
);
iot
.
business
.
device
.
unbind
({
data
:
{
sds
:
true
,
uuid
:
self
.
extras
.
uuid
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
//云端解绑
uComponents
.
openConfirm
(
self
,
Vue
.
t
(
'doorlockUser.unbindDialogTip'
),
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
// uComponents.showLoading(self);
// //云端解绑
// iot.business.device.unbind({
// data: {
// device_id: self.getDoorlock().id
// },
// success: (response) => {
// console.log(response);
iot
.
business
.
device
.
unbind
({
data
:
{
device_id
:
self
.
getDoorlock
().
device_id
},
data
:
{
sds
:
true
,
uuid
:
self
.
extras
.
uuid
,
device_id
:
self
.
getDoorlock
().
id
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
self
.
setStateShowFlag
(
true
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindSuccess'
));
self
.
setUnbindSucceess
(
true
);
},
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
self
.
setStateShowFlag
(
tru
e
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
self
.
setUnbindSucceess
(
false
);
self
.
setStateShowFlag
(
fals
e
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
self
.
setUnbindSucceess
(
false
);
},
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
}
});
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
self
.
setStateShowFlag
(
true
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
self
.
setUnbindSucceess
(
false
);
},
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
}
});
}}
);
//
},
//
error: (error) => {
//
console.log(error);
//
self.setStateShowFlag(true);
//
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
//
self.setUnbindSucceess(false);
//
},
//
complete: () => {
//
uComponents.hideLoading(self);
//
}
//
});
}}
);
}
//tap 隐藏提示框
function
unbindStateDialogTap
(
self
){
self
.
setStateShowFlag
(
false
);
if
(
self
.
getUnbindSucceess
){
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
id
:
'device'
});
}
}
dev/src/view/login/v_index.js
View file @
d8d8d909
...
...
@@ -74,6 +74,7 @@ function loginButtonTap(self){
console
.
log
(
response
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// url: '../device/',
...
...
dev/src/view/myInfo/v_index.js
View file @
d8d8d909
...
...
@@ -118,6 +118,11 @@ function logoutButtonTap(self){
sds
:
true
},
success
:
(
response
)
=>
{
iot
.
business
.
websql
.
delMaps
([
'utoken'
,
'userinfo'
],
(
response
)
=>
{
console
.
log
(
response
);
},
(
error
)
=>
{
console
.
log
(
error
);
});
iot
.
navigator
.
openWindow
({
url
:
'../login/'
,
id
:
'login'
...
...
web/lib/js/p.js
View file @
d8d8d909
This diff is collapsed.
Click to expand it.
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