64 lines
1.2 KiB
JavaScript
64 lines
1.2 KiB
JavaScript
import Taro, { Component } from '@tarojs/taro'
|
|
import { View } 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({
|
|
// url: '/pages/myGoodList/myGoodList'
|
|
// url: '/pages/myDemandSupplyEdit/myDemandSupplyEdit'
|
|
// url: '/pages/mySupplyDemand/mySupplyDemand'
|
|
// url:'/pages/grabOrderPage/grabOrderPage'
|
|
url:'/pages/home/home'
|
|
// url:'/pages/myNeeds/myNeeds',
|
|
//url:'/pages/myNeedsPublish/myNeedsPublish'
|
|
// url:'/pages/goodsPublish/goodsPublish'
|
|
|
|
|
|
})
|
|
}
|
|
componentWillReceiveProps(nextProps) {
|
|
console.log(this.props, nextProps)
|
|
}
|
|
|
|
componentWillUnmount() { }
|
|
|
|
componentDidShow() { }
|
|
|
|
componentDidHide() { }
|
|
|
|
render() {
|
|
return (
|
|
<View className='index'>
|
|
|
|
</View>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default Index
|