Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
taroMeeting
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
taroMeeting
Commits
4c85e978
Commit
4c85e978
authored
Sep 19, 2018
by
王树冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正尺寸
parent
c80930a2
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
142 additions
and
16 deletions
+142
-16
index.js
config/index.js
+4
-0
counter.js
src/actions/counter.js
+1
-1
app.js
src/app.js
+7
-6
book.png
src/common/image/tab/book.png
+0
-0
book@highlight.png
src/common/image/tab/book@highlight.png
+0
-0
discover.png
src/common/image/tab/discover.png
+0
-0
discover@highlight.png
src/common/image/tab/discover@highlight.png
+0
-0
index.js
src/pages/index/index.js
+23
-8
index.styl
src/pages/index/index.styl
+54
-0
index.js
src/pages/me/index.js
+52
-0
index.styl
src/pages/me/index.styl
+0
-0
counter.js
src/reducers/counter.js
+1
-1
No files found.
config/index.js
View file @
4c85e978
...
...
@@ -2,6 +2,10 @@ const config = {
projectName
:
'demo'
,
date
:
'2018-9-18'
,
designWidth
:
750
,
deviceRatio
:{
'750'
:
1
/
2
,
'375'
:
1
},
sourceRoot
:
'src'
,
outputRoot
:
'dist'
,
plugins
:
{
...
...
src/actions/counter.js
View file @
4c85e978
...
...
@@ -79,7 +79,7 @@ export function asyncAdd() {
// 'content-type': 'application/json'
// }
// }))
export
const
list
=
createApiAction
(
LIST
,
params
=>
api
.
get
(
'
article
/list'
,
params
))
export
const
list
=
createApiAction
(
LIST
,
params
=>
api
.
get
(
'
news
/list'
,
params
))
export
default
bindActionCreators
({
list
,
...
...
src/app.js
View file @
4c85e978
...
...
@@ -14,7 +14,8 @@ class App extends Component {
config
=
{
pages
:
[
'pages/index/index'
'pages/index/index'
,
'pages/me/index'
,
],
window
:
{
backgroundTextStyle
:
'light'
,
...
...
@@ -30,15 +31,15 @@ class App extends Component {
list
:
[
{
pagePath
:
"pages/index/index"
,
selectedIconPath
:
"
/common/image/tab/classic
@highlight.png"
,
iconPath
:
"
/common/image/tab/classic
.png"
,
selectedIconPath
:
"
./common/image/tab/discover
@highlight.png"
,
iconPath
:
"
./common/image/tab/discover
.png"
,
text
:
"发现"
},
{
pagePath
:
"pages/me/index"
,
selectedIconPath
:
"/common/image/tab/my@highlight.png"
,
iconPath
:
"/common/image/tab/my.png"
,
text
:
"
喜欢
"
selectedIconPath
:
"
.
/common/image/tab/my@highlight.png"
,
iconPath
:
"
.
/common/image/tab/my.png"
,
text
:
"
我
"
}
]
}
...
...
src/common/image/tab/book.png
deleted
100755 → 0
View file @
c80930a2
18.3 KB
src/common/image/tab/book@highlight.png
deleted
100755 → 0
View file @
c80930a2
18.2 KB
src/common/image/tab/
classic
.png
→
src/common/image/tab/
discover
.png
View file @
4c85e978
File moved
src/common/image/tab/
classic
@highlight.png
→
src/common/image/tab/
discover
@highlight.png
View file @
4c85e978
File moved
src/pages/index/index.js
View file @
4c85e978
...
...
@@ -45,7 +45,7 @@ class Index extends Component {
super
(
props
)
console
.
log
(
'props'
,
props
);
// this.state = { date: new Date() }
//
props.list()
props
.
list
()
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
this
.
props
,
nextProps
)
...
...
@@ -61,19 +61,34 @@ class Index extends Component {
render
()
{
return
(
<
View
className
=
'index'
>
<
Button
className
=
'add_btn'
onClick
=
{
this
.
props
.
add
}
>+<
/Button
>
<
Button
className
=
'dec_btn'
onClick
=
{
this
.
props
.
dec
}
>-<
/Button
>
<
Button
className
=
'dec_btn'
onClick
=
{
this
.
props
.
asyncAdd
}
>
async
<
/Button
>
<
Button
className
=
'dec_btn'
onClick
=
{
this
.
props
.
list
}
>
list
<
/Button
>
<
View
><
Text
>
{
this
.
props
.
counter
.
num
}
<
/Text></
View
>
<
View
><
Text
>
Hello
,
World
<
/Text></
View
>
<
View
className
=
'news'
>
<
View
className
=
'item'
>
<
View
className
=
'desc'
>
<
View
className
=
'title'
><
/View
>
<
View
className
=
'info'
><
/View
>
<
/View
>
<
View
className
=
'rightImage'
>
<
/View
>
<
/View
>
<
View
>
{
this
.
props
.
list
.
map
((
item
,
index
)
=>
{
return
<
View
key
=
{
index
}
>
{
item
.
title
}
<
/View
>
return
<
View
className
=
'item'
key
=
{
index
}
>
<
View
className
=
'info'
>
<
View
className
=
'title'
>
{
item
.
title
}
<
/View
>
<
View
className
=
'footer'
>
<
View
className
=
'user'
>
{
item
.
username
}
<
/View
>
<
View
className
=
'comment'
>
{
item
.
username
}
<
/View
>
<
/View
>
<
/View
>
<
View
className
=
'rightImage'
><
Image
calssName
=
'img'
src
=
{
item
.
image_url
}
/></
View
>
<
/View
>
})
}
<
/View
>
<
/View
>
<
/View
>
)
}
...
...
src/pages/index/index.styl
View file @
4c85e978
.news
font-size 15px
.item
height 80px
margin-top 10px
background #fff
padding 10px
border-top 1px solid #ededed
.info
float left
width 60%
font-size 12px
.title
height 60px
font-size 16px
color: rgb(63, 65, 70)
.footer
margin-bottom 10px
color: rgb(155, 158, 163);
.user
float left
margin-right 5px
.comment
float left
margin-right 5px
.time
float left
margin-right 5px
.rightImage
width 33%
margin-left 15px
height 70px
float: right;
position: relative;
margin-left 15px
pointer-events: none;
transform: scale(1);
overflow: hidden;
border-radius: 3px;
.img
display: block;
width: 100%;
height: 100%;
max-width: unset;
max-height: unset;
margin-left: 0px;
margin-top: 0px;
border: 0px none;
vertical-align: top;
visibility: visible;
transition: opacity 200ms ease-out 0s;
opacity: 1;
backface-visibility: hidden;
background-color: rgb(255, 255, 255);
src/pages/me/index.js
0 → 100644
View file @
4c85e978
import
Taro
,
{
Component
}
from
'@tarojs/taro'
import
{
View
,
Button
,
Text
}
from
'@tarojs/components'
import
{
connect
}
from
'@tarojs/redux'
import
{
add
,
minus
,
asyncAdd
}
from
'../../actions/counter'
import
'./index.styl'
@
connect
(({
counter
})
=>
({
counter
}),
(
dispatch
)
=>
({
add
()
{
dispatch
(
add
())
},
dec
()
{
dispatch
(
minus
())
},
asyncAdd
()
{
dispatch
(
asyncAdd
())
}
}))
class
Me
extends
Component
{
config
=
{
navigationBarTitleText
:
'我的页面'
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
this
.
props
,
nextProps
)
}
componentWillUnmount
()
{
}
componentDidShow
()
{
}
componentDidHide
()
{
}
render
()
{
return
(
<
View
className
=
'index'
>
<
Button
className
=
'add_btn'
onClick
=
{
this
.
props
.
add
}
>+<
/Button
>
<
Button
className
=
'dec_btn'
onClick
=
{
this
.
props
.
dec
}
>-<
/Button
>
<
Button
className
=
'dec_btn'
onClick
=
{
this
.
props
.
asyncAdd
}
>
me
<
/Button
>
<
View
><
Text
>
{
this
.
props
.
counter
.
num
}
<
/Text></
View
>
<
View
><
Text
>
Hello
,
World
<
/Text></
View
>
<
/View
>
)
}
}
export
default
Me
src/pages/me/index.styl
0 → 100644
View file @
4c85e978
src/reducers/counter.js
View file @
4c85e978
...
...
@@ -21,7 +21,7 @@ export default function counter (state = INITIAL_STATE, action) {
case
LIST
:
return
{
...
state
,
list
:
action
.
payload
.
data
.
article
list
:
action
.
payload
.
data
.
news
}
default
:
return
state
...
...
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