n20-common-lib 2.13.1 → 2.13.3

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.13.1",
3
+ "version": "2.13.3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -13,11 +13,19 @@ export default {
13
13
  path: './sign.js',
14
14
  needAvailable: true
15
15
  },
16
+ // 信安3.0sdk
17
+ signV3: {
18
+ name: '信安CA',
19
+ type: 'inetSign',
20
+ supplier: 'inetSign',
21
+ path: './signV3/sign.js',
22
+ needAvailable: true
23
+ },
16
24
  bjcaSign: {
17
25
  name: '北京CA',
18
26
  type: 'bjcaSign',
19
27
  supplier: 'bjca',
20
- path: './bjca/index.js',
28
+ path: './bjca/index.js'
21
29
  },
22
30
  ItrusSign: {
23
31
  name: '天威CA',
@@ -77,8 +77,11 @@ export async function getSign(p1, p2, p3) {
77
77
  if (!signType || !CaMap[signType]) {
78
78
  throw new Error('请设置签名服务公司sessionStorage.signType')
79
79
  }
80
-
81
- return await disposeSign(CaMap[signType], p1, p2, p3)
80
+ if (window.NetSignVersion === 'signV3') {
81
+ return await disposeSign(CaMap['signV3'], p1, p2, p3)
82
+ } else {
83
+ return await disposeSign(CaMap[signType], p1, p2, p3)
84
+ }
82
85
  }
83
86
 
84
87
  /**
@@ -92,7 +95,7 @@ export function getCert(dn) {
92
95
  return new Promise((resolve, reject) => {
93
96
  if (signType === 'inetSign' /* 信安CA */) {
94
97
  // 是否使用3.0版本sdk (默认使用2.0版本)
95
- if (window.NetSignName === 'signV3') {
98
+ if (window.NetSignVersion === 'signV3') {
96
99
  importG('inetSign', () => import(/*webpackChunkName: "inetSign"*/ './signV3/sign.js')).then(
97
100
  ({ getCertInfo }) => {
98
101
  getCertInfo(dn).then((res) => {