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
081b4268
authored
Nov 22, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化视片item
parent
9d89c930
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
33 deletions
+44
-33
src/conpoments/film_list_item/index.scss
+13
-0
src/conpoments/film_list_item/index.tsx
+14
-2
src/pages/home/device/film_list/index.tsx
+10
-1
src/pages/home/film/film_list/index.tsx
+4
-4
src/pages/home/film/schedule_add/components/device/index.tsx
+3
-26
No files found.
src/conpoments/film_list_item/index.scss
View file @
081b4268
...
...
@@ -31,5 +31,18 @@
font-size
:
22px
;
color
:
#666
;
}
&
-setting
{
margin-top
:
10px
;
width
:
300px
;
text-align
:
right
;
height
:
40px
;
}
&
-setting-img
{
vertical-align
:
top
;
width
:
40px
;
height
:
40px
;
}
}
}
src/conpoments/film_list_item/index.tsx
View file @
081b4268
...
...
@@ -12,6 +12,8 @@ type PageDispatchProps = {}
interface
PageOwnProps
extends
IMilmListItme
{
onClick
?:
()
=>
void
isChoose
?:
boolean
updateTime
?:
string
onSetting
?:
()
=>
void
}
type
PageState
=
{}
...
...
@@ -25,7 +27,7 @@ interface FilmListItem {
class
FilmListItem
extends
Component
{
render
()
{
let
{
templateUrl
,
filmName
,
equipmentCount
,
onClick
,
isChoose
}
=
this
.
props
let
{
templateUrl
,
filmName
,
updateTime
,
onClick
,
isChoose
,
onSetting
}
=
this
.
props
templateUrl
=
templateUrl
||
''
return
(
<
View
className=
"films-item"
onClick=
{
()
=>
onClick
&&
onClick
()
}
>
...
...
@@ -34,8 +36,18 @@ class FilmListItem extends Component {
</
View
>
<
View
className=
"films-item-info"
>
<
Text
className=
"films-item-info-name"
>
{
filmName
}
</
Text
>
{
isChoose
?
null
:
<
Text
className=
"films-item-info-count"
>
{
updateTime
}
</
Text
>
}
{
isChoose
?
null
:
(
<
Text
className=
"films-item-info-count"
>
播放设备数量:
{
equipmentCount
}
</
Text
>
<
View
className=
"films-item-info-setting"
>
管理
<
Image
className=
"films-item-info-setting-img"
onClick=
{
()
=>
{
onSetting
&&
onSetting
()
}
}
src=
"https://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/manager.png"
/>
</
View
>
)
}
</
View
>
</
View
>
...
...
src/pages/home/device/film_list/index.tsx
View file @
081b4268
...
...
@@ -82,6 +82,9 @@ class Films extends Component {
goDetail
({
filmId
}:
IMilmListItme
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?filmId=
${
filmId
}
`
})
}
onSetting
({
filmId
}:
IMilmListItme
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?filmId=
${
filmId
}
`
})
}
async
onDownRefresh
(
done
:
any
)
{
this
.
page
=
1
...
...
@@ -128,7 +131,13 @@ class Films extends Component {
}
]
}
>
<
FilmListItem
onClick=
{
()
=>
this
.
goDetail
(
item
)
}
{
...
item
}
/>
<
FilmListItem
onClick=
{
()
=>
this
.
goDetail
(
item
)
}
{
...
item
}
onSetting=
{
()
=>
{
this
.
onSetting
(
item
)
}
}
/>
</
AtSwipeAction
>
))
}
</
ListView
>
...
...
src/pages/home/film/film_list/index.tsx
View file @
081b4268
...
...
@@ -102,7 +102,9 @@ class Films extends Component {
}
goDetail
(
item
:
IMilmListItme
)
{
console
.
log
(
item
)
// Taro.navigateTo({ url: `/pages/home/tempaltes/film_detail?filmId=${item.filmId}` })
}
onSetting
(
item
)
{
if
(
process
.
env
.
TARO_ENV
!==
'rn'
)
{
Taro
.
hideTabBar
().
then
(()
=>
{
this
.
setState
({
...
...
@@ -116,8 +118,6 @@ class Films extends Component {
chooseItem
:
item
})
}
// Taro.navigateTo({ url: `/pages/home/tempaltes/film_detail?filmId=${item.filmId}` })
}
ActionSheetHandleCancel
()
{
this
.
setState
({
...
...
@@ -238,7 +238,7 @@ class Films extends Component {
}
]
}
>
<
FilmListItem
onClick=
{
()
=>
this
.
goDetail
(
item
)
}
{
...
item
}
/>
<
FilmListItem
onClick=
{
()
=>
this
.
goDetail
(
item
)
}
{
...
item
}
onSetting=
{
()
=>
{
this
.
onSetting
(
item
)}
}
/>
</
AtSwipeAction
>
))
}
</
ListView
>
...
...
src/pages/home/film/schedule_add/components/device/index.tsx
View file @
081b4268
...
...
@@ -227,33 +227,10 @@ class DeviceSelect extends Component {
showMyToast
({
title
:
'绑定成功'
})
Taro
.
navigateBack
()
Taro
.
reLaunch
({
url
:
'/pages/home/film/index'
})
})
// let obj = {
// calendarName: 'DEFAULstring',
// filmInfos: [
// {
// filmId: fId,
// time: '00:00'
// }
// ],
// equipmentsIds: equipmentsIds,
// equipmentTopicList: equipmentTopicList,
// calendarType: 'DEFAUL',
// calendarId: ''
// }
// if (!cId) {
// console.log('createSchedule')
// delete obj.calendarId
// api.common.createSchedule(obj).then(() => {
// Taro.navigateBack()
// })
// } else {
// obj.calendarId = cId
// api.common.updateSchedule(obj).then(() => {
// Taro.navigateBack()
// })
// }
}
else
{
Taro
.
setStorage
({
key
:
'schedule-add-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