cf-wx-app/src/pages/index/index.js

56 lines
1.0 KiB
JavaScript
Raw Normal View History

2018-11-29 17:35:49 +08:00
import Taro, { Component } from '@tarojs/taro'
2018-12-11 17:34:06 +08:00
import { View } from '@tarojs/components'
2018-11-29 17:35:49 +08:00
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-24 17:35:51 +08:00
url: '/pages/goodsPublish/goodsPublish'
// url: '/pages/mySupplyDemand/mySupplyDemand'
2018-12-18 17:37:23 +08:00
// url:'/pages/supplyDemandPublish/supplyDemandPublish'
2018-11-29 17:35:49 +08:00
})
}
componentWillReceiveProps (nextProps) {
console.log(this.props, nextProps)
}
componentWillUnmount () { }
componentDidShow () { }
componentDidHide () { }
render () {
return (
<View className='index'>
2018-12-06 17:24:34 +08:00
2018-11-29 17:35:49 +08:00
</View>
)
}
}
export default Index