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
559039a0
authored
Dec 06, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放重复点击
parent
14e98da8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
src/pages/home/tempaltes/conpoments/temp_item/index.tsx
+21
-13
No files found.
src/pages/home/tempaltes/conpoments/temp_item/index.tsx
View file @
559039a0
...
...
@@ -5,7 +5,7 @@ import { ITempItem } from '@/reducers/counter'
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
'./index.scss'
import
api
from
'@/api'
import
api
from
'@/api
/index
'
type
IProps
=
ITempItem
...
...
@@ -18,21 +18,29 @@ interface TempItem {
}
class
TempItem
extends
Component
{
goDetail
=
()
=>
{
protected
isload
=
false
goDetail
()
{
const
{
templateId
,
filmId
}
=
this
.
props
// Taro.navigateTo({ url: '/pages/home/device/my_film/index' })
if
(
filmId
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?filmId=
${
filmId
}
`
})
// Taro.navigateTo({ url: `/pages/home/device/my_film/index` })
if
(
!
this
.
isload
)
{
this
.
isload
=
true
if
(
filmId
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?filmId=
${
filmId
}
`
})
// Taro.navigateTo({ url: `/pages/home/device/my_film/index` })
}
else
{
api
.
tempalte
.
getTempalteFilmCount
(
templateId
).
then
(
res
=>
{
if
(
res
.
data
===
0
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
templateId
}
`
})
}
else
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/detail?templateId=
${
templateId
}
`
})
}
})
}
}
else
{
api
.
tempalte
.
getTempalteFilmCount
(
templateId
).
then
(
res
=>
{
if
(
res
.
data
===
0
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
templateId
}
`
})
}
else
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/detail?templateId=
${
templateId
}
`
})
}
})
setTimeout
(()
=>
{
this
.
isload
=
false
},
500
)
}
// Taro.navigateTo({ url: '/pages/home/device/my_film/index' })
}
render
()
{
...
...
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