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
86aa7ed4
Commit
86aa7ed4
authored
Oct 12, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1012
parent
f1de58cb
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
94 additions
and
31 deletions
+94
-31
dev/src/view/addDevice/v_scanCodeAdd.js
+1
-1
dev/src/view/addDevice/v_wifiAdd.js
+1
-1
dev/src/view/device/v_index.js
+4
-4
dev/src/view/doorlockManage/v_index.js
+1
-1
dev/src/view/doorlockUsers/v_addUser.js
+4
-6
dev/src/view/doorlockUsers/v_doorlockUser.js
+65
-1
dev/src/view/login/v_index.js
+4
-4
dev/src/view/login/v_register.js
+2
-1
web/view/addDevice/scanCodeAdd.js
+1
-1
web/view/addDevice/wifiAdd.js
+1
-1
web/view/device/index.js
+4
-4
web/view/doorlockManage/index.js
+1
-1
web/view/login/index.js
+4
-4
web/view/login/register.js
+1
-1
No files found.
dev/src/view/addDevice/v_scanCodeAdd.js
View file @
86aa7ed4
...
@@ -78,7 +78,7 @@ function openScanCode(self){
...
@@ -78,7 +78,7 @@ function openScanCode(self){
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
...
...
dev/src/view/addDevice/v_wifiAdd.js
View file @
86aa7ed4
...
@@ -262,7 +262,7 @@ function commLoadingButtonTap(self) {
...
@@ -262,7 +262,7 @@ function commLoadingButtonTap(self) {
//绑定成功
//绑定成功
uComponents
.
hideCommLoading
(
self
);
uComponents
.
hideCommLoading
(
self
);
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
if
(
self
.
getStatus
()
==
2
){
}
else
if
(
self
.
getStatus
()
==
2
){
...
...
dev/src/view/device/v_index.js
View file @
86aa7ed4
...
@@ -438,7 +438,7 @@ function setDevceInfo(self, data) {
...
@@ -438,7 +438,7 @@ function setDevceInfo(self, data) {
//tap 个人信息
//tap 个人信息
function
myInfoTap
(
self
){
function
myInfoTap
(
self
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/'
,
url
:
'../myInfo/
index.html
'
,
id
:
'myInfo'
,
id
:
'myInfo'
,
extras
:
{
extras
:
{
nickname
:
self
.
nickname
nickname
:
self
.
nickname
...
@@ -448,7 +448,7 @@ function myInfoTap(self){
...
@@ -448,7 +448,7 @@ function myInfoTap(self){
function
bindDoorlockTap
(){
function
bindDoorlockTap
(){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../addDevice/'
,
url
:
'../addDevice/
index.html
'
,
id
:
'addDevice'
id
:
'addDevice'
});
});
}
}
...
@@ -457,7 +457,7 @@ function bindDoorlockTap(){
...
@@ -457,7 +457,7 @@ function bindDoorlockTap(){
function
doorlockManageTap
(
self
){
function
doorlockManageTap
(
self
){
if
(
self
.
getValueDoorlockManage
()
==
1
){
if
(
self
.
getValueDoorlockManage
()
==
1
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../doorlockManage/'
,
url
:
'../doorlockManage/
index.html
'
,
id
:
'doorlockManage'
,
id
:
'doorlockManage'
,
extras
:
{
extras
:
{
deviceId
:
self
.
deviceId
,
deviceId
:
self
.
deviceId
,
...
@@ -497,7 +497,7 @@ function securityAlarmTap(self){
...
@@ -497,7 +497,7 @@ function securityAlarmTap(self){
function
doorlockUserTap
(
self
){
function
doorlockUserTap
(
self
){
// if(self.getValueDoorlockUser() == 1){
// if(self.getValueDoorlockUser() == 1){
// iot.navigator.openWindow({
// iot.navigator.openWindow({
// url: '../doorlockUsers/',
// url: '../doorlockUsers/
index.html
',
// id: 'doorlockUsers',
// id: 'doorlockUsers',
// extras: {
// extras: {
// deviceId: self.deviceId
// deviceId: self.deviceId
...
...
dev/src/view/doorlockManage/v_index.js
View file @
86aa7ed4
...
@@ -219,7 +219,7 @@ function unbindStateDialogTap(self){
...
@@ -219,7 +219,7 @@ function unbindStateDialogTap(self){
self
.
setStateShowFlag
(
false
);
self
.
setStateShowFlag
(
false
);
if
(
self
.
getUnbindSucceess
){
if
(
self
.
getUnbindSucceess
){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
...
...
dev/src/view/doorlockUsers/v_addUser.js
View file @
86aa7ed4
...
@@ -107,14 +107,12 @@ function confirmButtonTap(self){
...
@@ -107,14 +107,12 @@ function confirmButtonTap(self){
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
console
.
log
(
"添加用户成功"
);
console
.
log
(
"添加用户成功"
);
//跳转到门锁用户界面
//跳转到门锁用户界面
iot
.
storage
.
setMap
(
'lock_id'
,
data
.
lock_id
,
()
=>
{
self
.
$router
.
replace
({
path
:
'/myDoorlock'
});
},
()
=>
{
error
();
});
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'./doorlockUser.html'
,
url
:
'./doorlockUser.html'
,
id
:
'doorlockUser'
id
:
'doorlockUser'
,
extras
:
{
userId
:
response
.
data
.
id
}
});
});
}
}
});
});
...
...
dev/src/view/doorlockUsers/v_doorlockUser.js
View file @
86aa7ed4
...
@@ -30,9 +30,14 @@ function init() {
...
@@ -30,9 +30,14 @@ function init() {
guideStep3ShowFlag
:
false
,
guideStep3ShowFlag
:
false
,
guideStep4ShowFlag
:
false
,
guideStep4ShowFlag
:
false
,
//配置组件
//配置组件
componentsConfig
:
initComponentsConfig
()
componentsConfig
:
initComponentsConfig
(),
extras
:
{}
},
},
mounted
(){
mounted
(){
this
.
extras
=
iot
.
navigator
.
getExtras
();
console
.
log
(
this
.
extras
);
checkFirstAddUser
(
this
);
getUserInfo
(
this
);
},
},
methods
:{
methods
:{
getBindShowFlag
(){
getBindShowFlag
(){
...
@@ -169,6 +174,65 @@ function initComponentsConfig() {
...
@@ -169,6 +174,65 @@ function initComponentsConfig() {
}
}
}
}
//判断是否第一次添加用户
function
checkFirstAddUser
(){
iot
.
storage
.
getMap
(
'isFirstAddUser'
,
(
res
)
=>
{
if
(
res
)
{
}
else
{
//显示引导动画
showGuide
();
}
},
()
=>
{
//显示 引导动画
showGuide
();
});
}
//显示动画
async
function
showGuide
(){
try
{
let
time
=
await
sleep
(
1000
);
self
.
setGuideStep1ShowFlag
(
true
);
time
=
await
sleep
(
1000
);
self
.
setGuideStep2ShowFlag
(
true
);
time
=
await
sleep
(
1000
);
self
.
setGuideStep3ShowFlag
(
true
),
time
=
await
sleep
(
1000
);
self
.
setGuideStep4ShowFlag
(
true
);
}
catch
(
err
){
console
.
log
(
err
);
}
}
function
sleep
(
time
){
return
new
Promise
(
function
(
resolve
,
reject
){
setTimeout
(()
=>
{
resolve
(
time
);
},
time
);
})
}
function
getUserInfo
(
self
){
iot
.
business
.
api
.
sendCustom
(
'user/getUserInfo'
,{
data
:
{
id
:
self
.
extras
.
userId
},
success
:
(
response
)
=>
{
console
.
log
(
response
);
},
error
:
(
error
)
=>
{
console
.
log
(
error
);
},
complete
:
()
=>
{}
})
}
//tap <
//tap <
function
backTap
(){
function
backTap
(){
iot
.
navigator
.
back
();
iot
.
navigator
.
back
();
...
...
dev/src/view/login/v_index.js
View file @
86aa7ed4
...
@@ -77,7 +77,7 @@ function loginButtonTap(self){
...
@@ -77,7 +77,7 @@ function loginButtonTap(self){
console
.
log
(
"云端登陆"
);
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// iot.navigator.openWindow({
// url: '../device/',
// url: '../device/
index.html
',
// id: 'device'
// id: 'device'
// });
// });
}
else
{
}
else
{
...
@@ -109,7 +109,7 @@ function cloudsLogin(self, id){
...
@@ -109,7 +109,7 @@ function cloudsLogin(self, id){
if
(
data
){
if
(
data
){
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{
}
else
{
...
@@ -129,7 +129,7 @@ function cloudsLogin(self, id){
...
@@ -129,7 +129,7 @@ function cloudsLogin(self, id){
if
(
data
){
if
(
data
){
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{
}
else
{
...
@@ -154,7 +154,7 @@ function cloudsLogin(self, id){
...
@@ -154,7 +154,7 @@ function cloudsLogin(self, id){
if
(
data
){
if
(
data
){
uComponents
.
hideLoading
(
self
);
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{
}
else
{
...
...
dev/src/view/login/v_register.js
View file @
86aa7ed4
...
@@ -141,7 +141,7 @@ function backTap(){
...
@@ -141,7 +141,7 @@ function backTap(){
//tap 注册
//tap 注册
function
registerButtonTap
(){
function
registerButtonTap
(){
iot
.
navigator
.
openWindow
({
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
\ No newline at end of file
web/view/addDevice/scanCodeAdd.js
View file @
86aa7ed4
...
@@ -86,7 +86,7 @@ function openScanCode(self) {
...
@@ -86,7 +86,7 @@ function openScanCode(self) {
_public
.
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
_public
.
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
callback
()
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
callback
()
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
...
...
web/view/addDevice/wifiAdd.js
View file @
86aa7ed4
...
@@ -271,7 +271,7 @@ function commLoadingButtonTap(self) {
...
@@ -271,7 +271,7 @@ function commLoadingButtonTap(self) {
//绑定成功
//绑定成功
_public
.
uComponents
.
hideCommLoading
(
self
);
_public
.
uComponents
.
hideCommLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
if
(
self
.
getStatus
()
==
2
)
{
}
else
if
(
self
.
getStatus
()
==
2
)
{
...
...
web/view/device/index.js
View file @
86aa7ed4
...
@@ -16314,7 +16314,7 @@ function setDevceInfo(self, data) {
...
@@ -16314,7 +16314,7 @@ function setDevceInfo(self, data) {
//tap 个人信息
//tap 个人信息
function
myInfoTap
(
self
)
{
function
myInfoTap
(
self
)
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/'
,
url
:
'../myInfo/
index.html
'
,
id
:
'myInfo'
,
id
:
'myInfo'
,
extras
:
{
extras
:
{
nickname
:
self
.
nickname
nickname
:
self
.
nickname
...
@@ -16324,7 +16324,7 @@ function myInfoTap(self) {
...
@@ -16324,7 +16324,7 @@ function myInfoTap(self) {
function
bindDoorlockTap
()
{
function
bindDoorlockTap
()
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../addDevice/'
,
url
:
'../addDevice/
index.html
'
,
id
:
'addDevice'
id
:
'addDevice'
});
});
}
}
...
@@ -16333,7 +16333,7 @@ function bindDoorlockTap() {
...
@@ -16333,7 +16333,7 @@ function bindDoorlockTap() {
function
doorlockManageTap
(
self
)
{
function
doorlockManageTap
(
self
)
{
if
(
self
.
getValueDoorlockManage
()
==
1
)
{
if
(
self
.
getValueDoorlockManage
()
==
1
)
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../doorlockManage/'
,
url
:
'../doorlockManage/
index.html
'
,
id
:
'doorlockManage'
,
id
:
'doorlockManage'
,
extras
:
{
extras
:
{
deviceId
:
self
.
deviceId
,
deviceId
:
self
.
deviceId
,
...
@@ -16373,7 +16373,7 @@ function securityAlarmTap(self) {
...
@@ -16373,7 +16373,7 @@ function securityAlarmTap(self) {
function
doorlockUserTap
(
self
)
{}
function
doorlockUserTap
(
self
)
{}
// if(self.getValueDoorlockUser() == 1){
// if(self.getValueDoorlockUser() == 1){
// iot.navigator.openWindow({
// iot.navigator.openWindow({
// url: '../doorlockUsers/',
// url: '../doorlockUsers/
index.html
',
// id: 'doorlockUsers',
// id: 'doorlockUsers',
// extras: {
// extras: {
// deviceId: self.deviceId
// deviceId: self.deviceId
...
...
web/view/doorlockManage/index.js
View file @
86aa7ed4
...
@@ -229,7 +229,7 @@ function unbindStateDialogTap(self) {
...
@@ -229,7 +229,7 @@ function unbindStateDialogTap(self) {
self
.
setStateShowFlag
(
false
);
self
.
setStateShowFlag
(
false
);
if
(
self
.
getUnbindSucceess
)
{
if
(
self
.
getUnbindSucceess
)
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
...
...
web/view/login/index.js
View file @
86aa7ed4
...
@@ -85,7 +85,7 @@ function loginButtonTap(self) {
...
@@ -85,7 +85,7 @@ function loginButtonTap(self) {
console
.
log
(
"云端登陆"
);
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// iot.navigator.openWindow({
// url: '../device/',
// url: '../device/
index.html
',
// id: 'device'
// id: 'device'
// });
// });
}
else
{}
}
else
{}
...
@@ -115,7 +115,7 @@ function cloudsLogin(self, id) {
...
@@ -115,7 +115,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{}
}
else
{}
...
@@ -133,7 +133,7 @@ function cloudsLogin(self, id) {
...
@@ -133,7 +133,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{}
}
else
{}
...
@@ -156,7 +156,7 @@ function cloudsLogin(self, id) {
...
@@ -156,7 +156,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
else
{}
}
else
{}
...
...
web/view/login/register.js
View file @
86aa7ed4
...
@@ -151,7 +151,7 @@ function backTap() {
...
@@ -151,7 +151,7 @@ function backTap() {
//tap 注册
//tap 注册
function
registerButtonTap
()
{
function
registerButtonTap
()
{
_public
.
iot
.
navigator
.
openWindow
({
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
id
:
'device'
});
});
}
}
...
...
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