From e96cc8f2aae26d415f7b8a028aee8b0159e2a139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 9 Jan 2020 18:54:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/common/Component.js | 5 +++++ public/react/src/common/educoder.js | 1 + .../CompetitionContentspdfpeopledata.js | 5 +++-- .../Mailboxvalidation.js | 5 +++-- .../Phonenumberverification.js | 5 +++-- .../CompetitionContentspdfpeopledata.js | 5 +++-- .../Mailboxvalidation.js | 5 +++-- .../Phonenumberverification.js | 5 +++-- .../react/src/modules/login/Trialapplication.js | 4 +++- .../src/modules/login/Trialapplicationysl.js | 3 ++- .../PackageIndexNEIBannerConcent.js | 3 ++- .../src/modules/user/FindPasswordComponent.js | 3 ++- .../src/modules/user/LoginRegisterComponent.js | 15 +++++++-------- 13 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 public/react/src/common/Component.js diff --git a/public/react/src/common/Component.js b/public/react/src/common/Component.js new file mode 100644 index 000000000..e49d83b84 --- /dev/null +++ b/public/react/src/common/Component.js @@ -0,0 +1,5 @@ +import md5 from 'md5'; +export function setmiyah(logins){ + const opens ="79e33abd4b6588941ab7622aed1e67e8"; + return md5(opens+logins); +} diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index ca546ec56..9a19c6ee2 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -5,6 +5,7 @@ export { getImageUrl as getImageUrl, getRandomNumber as getRandomNumber,getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool'; +export {setmiyah as setmiyah} from './Component'; export { default as queryString } from './UrlTool2'; export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC'; diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index 1afbf16a7..775a3ba8e 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -178,6 +178,7 @@ class CompetitionContentspdfpeopledata extends Component { let url = `/accounts/get_verification_code.json` let login = ''; let values = this.props.form.getFieldsValue(); + let smscode=setmiyah(this.state.logins) if (index == 3) { //绑定手机号码 login = values.phone; @@ -202,7 +203,7 @@ class CompetitionContentspdfpeopledata extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js index 934369aac..143c2f74c 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -78,6 +78,7 @@ class Mailboxvalidation extends Component { let url = `/accounts/get_verification_code.json` let login = ''; let values = this.props.form.getFieldsValue(); + let smscode=setmiyah(this.state.logins) if (index == 3) { //绑定手机号码 login = values.phone; @@ -102,7 +103,7 @@ class Mailboxvalidation extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js index fa0b20b7a..7ab9f9625 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -77,6 +77,7 @@ class Phonenumberverification extends Component { let url = `/accounts/get_verification_code.json` let login = ''; let values = this.props.form.getFieldsValue(); + let smscode=setmiyah(this.state.logins) if (index == 3) { //绑定手机号码 login = values.phone; @@ -101,7 +102,7 @@ class Phonenumberverification extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index 1afbf16a7..367eefaa3 100644 --- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -176,6 +176,7 @@ class CompetitionContentspdfpeopledata extends Component { // 获取验证码 getCode = (index) => { let url = `/accounts/get_verification_code.json` + let smscode=setmiyah(this.state.logins) let login = ''; let values = this.props.form.getFieldsValue(); if (index == 3) { @@ -202,7 +203,7 @@ class CompetitionContentspdfpeopledata extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js index 934369aac..143c2f74c 100644 --- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js +++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -78,6 +78,7 @@ class Mailboxvalidation extends Component { let url = `/accounts/get_verification_code.json` let login = ''; let values = this.props.form.getFieldsValue(); + let smscode=setmiyah(this.state.logins) if (index == 3) { //绑定手机号码 login = values.phone; @@ -102,7 +103,7 @@ class Mailboxvalidation extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js index fa0b20b7a..7ab9f9625 100644 --- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js +++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Phonenumberverification.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Button, Layout, Input, Form} from 'antd'; import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import mycompetotionchild from './mycompetotionchild.css'; import {getHiddenName} from "../../../../user/account/AccountBasicEdit"; import '../../../../courses/css/Courses.css' @@ -77,6 +77,7 @@ class Phonenumberverification extends Component { let url = `/accounts/get_verification_code.json` let login = ''; let values = this.props.form.getFieldsValue(); + let smscode=setmiyah(this.state.logins) if (index == 3) { //绑定手机号码 login = values.phone; @@ -101,7 +102,7 @@ class Phonenumberverification extends Component { } axios.get((url), { params: { - login, type + login, type,smscode } }).then((result) => { if (result) { diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d7782e4cc..2dc13ed1e 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -8,7 +8,7 @@ import Dialog, { } from 'material-ui/Dialog'; import axios from 'axios'; import './LoginDialog.css' -import {broadcastChannelPostMessage} from 'educoder' +import {setmiyah} from 'educoder' import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd'; @@ -195,10 +195,12 @@ class Trialapplication extends Component { //短信验证 SMSverification = () => { var url = `/accounts/get_verification_code.json`; + axios.get((url), { params: { login: this.state.login, type: 3, + smscode:setmiyah(this.state.logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index 97064cbd4..05998511f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -8,7 +8,7 @@ import Dialog, { } from 'material-ui/Dialog'; import axios from 'axios'; -import {broadcastChannelPostMessage} from 'educoder' +import {setmiyah} from 'educoder' import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd'; @@ -215,6 +215,7 @@ class Trialapplicationysl extends Component { params: { login: this.state.login, type: 3, + smscode:setmiyah(this.state.logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index ac82e9ca0..038a19a83 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; import {Link} from "react-router-dom"; import axios from 'axios'; import { Input , Spin, Icon ,Button,Pagination,DatePicker} from 'antd'; -import { handleDateString,getUrl,bytesToSize} from 'educoder'; +import { handleDateString,getUrl,setmiyah} from 'educoder'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import MDEditors from '../MDEditors'; import PhoneModel from './PhoneModel'; @@ -194,6 +194,7 @@ class PackageIndexNEIBannerConcent extends Component { params: { login: contact_phone, type: 5, + smscode:setmiyah(this.state.logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index e95ea2b7f..54c55770e 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; -import {getImageUrl} from 'educoder'; +import {setmiyah} from 'educoder'; import CheckInputysl1 from './CheckInputysl'; import CheckInputysl2 from './CheckInputysl'; import {Tabs, Input, Checkbox, Button, notification} from 'antd'; @@ -162,6 +162,7 @@ class LoginRegisterComponent extends Component { params: { login: this.state.login, type: 2, + smscode:setmiyah(this.state.logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 6ba8023b6..8166c90fd 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1,7 +1,6 @@ import React, {Component} from 'react'; -import {getImageUrl,broadcastChannelPostMessage} from 'educoder'; +import {setmiyah,broadcastChannelPostMessage} from 'educoder'; import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd'; -import md5 from 'md5'; import passopen from '../../../src/images/login/passopen.png'; import passoff from '../../../src/images/login/passoff.png'; import axios from 'axios'; @@ -609,23 +608,23 @@ class LoginRegisterComponent extends Component { }; //短信验证 SMSverification = () => { - const opens ="79e33abd4b6588941ab7622aed1e67e8"; - let newopens=md5(opens+this.state.logins); var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { login: this.state.logins, type: 1, - smscode:newopens + smscode:setmiyah(this.state.logins) } }).then((result) => { //验证有问题{"status":1,"message":"success"} // console.log(result); - this.openNotification("验证码已发送,请注意查收!",2); - + if(result.data.status===1){ + this.openNotification("验证码已发送,请注意查收!",2); + }else{ + } }).catch((error) => { - + this.openNotification(result.data.success,2); }) }