产品-智能算薪

This commit is contained in:
黎永顺 2023-07-21 15:56:13 +08:00
parent aabcbd2519
commit f6db0c18dd
1 changed files with 18 additions and 7 deletions

View File

@ -5,32 +5,43 @@
* Date: 2023/7/19 * Date: 2023/7/19
*/ */
import React, { Component } from "react"; import React, { Component } from "react";
import { Button, Col, Row } from "antd"; import { Button, Col, Input, Row } from "antd";
import TipLabel from "../../../components/TipLabel"; import TipLabel from "../../../components/TipLabel";
import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import "./index.less"; import "./index.less";
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
class EnableSettings extends Component { class EnableSettings extends Component {
constructor(props) {
super(props);
this.state = {
enable: "1"
};
}
handleEnale = (enable) => {
};
render() { render() {
const { enable } = this.state;
const tipList = [ const tipList = [
getLabel(111, "1、智能算薪默认是开启的若购买了智能算薪请先配置账号密码在购买的流量足够的前提下即可正常使用"), getLabel(111, "1、智能算薪默认是开启的若购买了智能算薪请先配置账号密码在购买的流量足够的前提下即可正常使用"),
getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况"), getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况"),
getLabel(111, "3、您可以设置【流量不足提醒】提前提醒可以避免次月要用时因流量不足无法使用的情况。"), getLabel(111, "3、您可以设置【流量不足提醒】提前提醒可以避免次月要用时因流量不足无法使用的情况。"),
getLabel(111, "4、如您需了解您购买的流量的使用明细可查看【流量使用记录】") getLabel(111, "4、如您需了解您购买的流量的使用明细可查看【流量使用记录】")
]; ];
const Input = label => { const InputAccount = label => {
return ( return (
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}> <WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaInput/> <Input autoComplete="new-password" placeholder={getLabel(111, "请输入")}/>
</WeaFormItem> </WeaFormItem>
); );
}; };
const InputPassword = label => { const InputPassword = label => {
return ( return (
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}> <WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaInput type="password"/> <Input type="password" autoComplete="new-password" placeholder={getLabel(111, "请输入")}/>
</WeaFormItem> </WeaFormItem>
); );
}; };
@ -43,14 +54,14 @@ class EnableSettings extends Component {
<div <div
className="info">{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}</div> className="info">{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}</div>
</div> </div>
<div className="right"><WeaCheckbox display="switch"/></div> <div className="right"><WeaCheckbox display="switch" value={enable} onChange={this.handleEnale}/></div>
</div> </div>
<div className="userinfo"> <div className="userinfo">
<div className="left"> <div className="left">
<WeaSearchGroup <WeaSearchGroup
showGroup needTigger={false} col={3} showGroup needTigger={false} col={3}
items={[ items={[
{ com: Input(getLabel(111, "账号")) }, { com: InputAccount(getLabel(111, "账号")) },
{ com: InputPassword(getLabel(111, "密码")) } { com: InputPassword(getLabel(111, "密码")) }
]} ]}
/> />