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
86aa7ed4
Commit
86aa7ed4
authored
Oct 12, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1012
parent
f1de58cb
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
101 additions
and
39 deletions
+101
-39
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
+6
-9
dev/src/view/doorlockUsers/v_doorlockUser.js
+70
-6
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){
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
...
...
dev/src/view/addDevice/v_wifiAdd.js
View file @
86aa7ed4
...
...
@@ -262,7 +262,7 @@ function commLoadingButtonTap(self) {
//绑定成功
uComponents
.
hideCommLoading
(
self
);
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
if
(
self
.
getStatus
()
==
2
){
...
...
dev/src/view/device/v_index.js
View file @
86aa7ed4
...
...
@@ -438,7 +438,7 @@ function setDevceInfo(self, data) {
//tap 个人信息
function
myInfoTap
(
self
){
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/'
,
url
:
'../myInfo/
index.html
'
,
id
:
'myInfo'
,
extras
:
{
nickname
:
self
.
nickname
...
...
@@ -448,7 +448,7 @@ function myInfoTap(self){
function
bindDoorlockTap
(){
iot
.
navigator
.
openWindow
({
url
:
'../addDevice/'
,
url
:
'../addDevice/
index.html
'
,
id
:
'addDevice'
});
}
...
...
@@ -457,7 +457,7 @@ function bindDoorlockTap(){
function
doorlockManageTap
(
self
){
if
(
self
.
getValueDoorlockManage
()
==
1
){
iot
.
navigator
.
openWindow
({
url
:
'../doorlockManage/'
,
url
:
'../doorlockManage/
index.html
'
,
id
:
'doorlockManage'
,
extras
:
{
deviceId
:
self
.
deviceId
,
...
...
@@ -497,7 +497,7 @@ function securityAlarmTap(self){
function
doorlockUserTap
(
self
){
// if(self.getValueDoorlockUser() == 1){
// iot.navigator.openWindow({
// url: '../doorlockUsers/',
// url: '../doorlockUsers/
index.html
',
// id: 'doorlockUsers',
// extras: {
// deviceId: self.deviceId
...
...
dev/src/view/doorlockManage/v_index.js
View file @
86aa7ed4
...
...
@@ -219,7 +219,7 @@ function unbindStateDialogTap(self){
self
.
setStateShowFlag
(
false
);
if
(
self
.
getUnbindSucceess
){
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
...
...
dev/src/view/doorlockUsers/v_addUser.js
View file @
86aa7ed4
...
...
@@ -106,15 +106,13 @@ function confirmButtonTap(self){
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addUser.addUserSuccess'
),
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
()
{
console
.
log
(
"添加用户成功"
);
//跳转到门锁用户界面
iot
.
storage
.
setMap
(
'lock_id'
,
data
.
lock_id
,
()
=>
{
self
.
$router
.
replace
({
path
:
'/myDoorlock'
});
},
()
=>
{
error
();
});
//跳转到门锁用户界面
iot
.
navigator
.
openWindow
({
url
:
'./doorlockUser.html'
,
id
:
'doorlockUser'
id
:
'doorlockUser'
,
extras
:
{
userId
:
response
.
data
.
id
}
});
}
});
...
...
@@ -132,4 +130,4 @@ function confirmButtonTap(self){
}
});
}
}
\ No newline at end of file
}
dev/src/view/doorlockUsers/v_doorlockUser.js
View file @
86aa7ed4
...
...
@@ -30,9 +30,14 @@ function init() {
guideStep3ShowFlag
:
false
,
guideStep4ShowFlag
:
false
,
//配置组件
componentsConfig
:
initComponentsConfig
()
componentsConfig
:
initComponentsConfig
(),
extras
:
{}
},
mounted
(){
mounted
(){
this
.
extras
=
iot
.
navigator
.
getExtras
();
console
.
log
(
this
.
extras
);
checkFirstAddUser
(
this
);
getUserInfo
(
this
);
},
methods
:{
getBindShowFlag
(){
...
...
@@ -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 <
function
backTap
(){
iot
.
navigator
.
back
();
...
...
@@ -192,10 +256,10 @@ function bindTap(){
//tap 解绑
function
unbindButtonTap
(
self
){
uComponents
.
openConfirm
(
self
,
Vue
.
t
(
'doorlockUsers.unbindDialogTip'
),
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
self
.
setStateShowFlag
(
true
);
}}
{
text
:
Vue
.
t
(
'dialog.cancel'
),
callback
:
function
()
{}},
{
text
:
Vue
.
t
(
'dialog.unbind'
),
callback
:
function
()
{
self
.
setStateShowFlag
(
true
);
}}
);
}
...
...
dev/src/view/login/v_index.js
View file @
86aa7ed4
...
...
@@ -77,7 +77,7 @@ function loginButtonTap(self){
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// url: '../device/',
// url: '../device/
index.html
',
// id: 'device'
// });
}
else
{
...
...
@@ -109,7 +109,7 @@ function cloudsLogin(self, id){
if
(
data
){
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{
...
...
@@ -129,7 +129,7 @@ function cloudsLogin(self, id){
if
(
data
){
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{
...
...
@@ -154,7 +154,7 @@ function cloudsLogin(self, id){
if
(
data
){
uComponents
.
hideLoading
(
self
);
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{
...
...
dev/src/view/login/v_register.js
View file @
86aa7ed4
...
...
@@ -141,7 +141,7 @@ function backTap(){
//tap 注册
function
registerButtonTap
(){
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
\ No newline at end of file
web/view/addDevice/scanCodeAdd.js
View file @
86aa7ed4
...
...
@@ -86,7 +86,7 @@ function openScanCode(self) {
_public
.
uComponents
.
openAlert
(
self
,
Vue
.
t
(
'addDevice.bindSuccess'
),
{
text
:
Vue
.
t
(
'btn.confirm'
),
callback
:
function
callback
()
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
...
...
web/view/addDevice/wifiAdd.js
View file @
86aa7ed4
...
...
@@ -271,7 +271,7 @@ function commLoadingButtonTap(self) {
//绑定成功
_public
.
uComponents
.
hideCommLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
if
(
self
.
getStatus
()
==
2
)
{
...
...
web/view/device/index.js
View file @
86aa7ed4
...
...
@@ -16314,7 +16314,7 @@ function setDevceInfo(self, data) {
//tap 个人信息
function
myInfoTap
(
self
)
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../myInfo/'
,
url
:
'../myInfo/
index.html
'
,
id
:
'myInfo'
,
extras
:
{
nickname
:
self
.
nickname
...
...
@@ -16324,7 +16324,7 @@ function myInfoTap(self) {
function
bindDoorlockTap
()
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../addDevice/'
,
url
:
'../addDevice/
index.html
'
,
id
:
'addDevice'
});
}
...
...
@@ -16333,7 +16333,7 @@ function bindDoorlockTap() {
function
doorlockManageTap
(
self
)
{
if
(
self
.
getValueDoorlockManage
()
==
1
)
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../doorlockManage/'
,
url
:
'../doorlockManage/
index.html
'
,
id
:
'doorlockManage'
,
extras
:
{
deviceId
:
self
.
deviceId
,
...
...
@@ -16373,7 +16373,7 @@ function securityAlarmTap(self) {
function
doorlockUserTap
(
self
)
{}
// if(self.getValueDoorlockUser() == 1){
// iot.navigator.openWindow({
// url: '../doorlockUsers/',
// url: '../doorlockUsers/
index.html
',
// id: 'doorlockUsers',
// extras: {
// deviceId: self.deviceId
...
...
web/view/doorlockManage/index.js
View file @
86aa7ed4
...
...
@@ -229,7 +229,7 @@ function unbindStateDialogTap(self) {
self
.
setStateShowFlag
(
false
);
if
(
self
.
getUnbindSucceess
)
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
...
...
web/view/login/index.js
View file @
86aa7ed4
...
...
@@ -85,7 +85,7 @@ function loginButtonTap(self) {
console
.
log
(
"云端登陆"
);
cloudsLogin
(
self
,
data
.
UserID
);
// iot.navigator.openWindow({
// url: '../device/',
// url: '../device/
index.html
',
// id: 'device'
// });
}
else
{}
...
...
@@ -115,7 +115,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{}
...
...
@@ -133,7 +133,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{}
...
...
@@ -156,7 +156,7 @@ function cloudsLogin(self, id) {
if
(
data
)
{
_public
.
uComponents
.
hideLoading
(
self
);
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
id
:
'device'
});
}
else
{}
...
...
web/view/login/register.js
View file @
86aa7ed4
...
...
@@ -151,7 +151,7 @@ function backTap() {
//tap 注册
function
registerButtonTap
()
{
_public
.
iot
.
navigator
.
openWindow
({
url
:
'../device/'
,
url
:
'../device/
index.html
'
,
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