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.setStorageSync('PFWSSS','hq0erouhm4mea8b0mg34gdj0q7') Taro.setStorageSync('X-Token','eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.IntcInVzZXJfaWRcIjpcIjI3XCIsXCJsb2dpbl9uYW1lXCI6XCJ5YW5neGJcIixcImF0XCI6XCIyMDE4LTEyLTE4IDEzOjM1OjUxXCJ9Ig.gXvZxXgU5asfwUJAG-z7k5g2p3dbts2e1X9L902KksE') Taro.setStorageSync('PLU','%2Fm-more') Taro.setStorageSync('localCity','think%3A%7B%2214%22%3A%22%25E7%25A6%258F%25E5%25BB%25BA%25E7%259C%2581%22%2C%2214001%22%3A%22%25E7%25A6%258F%25E5%25B7%259E%25E5%25B8%2582%22%7D') Taro.navigateTo({ url: '/pages/home/home' // url: '/pages/goodsPublish/goodsPublish' // url:'/pages/supplyDemandPublish/supplyDemandPublish' }) } componentWillReceiveProps (nextProps) { console.log(this.props, nextProps) } componentWillUnmount () { } componentDidShow () { } componentDidHide () { } render () { return ( ) } } export default Index