n20-common-lib 2.9.1 → 2.9.2
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
|
@@ -48,14 +48,13 @@ const routerBaseRe = new RegExp('^' + routerBase)
|
|
|
48
48
|
|
|
49
49
|
import { addListener, removeListener } from 'resize-detector'
|
|
50
50
|
|
|
51
|
-
import
|
|
51
|
+
import auth from '../../utils/auth'
|
|
52
52
|
import forEachs from '../../utils/forEachs'
|
|
53
53
|
import { setRela } from '../../utils/relaNo'
|
|
54
54
|
import asideNav from './AsideNav/index.vue'
|
|
55
55
|
import headerWrap from './HeaderWrap/indexN.vue'
|
|
56
56
|
import menuDrawer from './HeaderWrap/menuDrawer.vue'
|
|
57
57
|
import tabsNav from './TabsNav/index.vue'
|
|
58
|
-
import auth from '../../utils/auth'
|
|
59
58
|
|
|
60
59
|
export default {
|
|
61
60
|
name: 'Layout',
|
|
@@ -203,6 +202,7 @@ export default {
|
|
|
203
202
|
},
|
|
204
203
|
methods: {
|
|
205
204
|
async getCertify() {
|
|
205
|
+
let { getCert } = await import('../../plugins/Sign')
|
|
206
206
|
const cert = await getCert()
|
|
207
207
|
if (cert === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(cert)) {
|
|
208
208
|
this.$message.error($lc(`证书验证失败,请重新登录`))
|
|
@@ -2501,23 +2501,21 @@ const config = {
|
|
|
2501
2501
|
disableExeUrl: true
|
|
2502
2502
|
}
|
|
2503
2503
|
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
})
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
initCertList()
|
|
2504
|
+
let url = window.NetSignName || `/portal/天诚安信数字证书助手-3.7.7.0.exe`
|
|
2505
|
+
let name = window.NetSignDownloadName || '天诚安信数字证书助手'
|
|
2506
|
+
try {
|
|
2507
|
+
TCA.config(config)
|
|
2508
|
+
} catch (error) {
|
|
2509
|
+
Notification({
|
|
2510
|
+
title: '提示',
|
|
2511
|
+
dangerouslyUseHTMLString: true,
|
|
2512
|
+
message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
|
|
2513
|
+
duration: 5000
|
|
2514
|
+
})
|
|
2519
2515
|
}
|
|
2520
2516
|
|
|
2517
|
+
initCertList()
|
|
2518
|
+
|
|
2521
2519
|
function getDN() {
|
|
2522
2520
|
let dn
|
|
2523
2521
|
let userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
@@ -2528,7 +2526,6 @@ function getDN() {
|
|
|
2528
2526
|
}
|
|
2529
2527
|
|
|
2530
2528
|
export function getCert(dn) {
|
|
2531
|
-
init()
|
|
2532
2529
|
if (dn === undefined) {
|
|
2533
2530
|
dn = getDN()
|
|
2534
2531
|
}
|
|
@@ -2563,7 +2560,7 @@ export function getCert(dn) {
|
|
|
2563
2560
|
|
|
2564
2561
|
// 签名方法
|
|
2565
2562
|
export function getSign(plain, dn) {
|
|
2566
|
-
|
|
2563
|
+
let plainText = undefined
|
|
2567
2564
|
if (typeof plain === 'object') {
|
|
2568
2565
|
plainText = JSON.stringify(plain)
|
|
2569
2566
|
} else {
|
|
@@ -2599,7 +2596,7 @@ export function getSign(plain, dn) {
|
|
|
2599
2596
|
sginCert.clearPinCache()
|
|
2600
2597
|
}
|
|
2601
2598
|
return sginCert.signMessage(
|
|
2602
|
-
|
|
2599
|
+
plainText,
|
|
2603
2600
|
process.env.VUE_APP_NetSign_ARG_PLAIN ?? window.VUE_APP_NetSign_ARG_PLAIN ?? false
|
|
2604
2601
|
)
|
|
2605
2602
|
} else {
|