Commit 80f1570e authored by wty's avatar wty

更新prod3

parent 7cf14eae
...@@ -40,10 +40,9 @@ getMysql.then(Mysql => { ...@@ -40,10 +40,9 @@ getMysql.then(Mysql => {
router.get('/queryToolBox', (req, res) => { router.get('/queryToolBox', (req, res) => {
let {isFollow, type_id} = req.query let {isFollow, type_id} = req.query
let SQL = `SELECT toolbox.*, type_childtype_toolbox.child_type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id WHERE type_childtype_toolbox.type_id = ?`
if (!isFollow && !type_id){ let SQL = `SELECT toolbox.*, type_childtype_toolbox.child_type_id, type_childtype_toolbox.type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id`
SQL = `SELECT toolbox.*, type_childtype_toolbox.child_type_id, type_childtype_toolbox.type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id`
}
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){
......
...@@ -65,7 +65,7 @@ function Index() { ...@@ -65,7 +65,7 @@ function Index() {
src="https://i.tianqi.com/?c=code&a=getcode&id=40&icon=1"/> src="https://i.tianqi.com/?c=code&a=getcode&id=40&icon=1"/>
</div> </div>
</div> </div>
<IndexContentAdmin typeData={[{type_id: 'all', type_name: '全部'}, {type_id: 'follow', type_name: '我的收藏'}]}/> <IndexContentAdmin typeData={[ {type_id: 'follow', type_name: '我的收藏'}]}/>
{ {
Array.isArray(dataCenter?.type) && dataCenter?.type?.map(v => ( Array.isArray(dataCenter?.type) && dataCenter?.type?.map(v => (
<IndexContentAdmin typeData={[v]} key={v.type_id}/> <IndexContentAdmin typeData={[v]} key={v.type_id}/>
......
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