import Taro, { Component } from '@tarojs/taro' import { View, Button, Text, Image } from '@tarojs/components' import { AtSearchBar, AtTabs, AtTabsPane,AtSegmentedControl } from 'taro-ui' import copyrightComponent from '../../component/copyrightComponent/copyrightComponent' import './goods.scss' class Goods extends Component { config = { navigationBarTitleText: '商品' } constructor() { super(...arguments) this.state = { value:'', current: 0, subCurrent:0, }} handleClick(value) { this.setState({ current: value }) } subHandleClick(value) { this.setState({ subCurrent: value }) } componentDidMount() { } componentWillReceiveProps(nextProps) { console.log(this.props, nextProps) } componentWillUnmount() { } componentDidShow() { } componentDidHide() { } render() { const mainTabList = [{ title: '宝贝详情' }, { title: '全部评价' }, { title: '猜你喜欢' }] const subTabList = [{ title: '全部' }, { title: '好评' }, { title: '差评' }, { title: '公开' }, { title: '匿名' }] return ( 11 11 原价 ¥11 促销价 ¥11 商品类型 设计师商品 服务区域 中国/福建省(全省) 月销量 0 总销量 0 浏览量 13 可选规格 >点击 标签页一的内容 { /*子标签Tab*/} { this.state.current === 0 ? 标签1的内容 : null } { this.state.current === 1 ? 标签2的内容 : null } { this.state.current === 2 ? 标签3的内容 : null } { this.state.current === 3 ? 标签4的内容 : null } { this.state.current === 4 ? 标签5的内容 : null } { this.state.current === 5 ? 标签6的内容 : null } 标签页三的内容 进店 收藏商品 加入购物车 ) } } export default Goods