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
0ca202a3
authored
Sep 25, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预览
parent
3640c563
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletions
+54
-1
src/app.tsx
+1
-0
src/pages/home/tempaltes/film_edit.tsx
+7
-1
src/pages/home/tempaltes/film_preview.tsx
+46
-0
No files found.
src/app.tsx
View file @
0ca202a3
...
...
@@ -50,6 +50,7 @@ class App extends Component {
'pages/home/device/my_film/index'
,
'pages/home/tempaltes/film_detail'
,
'pages/home/tempaltes/film_page'
,
'pages/home/tempaltes/film_preview'
,
'pages/home/tempaltes/film_edit'
,
'pages/home/tempaltes/detail'
,
'pages/home/tempaltes/template_type'
,
...
...
src/pages/home/tempaltes/film_edit.tsx
View file @
0ca202a3
...
...
@@ -110,6 +110,12 @@ class FilmDetail extends Component {
})
}
}
goPreview
()
{
const
{
filmInfo
}
=
this
.
state
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_preview?frameUrl=
${
filmInfo
.
frameUrl
}
&filmId=
${
filmInfo
.
filmId
}
`
})
}
componentWillMount
()
{
this
.
getData
()
}
...
...
@@ -283,7 +289,7 @@ class FilmDetail extends Component {
<
EditMenu
{
...
pageList
[
pageIndex
]}
frameUrl=
{
filmInfo
.
frameUrl
}
setValue=
{
this
.
setValue
}
/>
</
View
>
<
View
className=
"film-detail-bottom-bar"
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
goPreview
}
>
预览视片
</
Button
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
updateFilm
}
>
...
...
src/pages/home/tempaltes/film_preview.tsx
0 → 100644
View file @
0ca202a3
type
PageOwnProps
=
{}
import
{
ComponentClass
}
from
'react'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
{
getWindiwHeight
}
from
'@/common/utils'
import
{
WebView
}
from
'@tarojs/components'
type
PageState
=
{
count
:
number
page
:
number
windowHeight
:
number
typeList
:
any
[]
frameUrl
:
string
filmId
:
string
}
interface
FilmPreview
{
state
:
PageState
}
class
FilmPreview
extends
Component
{
config
:
Config
=
{
navigationBarTitleText
:
'全部类型'
}
protected
page
=
1
constructor
(
props
:
any
)
{
super
(
props
)
const
{
frameUrl
,
filmId
}
=
this
.
$router
.
params
this
.
state
=
{
count
:
0
,
typeList
:
[],
page
:
1
,
frameUrl
:
frameUrl
,
filmId
:
filmId
,
windowHeight
:
getWindiwHeight
()
}
}
componentWillMount
()
{
// this.getData()
// console.log('object', Taro.get)
}
render
()
{
const
{
frameUrl
,
filmId
}
=
this
.
state
return
<
WebView
style=
"width: 100%"
src=
{
frameUrl
+
`?filmId=${filmId}&isPreview=1`
}
/>
}
}
export
default
FilmPreview
as
ComponentClass
<
PageOwnProps
,
PageState
>
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