支付宝 店铺页面 分类修改
This commit is contained in:
parent
ff5c1c1389
commit
7a0c7af702
@ -160,20 +160,33 @@ class ShopTypeInteractionComp extends Component {
|
||||
}
|
||||
|
||||
aliCancelButton() {
|
||||
// 只有店铺页面才有onAliCurtainValueFromChild
|
||||
|
||||
if (this.props.hasOwnProperty('onAliCurtainValueFromChild')) {
|
||||
this.props.onAliCurtainValueFromChild(false)
|
||||
} else {
|
||||
this.setState({
|
||||
AliIsShowPicker: false
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
aliConfirmButton() {
|
||||
// 只有店铺页面才有onAliCurtainValueFromChild
|
||||
if (this.props.hasOwnProperty('onAliCurtainValueFromChild')) {
|
||||
this.props.onAliCurtainValueFromChild(false)
|
||||
} else {
|
||||
this.setState({
|
||||
AliIsShowPicker: false
|
||||
})
|
||||
}
|
||||
|
||||
let result = this.state.interactionMultiArray[this.state.multiIndex[0]].children[this.state.multiIndex[1]]
|
||||
|
||||
this.passDataToParent(result)
|
||||
}
|
||||
invokeAliPicker() {
|
||||
console.log('clicked')
|
||||
|
||||
this.setState({
|
||||
AliIsShowPicker: true
|
||||
})
|
||||
@ -185,7 +198,13 @@ class ShopTypeInteractionComp extends Component {
|
||||
|
||||
// 当然父组件有新的props的 会从新渲染组件
|
||||
componentWillReceiveProps(nextProps) {
|
||||
// 只有店铺页面才有isShowCurtain
|
||||
|
||||
if (nextProps.hasOwnProperty('isShowCurtain')) {
|
||||
this.setState({
|
||||
AliIsShowPicker: nextProps.isShowCurtain
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
componentWillUnmount() { }
|
||||
|
@ -76,6 +76,7 @@ class Shop extends Component {
|
||||
// 地图的经度和维度
|
||||
longitude: '',
|
||||
latitude: '',
|
||||
aliShowCurtain:false
|
||||
|
||||
|
||||
}
|
||||
@ -573,6 +574,18 @@ class Shop extends Component {
|
||||
|
||||
})
|
||||
}
|
||||
// 这个函数只针对店铺页面
|
||||
aliCurtainHandler(){
|
||||
this.setState({
|
||||
aliShowCurtain:!this.state.aliShowCurtain
|
||||
})
|
||||
}
|
||||
// 这个函数只针对店铺页面
|
||||
getAliCurtainValueFromChild(value){
|
||||
this.setState({
|
||||
aliShowCurtain:value
|
||||
})
|
||||
}
|
||||
componentDidMount() {
|
||||
showLoading({ title: '加载中' })
|
||||
//页面加载之后 得到指定店铺的商品 和 筛选标签
|
||||
@ -816,13 +829,13 @@ class Shop extends Component {
|
||||
></ShopTypeInteractionComp> : <AliShopTypeInteraction url={URL.GetShopCategoryList}
|
||||
shopId={getGlobalStorage('shopInfo') ? getGlobalStorage('shopInfo').shop_id : ''}
|
||||
// selectedValue={this.state.shopTypeSelected}
|
||||
isShowCurtain={this.state.aliShowCurtain}
|
||||
onPassDataToChild={this.getDataFromShopChild.bind(this)}
|
||||
onAliCurtainValueFromChild={this.getAliCurtainValueFromChild.bind(this)}
|
||||
></AliShopTypeInteraction>}
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
<View >
|
||||
<View onClick={this.aliCurtainHandler.bind(this)} >
|
||||
<Text className='text'>
|
||||
店铺全部分类
|
||||
</Text>
|
||||
|
@ -59,7 +59,8 @@ $themeColor:#FF7142;
|
||||
position: relative;
|
||||
.interaction{
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
// opacity: 0;
|
||||
top:-100px;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user