Commit 27f42770 authored by wty's avatar wty

修复获取收藏信息时出现的bug

parent f5f9faff
...@@ -45,7 +45,7 @@ getMysql.then(Mysql => { ...@@ -45,7 +45,7 @@ getMysql.then(Mysql => {
SQL = `SELECT * FROM toolbox` SQL = `SELECT * FROM toolbox`
} }
if (isFollow) { if (isFollow) {
type_id = JSON.parse(type_id) // type_id = JSON.parse(type_id)
if (Array.isArray(type_id) && !type_id.length){ if (Array.isArray(type_id) && !type_id.length){
res.send({ res.send({
success: true, success: true,
......
...@@ -22,6 +22,7 @@ function Index() { ...@@ -22,6 +22,7 @@ function Index() {
.then(() => fetchData('/query/queryChildType', {type_id: dataCenter.type_id}, 'childType')) .then(() => fetchData('/query/queryChildType', {type_id: dataCenter.type_id}, 'childType'))
.then(() => dispatch(NEED_UPDATE_INDEX())) .then(() => dispatch(NEED_UPDATE_INDEX()))
}, [dataCenter.type_id]) }, [dataCenter.type_id])
useEffect(() => { useEffect(() => {
if (dataCenter.needUpdateIndex) { if (dataCenter.needUpdateIndex) {
const _typeId = dataCenter.type_id === 'follow' ? { const _typeId = dataCenter.type_id === 'follow' ? {
......
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 to comment