Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend

This commit is contained in:
red-deng-deng 2021-11-30 00:35:21 +08:00
commit fb0e7d4873
4 changed files with 34 additions and 12 deletions

View File

@ -188,6 +188,6 @@ resize: none;
left: 0; left: 0;
top: 0; top: 0;
background-color: rgba(0,0,0,0.5); background-color: rgba(0,0,0,0.5);
z-index: 9999; z-index: 2;
} }

View File

@ -1,7 +1,7 @@
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { HashRouter as Router, Route, Link } from "react-router-dom"; import { HashRouter as Router, Route, Link } from "react-router-dom";
import { Button ,Card,Icon ,Notify,Radio,RadioGroup,smoothScroll,Sweetalert} from 'zent'; import { Button ,Card,Icon ,Notify,Radio,RadioGroup,smoothScroll,Sweetalert,Input} from 'zent';
import "./add.less" import "./add.less"
import Step1 from "./step1.js" import Step1 from "./step1.js"
import Step2 from "./step2.js" import Step2 from "./step2.js"
@ -25,8 +25,10 @@ export default class add extends React.Component{
], ],
phone_list:[], phone_list:[],
email_list:[], email_list:[],
phone:0, phone:"",
email:0, email:"",
email_radio:null,
phone_radio:null,
audit_visible:false, audit_visible:false,
card_visible:false card_visible:false
} }
@ -166,10 +168,10 @@ export default class add extends React.Component{
} }
onPhoneChange(e){ onPhoneChange(e){
this.setState({phone:e.target.value}) this.setState({phone_radio:e.target.value})
} }
onEmailChange(e){ onEmailChange(e){
this.setState({email:e.target.value}) this.setState({email_radio:e.target.value})
} }
cancel(e){ cancel(e){
this.setState({audit_visible:false}) this.setState({audit_visible:false})
@ -192,8 +194,8 @@ export default class add extends React.Component{
{ {
let plan_id = sessionStorage.getItem("plan_id") let plan_id = sessionStorage.getItem("plan_id")
let data ={ let data ={
email: this.state.email_list[this.state.email] , phone: this.state.phone_radio ? this.state.phone_list[this.state.phone_radio] : this.state.phone ,
phone:this.state.phone_list[this.state.phone] , email: this.state.email_radio ? this.state.email_list[this.state.email_radio] : this.state.email
} }
@ -209,6 +211,18 @@ export default class add extends React.Component{
} }
phoneChange=(e)=>
{
this.setState({"phone":e.target.value})
}
emailChange=(e)=>
{
this.setState({"email":e.target.value})
}
render(){ render(){
return( return(
@ -319,7 +333,7 @@ export default class add extends React.Component{
</div> </div>
<div className="phone-list"> <div className="phone-list">
<RadioGroup <RadioGroup
value={this.state.phone} value={this.state.phone_radio}
isValueEqual={this.isValueEqual} isValueEqual={this.isValueEqual}
onChange={(e)=>{this.onPhoneChange(e)}} onChange={(e)=>{this.onPhoneChange(e)}}
> >
@ -341,7 +355,7 @@ export default class add extends React.Component{
</div> </div>
<div className="email-list"> <div className="email-list">
<RadioGroup <RadioGroup
value={this.state.email} value={this.state.email_radio}
isValueEqual={this.isValueEqual} isValueEqual={this.isValueEqual}
onChange={ (e)=>{this.onEmailChange(e)} } onChange={ (e)=>{this.onEmailChange(e)} }
> >
@ -355,6 +369,12 @@ export default class add extends React.Component{
</RadioGroup> </RadioGroup>
</div> </div>
</div> </div>
<div className="input-group">
<Input placeholder="请输入接收手机号" onChange={this.phoneChange} disabled={this.state.phone_radio} ></Input>
</div>
<div className="input-group">
<Input placeholder="请输入接收邮箱" onChange={this.emailChange} disabled={this.state.email_radio} ></Input>
</div>
<div className="audit-btn-group"> <div className="audit-btn-group">
<Button onClick={(e)=>{this.onReturn(e)}}>取消</Button> <Button onClick={(e)=>{this.onReturn(e)}}>取消</Button>
<Button type="primary" onClick={(e)=>{this.send(e)}} >发送</Button> <Button type="primary" onClick={(e)=>{this.send(e)}} >发送</Button>

View File

@ -162,7 +162,7 @@
left: 50%; left: 50%;
margin-left: -200px; margin-left: -200px;
top: 30%; top: 30%;
z-index: 9999; z-index: 5;
.audit-close{ .audit-close{
font-size: 20px; font-size: 20px;
position: absolute; position: absolute;

View File

@ -54,7 +54,7 @@ export default class acclist extends React.Component{
rankoptions:[], rankoptions:[],
tempdata:[], tempdata:[],
distdata:[], distdata:[],
pagetitle:"新建key", pagetitle:"编辑key",
isEdit:false, isEdit:false,
begintime:"", begintime:"",
endtime:"", endtime:"",
@ -143,6 +143,8 @@ export default class acclist extends React.Component{
valide = true; valide = true;
return return
},(err)=>{ },(err)=>{
Notify.error(err)
}) })
}) })