Commit 444d2586 by Denglingling

调整正在加载中的交互

(cherry picked from commit 8b1b87ba)
parent 56151aa5
...@@ -111,6 +111,14 @@ class ChooseProductPage extends Component { ...@@ -111,6 +111,14 @@ class ChooseProductPage extends Component {
let that = this let that = this
let { token, global_domain_config } = that.props let { token, global_domain_config } = that.props
let { topProcOptionList, defalutLeftItem } = this.state let { topProcOptionList, defalutLeftItem } = this.state
if (topItem[LocalVariable.SELECTED_QUQNTITY] !== 0){
that.setState({
topActiveIndex: topIndex
}, () => {
that.handleLeftNav(topItem['leftOptionList'][0], 0)
})
return
}
that.refs.LoadingModel.show() that.refs.LoadingModel.show()
let params = { let params = {
access_token: token, access_token: token,
...@@ -120,15 +128,13 @@ class ChooseProductPage extends Component { ...@@ -120,15 +128,13 @@ class ChooseProductPage extends Component {
let pro_scate_search = await reqProCategorySearch(global_domain_config, params) let pro_scate_search = await reqProCategorySearch(global_domain_config, params)
console.log('res_2 : ', pro_scate_search) console.log('res_2 : ', pro_scate_search)
if (pro_scate_search.error_code === 0) { if (pro_scate_search.error_code === 0) {
if (topItem[LocalVariable.SELECTED_QUQNTITY] === 0) { let { data } = pro_scate_search
let { data } = pro_scate_search topItem.leftOptionList = defalutLeftItem.concat(data.item)
topItem.leftOptionList = defalutLeftItem.concat(data.item) topItem.leftOptionList.forEach(function (leftObj) {
topItem.leftOptionList.forEach(function (leftObj) { leftObj[LocalVariable.SELECTED_QUQNTITY] = 0
leftObj[LocalVariable.SELECTED_QUQNTITY] = 0 leftObj[LocalVariable.LOCAL_SECOND_DATA] = []
leftObj[LocalVariable.LOCAL_SECOND_DATA] = [] })
}) topProcOptionList[topIndex] = topItem
topProcOptionList[topIndex] = topItem
}
that.setState({ that.setState({
topActiveIndex: topIndex, topActiveIndex: topIndex,
topProcOptionList: topProcOptionList topProcOptionList: topProcOptionList
......
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