ps-toolkit-ui 0.0.164 → 0.0.165

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.
@@ -1205,19 +1205,19 @@
1205
1205
  else {
1206
1206
  var m = '';
1207
1207
  if (res.status === exports.ResultStatusEnum.Unauthorized) {
1208
- m = 'FormBaseErrorExpired';
1208
+ m = form.l('FormBaseErrorExpired');
1209
1209
  }
1210
1210
  else if (res.status === exports.ResultStatusEnum.NotAccess) {
1211
- m = 'FormBaseErrorPermission';
1211
+ m = form.l('FormBaseErrorPermission');
1212
1212
  }
1213
1213
  else {
1214
1214
  if (typeof res.message === 'string') {
1215
- m = res.message;
1215
+ var am = res.message.split(':');
1216
+ m = form.l(am[0], am.length > 1 ? am.slice(1) : null);
1216
1217
  }
1217
1218
  else {
1218
1219
  // tslint:disable-next-line:forin
1219
1220
  for (var msg in res.message) {
1220
- console.log(form.l(msg, res.message[msg]));
1221
1221
  // noinspection JSUnfilteredForInLoop
1222
1222
  m = form.l(msg, res.message[msg]);
1223
1223
  }
@@ -1243,7 +1243,7 @@
1243
1243
  }
1244
1244
  }
1245
1245
  if (m) {
1246
- HelperClass.addNotification(form.l(m));
1246
+ HelperClass.addNotification(m);
1247
1247
  }
1248
1248
  if (form.onFailed) {
1249
1249
  form.onFailed(res.message);