flx: 绑定类型为优惠券锁定域名

This commit is contained in:
zhangds 2022-11-02 17:01:23 +08:00
parent bc0d1a3403
commit cfdff429da
1 changed files with 15 additions and 5 deletions

View File

@ -34,9 +34,10 @@ export default class acclist extends React.Component {
//数据模型不可少
theme_id: "",
use: 1,
link: 3,
link: 1,
},
select_theme: null,
keyType: sessionStorage.getItem("keyType"),
};
}
@ -49,10 +50,15 @@ export default class acclist extends React.Component {
// 第一步:判断是否优惠券
let white = sessionStorage.getItem("white");
let keyType = sessionStorage.getItem("keyType");
console.log("white =>", white);
console.log("keyType =>", keyType);
this.setState({
keyType: keyType,
});
// 2 优惠券
if (keyType === "2") {
let model2 = this.state.model;
model2.link = 1;
this.setState({ model: model2 });
if (white === "1") {
// 并且是 白名单
params.page = 8;
@ -218,8 +224,12 @@ export default class acclist extends React.Component {
value={this.state.model.link}
>
<RadioButton value={1}>大客户</RadioButton>
<RadioButton value={2}>普通商户</RadioButton>
<RadioButton value={3}>备用</RadioButton>
<RadioButton value={2} disabled={this.state.keyType === "2"}>
普通商户
</RadioButton>
<RadioButton value={3} disabled={this.state.keyType === "2"}>
备用
</RadioButton>
</RadioGroup>
</FormItem>
</Form>