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
79192f5e
authored
Nov 04, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复日程bug
parent
0b9ea683
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
14 deletions
+34
-14
src/app.tsx
+1
-1
src/conpoments/schedule_item/index.tsx
+1
-0
src/pages/home/film/schedule_add/components/device/index.tsx
+1
-1
src/pages/home/film/schedule_add/components/films/index.tsx
+12
-6
src/pages/home/film/schedule_add/index.scss
+2
-0
src/pages/home/film/schedule_add/index.tsx
+17
-6
No files found.
src/app.tsx
View file @
79192f5e
...
@@ -87,7 +87,7 @@ class App extends Component {
...
@@ -87,7 +87,7 @@ class App extends Component {
},
},
{
{
pagePath
:
'pages/home/film/index'
,
pagePath
:
'pages/home/film/index'
,
text
:
'视片'
,
text
:
'视片
及日程
'
,
iconPath
:
'./assets/images/film.png'
,
iconPath
:
'./assets/images/film.png'
,
selectedIconPath
:
'./assets/images/film_ac.png'
selectedIconPath
:
'./assets/images/film_ac.png'
},
},
...
...
src/conpoments/schedule_item/index.tsx
View file @
79192f5e
...
@@ -43,6 +43,7 @@ class ScheduleItem extends Component {
...
@@ -43,6 +43,7 @@ class ScheduleItem extends Component {
render
()
{
render
()
{
let
{
templateUrl
,
filmName
,
templateDescribe
,
templateShow
,
isList
,
time
}
=
this
.
props
let
{
templateUrl
,
filmName
,
templateDescribe
,
templateShow
,
isList
,
time
}
=
this
.
props
templateUrl
=
templateUrl
||
''
templateUrl
=
templateUrl
||
''
console
.
log
(
templateShow
,
this
.
props
)
let
time2
=
this
.
state
.
time
let
time2
=
this
.
state
.
time
return
(
return
(
<
View
className=
"films-item"
>
<
View
className=
"films-item"
>
...
...
src/pages/home/film/schedule_add/components/device/index.tsx
View file @
79192f5e
...
@@ -113,7 +113,7 @@ class DeviceSelect extends Component {
...
@@ -113,7 +113,7 @@ class DeviceSelect extends Component {
})
})
Taro
.
setStorage
({
Taro
.
setStorage
({
key
:
'schedule-add-device'
,
key
:
'schedule-add-device'
,
data
:
JSON
.
stringify
([...
list
])
data
:
JSON
.
stringify
([...
checkedArr
])
})
})
Taro
.
navigateBack
()
Taro
.
navigateBack
()
}
}
...
...
src/pages/home/film/schedule_add/components/films/index.tsx
View file @
79192f5e
...
@@ -66,16 +66,21 @@ class Films extends Component {
...
@@ -66,16 +66,21 @@ class Films extends Component {
checked
:
new
Set
(),
checked
:
new
Set
(),
showTemplate
:
'HORIZONTAL'
showTemplate
:
'HORIZONTAL'
})
})
}
async
componentWillMount
()
{
Taro
.
getStorage
({
key
:
'schedule-add-films'
})
Taro
.
getStorage
({
key
:
'schedule-add-films'
})
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
,
'schedule-add-films'
)
let
arr
=
JSON
.
parse
(
res
.
data
).
map
(
item
=>
{
let
arr
=
JSON
.
parse
(
res
.
data
).
map
(
item
=>
{
return
item
.
filmId
return
item
.
filmId
})
})
console
.
log
(
Taro
.
getStorageSync
(
'schedule-type-state'
))
this
.
setState
(
this
.
setState
(
{
{
checked
:
new
Set
(
arr
),
checked
:
new
Set
(
arr
),
showTemplate
:
JSON
.
parse
(
res
.
data
)[
0
][
'templateShow'
]
||
'HORIZONTAL'
showTemplate
:
JSON
.
parse
(
res
.
data
)[
0
][
'templateShow'
]
||
Taro
.
getStorageSync
(
'schedule-type-state'
)
},
},
()
=>
{
()
=>
{
this
.
page
=
1
this
.
page
=
1
...
@@ -89,12 +94,9 @@ class Films extends Component {
...
@@ -89,12 +94,9 @@ class Films extends Component {
checked
:
new
Set
(),
checked
:
new
Set
(),
showTemplate
:
'HORIZONTAL'
showTemplate
:
'HORIZONTAL'
})
})
this
.
getData
()
})
})
}
}
async
componentWillMount
()
{
this
.
getData
()
}
componentDidShow
()
{
componentDidShow
()
{
this
.
getData
()
this
.
getData
()
}
}
...
@@ -149,6 +151,10 @@ class Films extends Component {
...
@@ -149,6 +151,10 @@ class Films extends Component {
showMyToast
({
title
:
'不可选择不同版型的视片~'
})
showMyToast
({
title
:
'不可选择不同版型的视片~'
})
return
return
}
}
Taro
.
setStorage
({
key
:
'schedule-type-state'
,
data
:
state
})
this
.
setState
(
this
.
setState
(
{
{
showTemplate
:
state
showTemplate
:
state
...
...
src/pages/home/film/schedule_add/index.scss
View file @
79192f5e
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
display
:
flex
;
display
:
flex
;
text-align
:
center
;
justify-content
:
center
;
.bottom-btn-item
{
.bottom-btn-item
{
width
:
50%
;
width
:
50%
;
...
...
src/pages/home/film/schedule_add/index.tsx
View file @
79192f5e
...
@@ -141,13 +141,24 @@ class ScheduleAdd extends Component {
...
@@ -141,13 +141,24 @@ class ScheduleAdd extends Component {
filmList
:
myFilmList
filmList
:
myFilmList
})
})
}
}
deleteAction
()
{
async
deleteAction
()
{
const
{
id
}
=
this
.
$router
.
params
const
{
id
}
=
this
.
$router
.
params
api
.
common
.
deleteSchedule
(
id
).
then
(()
=>
{
Taro
.
showModal
({
content
:
'确定要删除?'
}).
then
(
async
({
confirm
})
=>
{
showMyToast
({
if
(
confirm
)
{
title
:
'删除成功'
try
{
})
api
.
common
.
deleteSchedule
(
id
).
then
(()
=>
{
Taro
.
navigateBack
()
showMyToast
({
title
:
'删除成功'
})
setTimeout
(()
=>
{
Taro
.
navigateBack
()
},
500
)
})
}
catch
(
error
)
{
console
.
error
(
error
)
showMyToast
({
title
:
'失败'
})
}
}
})
})
}
}
enter
()
{
enter
()
{
...
...
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