@gingkoo/base-server 0.4.16 → 0.4.18

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.
@@ -354,11 +354,24 @@ class BaseXML {
354
354
  // 表格列信息
355
355
  let columns = (Array.isArray(TableBody?.column?.array) ? TableBody.column.array : []).map(
356
356
  (item) => {
357
- let { id, label, components, width, toggled, fixed, sortable, filterable, showValue } =
358
- item.attributes();
357
+ let {
358
+ id,
359
+ label,
360
+ components,
361
+ width,
362
+ toggled,
363
+ fixed,
364
+ sortable,
365
+ filterable,
366
+ showValue,
367
+ icon,
368
+ } = item.attributes();
359
369
  let column = {
360
370
  name: id,
361
371
  };
372
+ if (icon) {
373
+ column.icon = icon;
374
+ }
362
375
  if (label) {
363
376
  column.label = label;
364
377
  }
@@ -2,7 +2,7 @@
2
2
  var express = require('express');
3
3
  const nodemailer = require('nodemailer');
4
4
  const bcrypt = require('bcryptjs');
5
- const { request } = require('@gingkoo/node-tools');
5
+ const { request, RequestError } = require('@gingkoo/node-tools');
6
6
  const config = require('../config');
7
7
  const { userlog } = require('../../backend/common/logger');
8
8
  const jwt = require('../utils/jwt');
@@ -57,11 +57,11 @@ router.post('/login', async (req, res) => {
57
57
  Authorization: `Bearer ${config.oauth.account_token}`,
58
58
  },
59
59
  });
60
- } catch (err) {}
61
-
62
- if (resp.isError) {
63
- userlog.error(`用户:${userId} lapd 登录失败`);
64
- return res.sendErr('账号或密码错误');
60
+ } catch (err) {
61
+ if (err instanceof RequestError && err.status == '401') {
62
+ return res.sendErr('账号或密码错误');
63
+ }
64
+ return res.sendErr(err.message);
65
65
  }
66
66
 
67
67
  let { access_token, expires_in, token_type, user_id } = resp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/base-server",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  "author": "",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
- "@gingkoo/node-tools": "1.2.6",
25
+ "@gingkoo/node-tools": "1.2.7-alpha.4",
26
26
  "axios": "1.9.0",
27
27
  "bcryptjs": "^2.4.3",
28
28
  "chalk": "^4.1.2",