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
1c245d90
authored
Dec 19, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改小程序模板详情
parent
0052c86f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
10 deletions
+62
-10
src/assets/styles/mixins.scss
+1
-1
src/common/utils.ts
+1
-1
src/pages/home/tempaltes/conpoments/detail_top/index.scss
+30
-0
src/pages/home/tempaltes/conpoments/detail_top/index.tsx
+22
-4
src/pages/home/tempaltes/conpoments/home_item/index.scss
+1
-0
src/pages/home/tempaltes/detail.tsx
+1
-1
src/pages/home/tempaltes/index.tsx
+3
-1
src/pages/home/tempaltes/scss/detail.scss
+2
-1
src/pages/home/tempaltes/scss/index.scss
+1
-1
No files found.
src/assets/styles/mixins.scss
View file @
1c245d90
...
...
@@ -64,7 +64,7 @@
/* postcss-pxtransform rn eject enable */
overflow
:
hidden
;
white-space
:
nowrap
;
display
:
-
webkit-box
;
//
display: -webkit-box;
text-overflow
:
ellipsis
;
-webkit-line-clamp
:
$line
;
...
...
src/common/utils.ts
View file @
1c245d90
...
...
@@ -59,7 +59,7 @@ export function formatTime(date) {
const
year
=
day
*
365
console
.
log
(
typeof
date
)
if
(
typeof
date
===
'string'
)
{
date
=
date
.
replace
(
'-'
,
'/'
)
date
=
date
.
replace
(
/-/g
,
'/'
)
}
let
times
=
new
Date
(
date
).
getTime
()
const
now
=
new
Date
().
getTime
()
...
...
src/pages/home/tempaltes/conpoments/detail_top/index.scss
View file @
1c245d90
...
...
@@ -61,6 +61,36 @@
padding-top
:
10px
;
color
:
#ccc
;
font-size
:
28px
;
width
:
600px
;
box-sizing
:
border-box
;
position
:
relative
;
.word
{
width
:
540px
;
height
:
35px
;
text-overflow
:
ellipsis
;
@include
lamp-clamp
(
1
);
}
.showAll
{
color
:
#333
;
text-decoration
:
underline
;
position
:
absolute
;
top
:
10px
;
right
:
0
;
}
}
.temp-top-describe-show
{
padding-top
:
10px
;
color
:
#ccc
;
font-size
:
28px
;
.showAll
{
color
:
#333
;
display
:
none
;
}
}
.temp-top-collection
{
...
...
src/pages/home/tempaltes/conpoments/detail_top/index.tsx
View file @
1c245d90
...
...
@@ -20,6 +20,7 @@ type PageState = {
collectionState
:
boolean
collectionId
:
string
current
:
0
showAll
:
boolean
}
type
IProps
=
PageStateProps
&
PageDispatchProps
&
PageOwnProps
...
...
@@ -44,7 +45,6 @@ class DerailTop extends Component {
}
swiperChange
(
e
)
{
console
.
log
(
e
,
'swiperChange'
)
this
.
setState
({
current
:
e
.
detail
.
current
})
...
...
@@ -97,7 +97,7 @@ class DerailTop extends Component {
render
()
{
let
{
templateUrl
,
templateName
,
templateDescribe
,
templateShow
,
templateId
}
=
this
.
props
templateUrl
=
templateUrl
||
''
const
{
collectionState
,
current
}
=
this
.
state
const
{
collectionState
,
current
,
showAll
}
=
this
.
state
let
collectionUrl
=
collectionState
?
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/collection-select.png'
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/collection.png'
...
...
@@ -134,8 +134,26 @@ class DerailTop extends Component {
<
View
className=
"temp-top-text-wrapper"
>
<
View
className=
"temp-top-title"
>
{
templateName
}
</
View
>
<
View
className=
"temp-top-describe"
>
<
Text
>
{
templateDescribe
}
</
Text
>
<
View
className=
{
showAll
&&
templateDescribe
.
length
>=
20
?
'temp-top-describe-show'
:
'temp-top-describe'
}
>
<
View
className=
"word"
>
{
templateDescribe
}
</
View
>
{
templateDescribe
.
length
>=
20
&&
(
<
View
className=
"showAll"
onClick=
{
()
=>
{
this
.
setState
({
showAll
:
true
})
}
}
>
展开
</
View
>
)
}
</
View
>
{
templateId
?
(
<
Image
...
...
src/pages/home/tempaltes/conpoments/home_item/index.scss
View file @
1c245d90
...
...
@@ -6,6 +6,7 @@
padding-bottom
:
20px
;
margin-bottom
:
20px
;
padding-left
:
20px
;
padding-right
:
20px
;
padding-top
:
36px
;
box-sizing
:
border-box
;
...
...
src/pages/home/tempaltes/detail.tsx
View file @
1c245d90
...
...
@@ -92,7 +92,7 @@ class TempDetail extends Component {
createFilm
=
()
=>
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
this
.
$router
.
param
s
.
templateId
}
`
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
this
.
prop
s
.
templateId
}
`
})
// this.setState({ showModal: true })
}
...
...
src/pages/home/tempaltes/index.tsx
View file @
1c245d90
...
...
@@ -80,11 +80,13 @@ class Tempaltes extends Component {
templateId
:
''
})
})
Taro
.
showTabBar
()
}
componentDidShow
()
{
this
.
setState
({
page
:
1
page
:
1
,
templateId
:
''
})
this
.
getData
()
}
...
...
src/pages/home/tempaltes/scss/detail.scss
View file @
1c245d90
...
...
@@ -32,7 +32,8 @@
position
:
absolute
;
left
:
26px
;
top
:
116px
;
height
:
50px
;
height
:
55px
;
width
:
37px
;
.close
{
position
:
absolute
;
...
...
src/pages/home/tempaltes/scss/index.scss
View file @
1c245d90
...
...
@@ -75,7 +75,7 @@
&
-scroll
{
width
:
100%
;
height
:
100%
;
padding
:
20px
20px
0
;
padding
:
20px
0
;
padding-left
:
0
;
@include
eject
(
box-sizing
,
border-box
);
...
...
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