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
68eab53e
Commit
68eab53e
authored
Nov 06, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1106
parent
ef9c63af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
126 additions
and
0 deletions
+126
-0
web/view/addDevice/deviceList.js
+126
-0
No files found.
web/view/addDevice/deviceList.js
0 → 100644
View file @
68eab53e
webpackJsonp
([
27
],{
/***/
196
:
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
/* WEBPACK VAR INJECTION */
(
function
(
Vue
)
{
var
_public
=
__webpack_require__
(
4
);
_public
.
iot
.
ready
(
init
);
/**
* v_deviceList.js
* Version: 0.1
* User: wy
* Date: 2017-11-03
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 产品型号页面
*/
function
init
()
{
//通用 list、dialog、loading组件
_public
.
uPublic
.
componentsInit
([
'u-list'
,
'u-dialog'
,
'u-loading'
]);
var
app
=
new
Vue
({
data
:
{
//配置组件
componentsConfig
:
initComponentsConfig
(),
deviceList
:
null
},
mounted
:
function
mounted
()
{
getDeviceList
(
this
);
},
methods
:
{
getDeviceList
:
function
getDeviceList
()
{
return
this
.
deviceList
;
},
setDeviceList
:
function
setDeviceList
(
list
)
{
this
.
deviceList
=
list
;
},
//tap <
onBackTap
:
function
onBackTap
()
{
backTap
();
},
onDeviceListRowTap
:
function
onDeviceListRowTap
(
value
)
{
deviceListRowTap
(
this
,
value
);
}
}
}).
$mount
(
'#app'
);
}
//配置组件参数
function
initComponentsConfig
()
{
var
model
=
Vue
.
t
(
'deviceList.model'
);
return
{
deviceList
:
{
initParam
:
{
class
:
'custom-device-list'
,
list
:
[],
tip
:
''
}
},
dialog
:
{
initParam
:
{
class
:
'custom-dialog'
}
},
loading
:
{
initParam
:
{
class
:
'custom-loading'
}
}
};
}
function
getDeviceList
(
self
)
{
_public
.
iot
.
business
.
sds
.
getProductList
({
success
:
function
success
(
response
)
{
console
.
log
(
response
);
var
list
=
[];
var
data
=
response
.
data
;
self
.
setDeviceList
(
data
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
list
[
i
]
=
{
leftImage
:
'../../resources/image/deviceImg.png'
,
title
:
data
[
i
].
deviceName
,
subtitle
:
Vue
.
t
(
'deviceList.model'
)
+
data
[
i
].
model
,
rightIcon
:
''
};
}
_public
.
uComponents
.
changeList
(
self
,
list
);
},
error
:
function
error
(
_error
)
{}
});
}
//tap <
function
backTap
()
{
_public
.
iot
.
navigator
.
back
();
}
function
deviceListRowTap
(
self
,
value
)
{
console
.
log
(
self
.
getDeviceList
()[
value
].
model
);
_public
.
iot
.
navigator
.
openWindow
({
url
:
'./wifiAddHelp.html'
,
id
:
'wifiAddHelp'
,
extras
:
{
model
:
self
.
getDeviceList
()[
value
].
model
}
});
}
/* WEBPACK VAR INJECTION */
}.
call
(
exports
,
__webpack_require__
(
2
)[
"default"
]))
/***/
}),
/***/
294
:
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
module
.
exports
=
__webpack_require__
(
196
);
/***/
})
},[
294
]);
//# sourceMappingURL=deviceList.js.map
\ No newline at end of file
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