Commit 9d89c930 by hank

修复模板类型筛选bug

parent 172233cc
...@@ -126,7 +126,6 @@ class TemplateTypeDetail extends Component { ...@@ -126,7 +126,6 @@ class TemplateTypeDetail extends Component {
tagName: '全部', tagName: '全部',
checked: true checked: true
}) })
console.log(typeData)
const { list, count } = tempData const { list, count } = tempData
this.setState({ this.setState({
count, count,
...@@ -146,11 +145,15 @@ class TemplateTypeDetail extends Component { ...@@ -146,11 +145,15 @@ class TemplateTypeDetail extends Component {
} }
tagIdChange(id) { tagIdChange(id) {
console.log(id) console.log(id)
this.setState({ this.setState(
{
tagId: id tagId: id
}) },
() => {
this.getTemplate(id) this.getTemplate(id)
} }
)
}
radioChange(e) { radioChange(e) {
console.log(e) console.log(e)
} }
...@@ -172,12 +175,6 @@ class TemplateTypeDetail extends Component { ...@@ -172,12 +175,6 @@ class TemplateTypeDetail extends Component {
done() done()
} }
shouldComponentUpdate(_nextProps: ITempItem, _nextState: PageState) {
const { detailData, filmDataList, showModal } = this.state
const { detailData: DD, filmDataList: FD, showModal: SM } = _nextState
return FD !== filmDataList || DD !== detailData || SM !== showModal
}
render() { render() {
const { const {
typeData, typeData,
...@@ -188,12 +185,8 @@ class TemplateTypeDetail extends Component { ...@@ -188,12 +185,8 @@ class TemplateTypeDetail extends Component {
tagId, tagId,
templateShow templateShow
} = this.state } = this.state
console.log(tagsList, filmDataList)
return ( return (
<View <View className="temp-detail">
className="temp-detail"
style={{ height: process.env.TARO_ENV === 'rn' ? windowHeight : '100%' }}
>
<View className="temp-detail-scroll"> <View className="temp-detail-scroll">
<View className="radio-list"> <View className="radio-list">
<RadioGroup className="radio-group"> <RadioGroup className="radio-group">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment