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){
...
@@ -158,7 +158,7 @@ function connectButtonTap(self){
}
else
{
}
else
{
iot
.
business
.
sds
.
findWifi
({
iot
.
business
.
sds
.
findWifi
({
data
:
{
data
:
{
model
:
'
THM_LIVING_ELECTRICALBLANKET_TH_1507
'
,
model
:
'
UGEN_LIVING_ELECTRICALBLANKET_THM_BL
'
,
ssid
:
self
.
getTextWiFiName
(),
ssid
:
self
.
getTextWiFiName
(),
wifiPwd
:
self
.
getTextPassword
(),
wifiPwd
:
self
.
getTextPassword
(),
timeout
:
20000
timeout
:
20000
...
...
dev/src/view/addDevice/v_wifiAddHelp.js
View file @
d8d8d909
...
@@ -63,19 +63,19 @@ function backTap(){
...
@@ -63,19 +63,19 @@ function backTap(){
//tap 开始配置Wi-Fi
//tap 开始配置Wi-Fi
function
wifiAddButtonTap
(){
function
wifiAddButtonTap
(){
//
iot.navigator.openWindow({
iot
.
navigator
.
openWindow
({
//
url: './wifiAdd.html',
url
:
'./wifiAdd.html'
,
//
id: 'wifiAdd'
id
:
'wifiAdd'
//
});
});
console
.
log
(
"in"
);
console
.
log
(
"in"
);
iot
.
business
.
sds
.
wifiDeviceConfig
({
//
iot.business.sds.wifiDeviceConfig({
success
:
function
(
response
)
{
//
success: function (response) {
console
.
log
(
'wifiDeviceConfig success'
);
//
console.log('wifiDeviceConfig success');
console
.
log
(
response
);
//
console.log(response);
},
//
},
error
:
function
(
error
)
{
//
error: function (error) {
console
.
log
(
'wifiDeviceConfig error'
);
//
console.log('wifiDeviceConfig error');
console
.
log
(
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){
...
@@ -460,6 +460,7 @@ function doorlockManageTap(self){
url
:
'../doorlockManage/'
,
url
:
'../doorlockManage/'
,
id
:
'doorlockManage'
,
id
:
'doorlockManage'
,
extras
:
{
extras
:
{
deviceId
:
self
.
deviceId
,
uuid
:
self
.
getUuid
()
uuid
:
self
.
getUuid
()
}
}
});
});
...
@@ -481,7 +482,7 @@ function opendoorRecordTap(self){
...
@@ -481,7 +482,7 @@ function opendoorRecordTap(self){
//tap 安全报警
//tap 安全报警
function
securityAlarmTap
(
self
){
function
securityAlarmTap
(
self
){
if
(
self
.
getValueSecurityAlarm
==
1
){
if
(
self
.
getValueSecurityAlarm
()
==
1
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'./alarmInfo.html'
,
url
:
'./alarmInfo.html'
,
id
:
'alarmInfo'
,
id
:
'alarmInfo'
,
...
@@ -504,7 +505,7 @@ function doorlockUserTap(){
...
@@ -504,7 +505,7 @@ function doorlockUserTap(){
//tap 远程开门
//tap 远程开门
function
remoteOpendoorTap
(
self
){
function
remoteOpendoorTap
(
self
){
if
(
self
.
getValueRemoteOpendoor
==
1
){
if
(
self
.
getValueRemoteOpendoor
()
==
1
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'./remoteOpendoor.html'
,
url
:
'./remoteOpendoor.html'
,
id
:
'remoteOpendoor'
,
id
:
'remoteOpendoor'
,
...
@@ -517,7 +518,7 @@ function remoteOpendoorTap(self){
...
@@ -517,7 +518,7 @@ function remoteOpendoorTap(self){
//tap 劫持报警
//tap 劫持报警
function
hijackAlarmTap
(
self
){
function
hijackAlarmTap
(
self
){
if
(
self
.
setValueHijackAlarm
==
1
){
if
(
self
.
setValueHijackAlarm
()
==
1
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'./hijackRecord.html'
,
url
:
'./hijackRecord.html'
,
id
:
'hijackRecord'
,
id
:
'hijackRecord'
,
...
...
dev/src/view/doorlockManage/v_index.js
View file @
d8d8d909
...
@@ -118,13 +118,14 @@ function initComponentsConfig() {
...
@@ -118,13 +118,14 @@ function initComponentsConfig() {
function
getDoorlockInfo
(
self
){
function
getDoorlockInfo
(
self
){
uComponents
.
showLoading
(
self
);
uComponents
.
showLoading
(
self
);
iot
.
business
.
device
.
getList
(
{
iot
.
business
.
api
.
send
(
'device/getList'
,
{
data
:
{
data
:
{
sds
:
false
,
sds
:
false
,
device_id
:
self
.
extras
.
deviceId
,
product_id
:
2
,
product_id
:
2
,
parent_id
:
0
,
parent_id
:
0
,
start_id
:
0
,
start_id
:
0
,
number
:
1
number
:
1
0
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
...
@@ -143,7 +144,7 @@ function getDoorlockInfo(self){
...
@@ -143,7 +144,7 @@ function getDoorlockInfo(self){
complete
:
()
=>
{
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
}
}
});
}
,
true
);
}
}
//tap <
//tap <
...
@@ -157,7 +158,7 @@ function editNameTap(self){
...
@@ -157,7 +158,7 @@ function editNameTap(self){
url
:
'./editName.html'
,
url
:
'./editName.html'
,
id
:
'editName'
,
id
:
'editName'
,
extras
:
{
extras
:
{
deviceId
:
self
.
getDoorlock
().
device_
id
,
deviceId
:
self
.
getDoorlock
().
id
,
nickname
:
self
.
getTextNickname
()
nickname
:
self
.
getTextNickname
()
}
}
});
});
...
@@ -165,55 +166,61 @@ function editNameTap(self){
...
@@ -165,55 +166,61 @@ function editNameTap(self){
//tap 解绑门锁
//tap 解绑门锁
function
unbindDoorlockButtonTap
(
self
){
function
unbindDoorlockButtonTap
(
self
){
uComponents
.
openConfirm
(
self
,
Vue
.
t
(
'doorlockUser.unbindDialogTip'
),
uComponents
.
openConfirm
(
self
,
Vue
.
t
(
'doorlockUser.unbindDialogTip'
),
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
uComponents
.
showLoading
(
self
);
// uComponents.showLoading(self);
iot
.
business
.
device
.
unbind
({
// //云端解绑
data
:
{
// iot.business.device.unbind({
sds
:
true
,
// data: {
uuid
:
self
.
extras
.
uuid
// device_id: self.getDoorlock().id
},
// },
success
:
(
response
)
=>
{
// success: (response) => {
console
.
log
(
response
);
// console.log(response);
//云端解绑
iot
.
business
.
device
.
unbind
({
iot
.
business
.
device
.
unbind
({
data
:
{
data
:
{
device_id
:
self
.
getDoorlock
().
device_id
sds
:
true
,
},
uuid
:
self
.
extras
.
uuid
,
device_id
:
self
.
getDoorlock
().
id
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
self
.
setStateShowFlag
(
true
);
self
.
setStateShowFlag
(
true
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindSuccess'
));
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindSuccess'
));
self
.
setUnbindSucceess
(
true
);
self
.
setUnbindSucceess
(
true
);
},
},
error
:
(
error
)
=>
{
error
:
(
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
self
.
setStateShowFlag
(
tru
e
);
self
.
setStateShowFlag
(
fals
e
);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
self
.
setUnbindSucceess
(
false
);
self
.
setUnbindSucceess
(
false
);
},
},
complete
:
()
=>
{
complete
:
()
=>
{
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
}
}
});
});
},
//
},
error
:
(
error
)
=>
{
//
error: (error) => {
console
.
log
(
error
);
//
console.log(error);
self
.
setStateShowFlag
(
true
);
//
self.setStateShowFlag(true);
self
.
setShowMsg
(
Vue
.
t
(
'doorlockUser.unbindFailue'
));
//
self.setShowMsg(Vue.t('doorlockUser.unbindFailue'));
self
.
setUnbindSucceess
(
false
);
//
self.setUnbindSucceess(false);
},
//
},
complete
:
()
=>
{
//
complete: () => {
uComponents
.
hideLoading
(
self
);
//
uComponents.hideLoading(self);
}
//
}
});
//
});
}}
}}
);
);
}
}
//tap 隐藏提示框
//tap 隐藏提示框
function
unbindStateDialogTap
(
self
){
function
unbindStateDialogTap
(
self
){
self
.
setStateShowFlag
(
false
);
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){
...
@@ -74,6 +74,7 @@ function loginButtonTap(self){
console
.
log
(
response
);
console
.
log
(
response
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
let
data
=
uPublic
.
checkResponseData
(
response
.
data
);
if
(
data
){
if
(
data
){
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// iot.navigator.openWindow({
// url: '../device/',
// url: '../device/',
...
...
dev/src/view/myInfo/v_index.js
View file @
d8d8d909
...
@@ -118,6 +118,11 @@ function logoutButtonTap(self){
...
@@ -118,6 +118,11 @@ function logoutButtonTap(self){
sds
:
true
sds
:
true
},
},
success
:
(
response
)
=>
{
success
:
(
response
)
=>
{
iot
.
business
.
websql
.
delMaps
([
'utoken'
,
'userinfo'
],
(
response
)
=>
{
console
.
log
(
response
);
},
(
error
)
=>
{
console
.
log
(
error
);
});
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../login/'
,
url
:
'../login/'
,
id
:
'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