Commit 6f1ce203 authored by 18868195926's avatar 18868195926

feat: 门店详情页面新增

parent f764dfe5
import Taro, {Component} from '@tarojs/taro'
import { View, Image, Text} 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' showBack></NavBar>
<View className='top'>
<Text>
米雅便利(北京店)
</Text>
<Text className='distance'>
200m
</Text>
</View>
<Image className='head-img' src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1586229157&di=6997346b65b0e2e2ff7a733ae9b5fcc5&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'></Image>
<View className='instore-img'>
<Text className='instore-img-title'>店内环境</Text>
<Image className='head-img' src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1586229157&di=6997346b65b0e2e2ff7a733ae9b5fcc5&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'></Image>
</View>
<View className='info-content'>
<Text className='info-content-text'>营业时间</Text>
<Text className='info-content-text'>10:00 - 18:00</Text>
</View>
</View>
)
}
}
export default Index
.top {
position: relative;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: #ccc;
padding: 20px 0;
.distance {
position: absolute;
right: 10px;
}
}
.head-img {
width: 100%;
height: 300px;
}
.instore-img-title {
display: block;
font-size: 24px;
padding: 10px 0;
}
.info-content {
display: flex;
flex-direction: column;
.info-content-text {
margin: 10px 0;
}
}
\ 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