educoreapp2 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tools.js +1 -1
- package/dist/spxbasecode/cmps/BaseForm.js +16 -0
- package/package.json +1 -1
package/dist/Tools.js
CHANGED
@@ -62,6 +62,21 @@ class BaseForm extends _react.Component {
|
|
62
62
|
}
|
63
63
|
return res;
|
64
64
|
}
|
65
|
+
async setErrorBadLoginOrPasswd() {
|
66
|
+
for (let k in this.objs) {
|
67
|
+
let el = this.objs[k];
|
68
|
+
el.setError('BAD_LOGIN_OR_PASSWORD');
|
69
|
+
}
|
70
|
+
}
|
71
|
+
async setError(ee) {
|
72
|
+
if (ee.code != 500) {
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
if (ee.error.type == 'BAD_LOGIN_OR_PASSWORD') {
|
76
|
+
await this.setErrorBadLoginOrPasswd();
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
}
|
65
80
|
async handle2() {
|
66
81
|
let x = await this.valid();
|
67
82
|
if (!x) {
|
@@ -75,6 +90,7 @@ class BaseForm extends _react.Component {
|
|
75
90
|
this2.props.onSucc(ss.data);
|
76
91
|
}, ee => {
|
77
92
|
//if ()
|
93
|
+
this2.setError(ee);
|
78
94
|
console.log("XxxiiiixXX3eeee", ee);
|
79
95
|
});
|
80
96
|
}
|