更改
This commit is contained in:
parent
ab94e9468a
commit
7d4dcf52ab
@ -210,7 +210,7 @@ export default function CardProj(props: any) {
|
||||
<div className='proj-progress' key={item.value} style={{
|
||||
background: tagIdArray.includes(item.value) ? '#ff7b00' : '',
|
||||
color: tagIdArray.includes(item.value) ? '#ffffff' : '#5a5a5a',
|
||||
border: tagIdArray.includes(item.value) ? 'none' : ' 1px solid #5a5a5a',
|
||||
border: tagIdArray.includes(item.value) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a',
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
|
@ -29,7 +29,7 @@ export default function ListProj() {
|
||||
// // setKeywords(state.keyword)
|
||||
// }
|
||||
const keywords = state ? state.keyword : ''
|
||||
const name = state ? state.name : ''
|
||||
const type = state ? state.type : ''
|
||||
|
||||
const chargeAdditionals = state ? state.chargeAdditionals : ''
|
||||
const tagDataId = state ? state.tagDataId : ''
|
||||
@ -61,7 +61,7 @@ export default function ListProj() {
|
||||
page: currentPage,
|
||||
rows: 10,
|
||||
keywords: keywords,
|
||||
charge: name,
|
||||
charge: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId,
|
||||
@ -74,7 +74,8 @@ export default function ListProj() {
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
// console.log('数据', data);
|
||||
|
||||
console.log('得到数据');
|
||||
|
||||
setPage(data.page);
|
||||
setTotal(data.total);
|
||||
setProjs(data.rows);
|
||||
@ -119,6 +120,8 @@ export default function ListProj() {
|
||||
}
|
||||
useEffect(()=>{
|
||||
getTag()
|
||||
// console.log('这啥啊',indexListContext.categoryChangeCount);
|
||||
// console.log('这啥啊2',indexListContext.category)
|
||||
},[])
|
||||
// 更新数据
|
||||
// const upreqData = () => {
|
||||
@ -197,15 +200,21 @@ export default function ListProj() {
|
||||
setTimeout(() => {
|
||||
setShowPage(true)
|
||||
}, 0);
|
||||
}, [indexListContext.status, keywords, name, chargeAdditionals, tagDataId, authorId])
|
||||
|
||||
|
||||
}, [indexListContext.status, keywords, type, chargeAdditionals, tagDataId, authorId])
|
||||
|
||||
useEffect(() => {
|
||||
reqData(page);
|
||||
// reqData(page); //注释掉了 不知道者干嘛的 写上之后刷新要两次才不掉状态
|
||||
// if (indexListContext.categorys) {
|
||||
|
||||
// reqData(page);
|
||||
// // renderCategory();
|
||||
// }
|
||||
// alert(1)
|
||||
// console.log('什么玩意',indexListContext.categoryChangeCount);
|
||||
// console.log('什么玩意',indexListContext.category);
|
||||
|
||||
}, [indexListContext.categoryChangeCount, indexListContext.category])
|
||||
|
||||
// const renderStatus = () => {
|
||||
|
@ -449,7 +449,6 @@ export default function Index() {
|
||||
getProjOwnerList()
|
||||
getTag()
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
// console.log('监听', '类型:', type, '关键字:', keywords, '额外付费:', chargeAdditionals,'进度:',tagDataId);
|
||||
// console.log(Boolean(keywords));
|
||||
@ -474,30 +473,43 @@ export default function Index() {
|
||||
// }
|
||||
// console.log('监听',Boolean(authorId));
|
||||
if (location.pathname.includes('/home')) {
|
||||
if (!keywords && !type && !chargeAdditionals && !tagDataId && !authorId) {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: '',
|
||||
name: '',
|
||||
chargeAdditionals: '',
|
||||
tagDataId: '',
|
||||
authorId: ''
|
||||
}
|
||||
})
|
||||
} else {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (!keywords && !type && !chargeAdditionals && !tagDataId && !authorId) {
|
||||
// init()
|
||||
// nav('/home', {
|
||||
// state: {
|
||||
// keyword: '',
|
||||
// name: '',
|
||||
// chargeAdditionals: '',
|
||||
// tagDataId: '',
|
||||
// authorId: ''
|
||||
// }
|
||||
// })
|
||||
|
||||
// } else {
|
||||
// nav('/home', {
|
||||
// state: {
|
||||
// keyword: keywords,
|
||||
// name: type,
|
||||
// chargeAdditionals: chargeAdditionals,
|
||||
// tagDataId: tagDataId,
|
||||
// authorId: authorId
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
|
||||
console.log('type',type);
|
||||
console.log('chargeAdditionals',chargeAdditionals);
|
||||
|
||||
}, [type, chargeAdditionals, keywords, tagDataId, authorId]);
|
||||
|
||||
const handleSearch = (value: string) => {
|
||||
@ -506,7 +518,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: value,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
@ -522,7 +534,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: '',
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
@ -569,7 +581,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: ''
|
||||
@ -580,7 +592,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: item.projOwnerId
|
||||
@ -688,15 +700,12 @@ export default function Index() {
|
||||
value={type}
|
||||
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
|
||||
onChange={(value: string) => {
|
||||
// console.log(`selected ${value}`);
|
||||
setType(value)
|
||||
// alert(`selected ${value}`)
|
||||
// lyp
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
type: value,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
name: value,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
}
|
||||
@ -725,7 +734,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: value,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
@ -754,7 +763,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: value,
|
||||
authorId: authorId
|
||||
@ -810,7 +819,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
@ -834,7 +843,7 @@ export default function Index() {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
type: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
tagDataId: tagDataId,
|
||||
authorId: authorId
|
||||
|
Loading…
Reference in New Issue
Block a user