成为{user && user.username}的赞助者吧
-
+
+
+
+ {
+ user && user.gender===1?
+
+ :
+
+ }
+
+
+ {/*
- {user && user.user_identity && (
-
- {user && user.user_identity}
-
- )}
+ /> */}
{content}
@@ -341,10 +348,13 @@ class Sponsor extends Component {
}
+// export default withRouter(
+// ImageLayerOfCommentHOC({
+// // imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
+// // parentSelector: ".newMain",
+// })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Sponsor))))
+// );
export default withRouter(
- ImageLayerOfCommentHOC({
- imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
- parentSelector: ".newMain",
- })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Sponsor))))
- );
+ (CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Sponsor))))
+);
\ No newline at end of file
diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js
index 8dc05405..4c716981 100644
--- a/src/modules/user/LoginRegisterComponent.js
+++ b/src/modules/user/LoginRegisterComponent.js
@@ -273,7 +273,8 @@ class LoginRegisterComponent extends Component {
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
- if (!regph.test(this.state.logins)) {
+ // if (!regph.test(this.state.logins)) {
+ if (true) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotcos: undefined,
@@ -292,12 +293,14 @@ class LoginRegisterComponent extends Component {
}
if (!regemail.test(this.state.logins)) {
- if ((this.state.logins.indexOf("@") != -1) === true) {
- stringdata = "邮箱格式不正确";
- } else {
- stringdata = "手机号格式不正确";
+ // if ((this.state.logins.indexOf("@") != -1) === true) {
+ // stringdata = "邮箱格式不正确";
+ // } else {
+ // stringdata = "手机号格式不正确";
- }
+ // }
+
+ stringdata = "邮箱格式不正确";
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: true,
@@ -501,6 +504,17 @@ class LoginRegisterComponent extends Component {
return;
}
+ /*
+ 校验
+ */
+ var loginReg = /[a-zA-Z]+[\w]*/;
+ if (!loginReg.test(this.state.codes)){
+ this.setState({
+ Phonenumberisnotcosyzm: "必须是字母开头的字母数字组合",
+ })
+ return ;
+ }
+
let url;
if(this.props.weixinlogin){
url= '/weapps/register.json';
@@ -769,7 +783,8 @@ class LoginRegisterComponent extends Component {
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
- if (!regph.test(e.target.value)) {
+ // if (!regph.test(e.target.value)) {
+ if(true){
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotcos: stringdata,
@@ -787,12 +802,13 @@ class LoginRegisterComponent extends Component {
}
if (!regemail.test(e.target.value)) {
- if ((e.target.value.indexOf("@") != -1) === true) {
- stringdata = "邮箱格式不正确";
- } else {
- stringdata = "手机号格式不正确";
+ // if ((e.target.value.indexOf("@") != -1) === true) {
+ // stringdata = "邮箱格式不正确";
+ // } else {
+ // stringdata = "手机号格式不正确";
- }
+ // }
+ stringdata = "邮箱格式不正确";
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: true,
@@ -1119,7 +1135,7 @@ class LoginRegisterComponent extends Component {
{
weixinlogin===false&&parseInt(tab[0])==1 &&
-