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