From 7d7e9ee5dec5e9032d064729375c99507bf35ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Tue, 30 Nov 2021 00:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 2 +- src/pages/plan/add/add.js | 38 ++++++++++++++++++++++++++++--------- src/pages/plan/add/add.less | 2 +- src/pages/plan/key/edit.js | 4 +++- 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/App.css b/src/App.css index dddcfcb3..2cd7d051 100644 --- a/src/App.css +++ b/src/App.css @@ -188,6 +188,6 @@ resize: none; left: 0; top: 0; background-color: rgba(0,0,0,0.5); - z-index: 9999; + z-index: 2; } \ No newline at end of file diff --git a/src/pages/plan/add/add.js b/src/pages/plan/add/add.js index 75229b05..762e440e 100644 --- a/src/pages/plan/add/add.js +++ b/src/pages/plan/add/add.js @@ -1,7 +1,7 @@ import ReactDOM from 'react-dom'; import React, { Component } from 'react'; 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 Step1 from "./step1.js" import Step2 from "./step2.js" @@ -25,8 +25,10 @@ export default class add extends React.Component{ ], phone_list:[], email_list:[], - phone:0, - email:0, + phone:"", + email:"", + email_radio:null, + phone_radio:null, audit_visible:false, card_visible:false } @@ -166,10 +168,10 @@ export default class add extends React.Component{ } onPhoneChange(e){ - this.setState({phone:e.target.value}) + this.setState({phone_radio:e.target.value}) } onEmailChange(e){ - this.setState({email:e.target.value}) + this.setState({email_radio:e.target.value}) } cancel(e){ this.setState({audit_visible:false}) @@ -192,8 +194,8 @@ export default class add extends React.Component{ { let plan_id = sessionStorage.getItem("plan_id") let data ={ - email: this.state.email_list[this.state.email] , - phone:this.state.phone_list[this.state.phone] , + phone: this.state.phone_radio ? this.state.phone_list[this.state.phone_radio] : 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(){ return( @@ -319,7 +333,7 @@ export default class add extends React.Component{