Commit f764dfe5 authored by 18868195926's avatar 18868195926

feat: 新增我的页面

parent 02a6f31c
import Taro, {Component} from '@tarojs/taro'
import { View, OpenData} from '@tarojs/components'
import { connect } from '@tarojs/redux'
import { setUserInfo } from '@/actions/user'
import NavBar from '@/components/NavBar'
import './index.scss'
@connect(({ user, nav }) => ({
user, nav
}), (dispatch) => ({
setUserInfo (data) {
dispatch(setUserInfo(data || {}))
},
}))
class Index extends Component {
state = {}
componentWillReceiveProps (nextProps) {
console.log(this.props, nextProps)
}
componentWillUnmount () { }
componentDidMount() {}
componentDidShow () { }
componentDidHide () { }
render () {
return (
<View>
<NavBar pageName='门店' bgColor='#fff'></NavBar>
<OpenData type='userAvatarUrl'></OpenData>
<OpenData type='userNickName'></OpenData>
</View>
)
}
}
export default Index
.index {
flex-direction: column;
width: 100%;
}
.swpier-view {
width: 100%;
.img {
width: 100%;
height: 100%;
}
}
.city {
position: absolute;
display: inline-flex;
align-items: center;
font-size: 32px;
font-weight: 500;
z-index: 11;
color: #333;
.loc-icon {
width: 36px;
height: 36px;
margin-right: 12px;
}
}
.sub-nav {
width: 100%;
padding: 20px 0;
display: flex;
flex-direction: row;
.content {
width: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img {
width: 80px;
height: 80px;
}
}
}
.sub-title {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.store-list-title {
width: 100%;
margin: 20px 0;
}
.list-view {
display: flex;
flex-direction: row;
padding: 20px;
background-color: #ccc;
.img {
width: 200px;
height: 200px;
}
.text-cont {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.distance {
display: flex;
align-items: center;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment