n20-common-lib 2.9.85 → 2.9.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.9.85",
3
+ "version": "2.9.86",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -29,7 +29,7 @@ function getDN() {
29
29
 
30
30
  /* 检测本地签名端口是否可用 */
31
31
  export function availableSign(fn, url) {
32
- available = IWSAGetAvailable()
32
+ let available = IWSAGetAvailable()
33
33
  if (available) {
34
34
  fn && fn(available)
35
35
  } else {
@@ -41,7 +41,7 @@ export function availableSign(fn, url) {
41
41
  }
42
42
 
43
43
  function checkAvailable(fn, url, count) {
44
- available = IWSAGetAvailable()
44
+ let available = IWSAGetAvailable()
45
45
  let name = window.NetSignDownloadName || 'NetSignCNG签名助手'
46
46
  if (available) {
47
47
  fn && fn(available)
@@ -101,7 +101,10 @@ export async function getSign(plain, dn) {
101
101
  }
102
102
  const checkRes = await getCertInfo(dn)
103
103
 
104
- if (checkRes === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(checkRes)) {
104
+ if (
105
+ checkRes === -1 ||
106
+ ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(checkRes)
107
+ ) {
105
108
  switch (checkRes) {
106
109
  case 'dnListEmpty':
107
110
  Message.warning('没有匹配到证书!')
@@ -142,7 +145,9 @@ export async function getCertInfo(dn) {
142
145
  return new Promise((resolve, reject) => {
143
146
  // 获取证书列表
144
147
  IWSASkfGetCertList(
145
- process.env.VUE_APP_NetSign_ARG || window.VUE_APP_NetSign_ARG || 'WTSKFInterface.dll',
148
+ process.env.VUE_APP_NetSign_ARG ||
149
+ window.VUE_APP_NetSign_ARG ||
150
+ 'WTSKFInterface.dll',
146
151
  (CertListData, errorCode) => {
147
152
  if (errorCode) {
148
153
  Message.error(codeDate[errorCode])