Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client-taro
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
996fcd8e
authored
Feb 07, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接应用接口
parent
99d4d3e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
31 deletions
+21
-31
src/api/common.ts
+1
-1
src/pages/home/application/app_list/index.scss
+12
-0
src/pages/home/application/app_list/index.tsx
+6
-23
src/pages/home/application/index.tsx
+2
-7
No files found.
src/api/common.ts
View file @
996fcd8e
...
...
@@ -327,7 +327,7 @@ class UsersApi extends ApiClient {
/** 获取应用列表 */
getApplicationList
(
page
:
number
=
1
,
limit
:
number
=
10
)
{
return
this
.
request
({
method
:
'
pos
t'
,
method
:
'
ge
t'
,
url
:
`/application/get/list?p=
${
page
}
&c=
${
limit
}
`
})
}
...
...
src/pages/home/application/app_list/index.scss
View file @
996fcd8e
...
...
@@ -49,6 +49,18 @@
color
:
#333
;
font-size
:
30px
;
.group-item-content
{
display
:
flex
;
align-items
:
center
;
.icon
{
height
:
80px
;
width
:
80px
;
margin-right
:
10px
;
margin-left
:
5px
;
}
}
&
:
:
after
{
content
:
''
;
position
:
absolute
;
...
...
src/pages/home/application/app_list/index.tsx
View file @
996fcd8e
...
...
@@ -67,6 +67,7 @@ class AppLication extends Component {
}
async
componentWillMount
()
{
Taro
.
setNavigationBarTitle
({
title
:
'应用列表'
})
this
.
getDate
()
}
onShareAppMessage
(
e
)
{
...
...
@@ -79,7 +80,7 @@ class AppLication extends Component {
async
getDate
()
{
this
.
cancelModal
()
// this.props.getFilmListData(this.page)
api
.
common
.
get
GroupList
(
).
then
(
res
=>
{
api
.
common
.
get
ApplicationList
(
this
.
page
).
then
(
res
=>
{
const
list
=
res
.
list
this
.
setState
({
list
:
list
...
...
@@ -147,7 +148,7 @@ class AppLication extends Component {
goDetail
(
id
,
url
=
'https://visual-clouds.bdideal.com/html/81462d155bac4302b05ddc2436bf295c/index.html'
,
applayId
=
1
)
{
let
url2
=
'https://visual-clouds.bdideal.com/html/81462d155bac4302b05ddc2436bf295c/index.html'
Taro
.
navigateTo
({
url
:
`/pages/home/application/app_detail/index?appId=
${
'lunpanid'
}
&strangerApplyId=
${
applayI
d
}
&url=
${
encodeURI
(
url2
)}
`
url
:
`/pages/home/application/app_detail/index?appId=
${
'lunpanid'
}
&strangerApplyId=
${
i
d
}
&url=
${
encodeURI
(
url2
)}
`
})
}
...
...
@@ -230,35 +231,17 @@ class AppLication extends Component {
>
<
View
className=
"group-item"
onClick=
{
()
=>
this
.
goDetail
(
item
.
equipmentGroupId
,
item
.
equipmentGroupName
)
}
onClick=
{
()
=>
this
.
goDetail
(
item
.
strangerApplyId
,
item
.
url
)
}
>
<
View
className=
"group-item-content"
>
{
item
.
equipmentGroupName
}
(
{
item
.
equipmentCount
}
)
<
Image
className=
"icon"
src=
{
item
.
strangerApplyIcon
}
/>
<
View
>
{
item
.
strangerApplyName
}
</
View
>
</
View
>
</
View
>
</
AtSwipeAction
>
</
View
>
))
}
</
ListView
>
<
View
className=
"device-list-add-btn"
onClick=
{
this
.
AddGroup
}
>
<
Image
className=
"icon"
src=
"https://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/create.png"
/>
</
View
>
{
showModal
?
(
<
Modal
title=
{
name
}
onConfirm=
{
this
.
inputConfirm
}
onCancel=
{
this
.
cancelModal
}
>
<
View
className=
"film-modal"
>
<
Input
placeholder=
"请输入设备组名称不超过20字"
className=
"film-modal-input"
maxLength=
{
20
}
value=
{
temp
.
equipmentGroupName
}
onInput=
{
this
.
changeName
}
/>
</
View
>
</
Modal
>
)
:
null
}
</
View
>
)
}
...
...
src/pages/home/application/index.tsx
View file @
996fcd8e
...
...
@@ -33,7 +33,6 @@ class Device extends Component {
super
(
props
)
const
{
windowHeight
}
=
Taro
.
getSystemInfoSync
()
const
id
=
Taro
.
getStorageSync
(
'isAdd'
)
this
.
state
=
{
current
:
0
,
id
:
'1'
,
...
...
@@ -46,17 +45,13 @@ class Device extends Component {
}
componentDidMount
()
{
Taro
.
setNavigationBarTitle
({
title
:
'
设备
'
title
:
'
应用列表
'
})
}
componentDidShow
()
{
Taro
.
setNavigationBarTitle
({
title
:
'设备'
})
const
id
=
Taro
.
getStorageSync
(
'isAdd'
)
this
.
setState
({
id
:
this
.
$router
.
params
.
id
||
id
title
:
'应用列表'
})
}
changePage
=
value
=>
{
...
...
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