2018-11-29 17:35:49 +08:00
|
|
|
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.scss'
|
|
|
|
|
|
|
|
|
|
|
|
@connect(({ counter }) => ({
|
|
|
|
counter
|
|
|
|
}), (dispatch) => ({
|
|
|
|
add () {
|
|
|
|
dispatch(add())
|
|
|
|
},
|
|
|
|
dec () {
|
|
|
|
dispatch(minus())
|
|
|
|
},
|
|
|
|
asyncAdd () {
|
|
|
|
dispatch(asyncAdd())
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
class Index extends Component {
|
|
|
|
|
|
|
|
config = {
|
|
|
|
navigationBarTitleText: '首页'
|
|
|
|
}
|
|
|
|
|
|
|
|
//http://ihome6.com/Shop-supplyShops
|
|
|
|
componentDidMount(){
|
|
|
|
Taro.navigateTo({
|
2018-12-04 17:32:30 +08:00
|
|
|
url: '/pages/shop/shop'
|
2018-11-29 17:35:49 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
// Taro.request({
|
|
|
|
// url:'http://192.168.1.230/Shop-wxStore',
|
|
|
|
|
|
|
|
// })
|
|
|
|
// .then(res => console.log(res.data))
|
|
|
|
}
|
|
|
|
componentWillReceiveProps (nextProps) {
|
|
|
|
console.log(this.props, nextProps)
|
|
|
|
}
|
|
|
|
|
|
|
|
componentWillUnmount () { }
|
|
|
|
|
|
|
|
componentDidShow () { }
|
|
|
|
|
|
|
|
componentDidHide () { }
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<View className='index'>
|
|
|
|
|
|
|
|
</View>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Index
|