diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index e441901ba..a7811c3a1 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -16,7 +16,7 @@ const TerserWebpackPlugin = require('terser-webpack-plugin'); const paths = require("./paths"); const getClientEnvironment = require("./env"); -let publicPath = "/react/build/"; +let publicPath = "/build/"; const publicUrl = publicPath.slice(0, -1); // const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false"; const shouldUseSourceMap = process.env.NODE_ENV !== "production"; diff --git a/package-lock.json b/package-lock.json index be7f27fb4..53001c72b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11029,6 +11029,11 @@ "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz", "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==" }, + "keypress": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/keypress/-/keypress-0.1.0.tgz", + "integrity": "sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==" + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -12777,6 +12782,24 @@ "pinkie": "^2.0.0" } }, + "pinyin": { + "version": "4.0.0-alpha.0", + "resolved": "https://registry.npmmirror.com/pinyin/-/pinyin-4.0.0-alpha.0.tgz", + "integrity": "sha512-hdxO/2RuLWarhLaIcGKdXjkFZ0hFr3W/Yrvrd0YPxuIafixMZSAa4jvxskYLgYHE8OkOXkGsxMsEScwGzqKe3g==", + "requires": { + "commander": "~1.1.1" + }, + "dependencies": { + "commander": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/commander/-/commander-1.1.1.tgz", + "integrity": "sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==", + "requires": { + "keypress": "0.1.x" + } + } + } + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", diff --git a/package.json b/package.json index 420fac00d..f4507d918 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "nvm": "0.0.4", "object-assign": "4.1.1", "papaparse": "^5.3.2", + "pinyin": "^4.0.0-alpha.0", "postcss-flexbugs-fixes": "3.2.0", "promise": "8.0.1", "prop-types": "^15.6.1", diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx index 5f020e6eb..6d2480e35 100644 --- a/src/forge/Information/Pages/apply.jsx +++ b/src/forge/Information/Pages/apply.jsx @@ -3,6 +3,7 @@ import { Form , Input , Row , Col, Button } from 'antd'; import '../index.scss'; import { postCreateZone } from '../api'; import axios from 'axios'; + const { TextArea } = Input; const phonereg = /^([1][3456789])\d{9}$/ @@ -25,14 +26,15 @@ function Apply(props){ const zoneApplication = {...values}; postCreateZone(zoneApplication).then(response=>{ if(response && response.data && response.data.code===200){ - props.showNotification("提交成功!"); + props.showNotification("您的专区申请已提交,请耐心等待管理员与您联系!"); setTimeout(() => { window.location.href="/"; - }, 70); + }, 1000); } }).catch(error=>{}) } }) + } function checkPhone(rule, value, callback){ @@ -55,6 +57,7 @@ function Apply(props){ callback(); }):callback(); } + return( @@ -99,18 +102,18 @@ function Apply(props){ {getFieldDecorator("key",{ rules:[ - { required: true,message:"请输入专区域名标识" }, + // { required: true,message:"请输入专区域名英文标识" }, { pattern: /^[a-zA-Z][a-zA-Z0-9_-]{0,18}[a-zA-Z]$/, message: "长度2-20,只能包含数字、字母、下划线、中划线,必须以字母开头结尾"}, { validator:checkId } ], validateTrigger:"onBlur", validateFirst: true, })( - + )}