1) 增加优惠券列表tab切换错误

This commit is contained in:
zhangds 2022-09-27 16:30:07 +08:00
parent 09a61bbb47
commit dfbd7cd67a
2 changed files with 6 additions and 4 deletions

View File

@ -22,7 +22,7 @@ export default class tabbar extends React.Component {
let temp = this.state.tabList[i];
if (i == 0) {
temp.className = "tabbar active";
} else if (i == 0 - 1) {
} else if (i == -1) {
temp.className = "tabbar none-border";
} else {
temp.className = "tabbar";
@ -30,7 +30,6 @@ export default class tabbar extends React.Component {
arr[i] = temp;
}
this.setState({ tabList: arr });
return;
} else {
this.tabChange(0);
}
@ -55,6 +54,7 @@ export default class tabbar extends React.Component {
this.props.tabChange(index);
}
}
render() {
const { tabs } = this.props;
return (

View File

@ -131,7 +131,7 @@ const UseCouponList = () => {
{ title: "创建中", index: -1 },
{ title: "未开始", index: 3 },
{ title: "审核中", index: 6 },
{ title: "审核驳回", index: 7 },
{ title: "未通过", index: 7 },
{ title: "进行中", index: 1 },
{ title: "暂停中", index: 2 },
{ title: "已结束", index: 4 },
@ -166,6 +166,7 @@ const UseCouponList = () => {
page: state.page,
limit: state.limit,
};
console.log("getParam =>", param);
param = _.omitBy(
{
...param,
@ -218,7 +219,8 @@ const UseCouponList = () => {
}
};
const tabChange = (data) => {
setState({ page: 1, limit: 10, status: data, isQuery: !state.isQuery });
let statuss = state.tabList[data].index;
setState({ page: 1, limit: 10, status: statuss, isQuery: !state.isQuery });
};
//