1) 增加优惠券列表tab切换错误
This commit is contained in:
parent
09a61bbb47
commit
dfbd7cd67a
|
@ -22,7 +22,7 @@ export default class tabbar extends React.Component {
|
||||||
let temp = this.state.tabList[i];
|
let temp = this.state.tabList[i];
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
temp.className = "tabbar active";
|
temp.className = "tabbar active";
|
||||||
} else if (i == 0 - 1) {
|
} else if (i == -1) {
|
||||||
temp.className = "tabbar none-border";
|
temp.className = "tabbar none-border";
|
||||||
} else {
|
} else {
|
||||||
temp.className = "tabbar";
|
temp.className = "tabbar";
|
||||||
|
@ -30,7 +30,6 @@ export default class tabbar extends React.Component {
|
||||||
arr[i] = temp;
|
arr[i] = temp;
|
||||||
}
|
}
|
||||||
this.setState({ tabList: arr });
|
this.setState({ tabList: arr });
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
this.tabChange(0);
|
this.tabChange(0);
|
||||||
}
|
}
|
||||||
|
@ -55,6 +54,7 @@ export default class tabbar extends React.Component {
|
||||||
this.props.tabChange(index);
|
this.props.tabChange(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { tabs } = this.props;
|
const { tabs } = this.props;
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -131,7 +131,7 @@ const UseCouponList = () => {
|
||||||
{ title: "创建中", index: -1 },
|
{ title: "创建中", index: -1 },
|
||||||
{ title: "未开始", index: 3 },
|
{ title: "未开始", index: 3 },
|
||||||
{ title: "审核中", index: 6 },
|
{ title: "审核中", index: 6 },
|
||||||
{ title: "审核驳回", index: 7 },
|
{ title: "未通过", index: 7 },
|
||||||
{ title: "进行中", index: 1 },
|
{ title: "进行中", index: 1 },
|
||||||
{ title: "暂停中", index: 2 },
|
{ title: "暂停中", index: 2 },
|
||||||
{ title: "已结束", index: 4 },
|
{ title: "已结束", index: 4 },
|
||||||
|
@ -166,6 +166,7 @@ const UseCouponList = () => {
|
||||||
page: state.page,
|
page: state.page,
|
||||||
limit: state.limit,
|
limit: state.limit,
|
||||||
};
|
};
|
||||||
|
console.log("getParam =>", param);
|
||||||
param = _.omitBy(
|
param = _.omitBy(
|
||||||
{
|
{
|
||||||
...param,
|
...param,
|
||||||
|
@ -218,7 +219,8 @@ const UseCouponList = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const tabChange = (data) => {
|
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 });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 跳转商品范围
|
// 跳转商品范围
|
||||||
|
|
Loading…
Reference in New Issue