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