n20-common-lib 2.8.28 → 2.8.29

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.8.28",
3
+ "version": "2.8.29",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -55,6 +55,7 @@ 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'
58
59
 
59
60
  export default {
60
61
  name: 'Layout',
@@ -205,6 +206,7 @@ export default {
205
206
  const cert = await getCert()
206
207
  if (cert === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(cert)) {
207
208
  this.$message.error($lc(`证书验证失败,请重新登录`))
209
+ auth.removeToken()
208
210
  }
209
211
  },
210
212
  setMainTab(ev) {
@@ -2501,17 +2501,20 @@ const config = {
2501
2501
  disableExeUrl: true
2502
2502
  }
2503
2503
 
2504
- try {
2505
- TCA.config(config)
2506
- } catch (error) {
2507
- Notification({
2508
- title: '提示',
2509
- dangerouslyUseHTMLString: true,
2510
- message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="/portal/天诚安信数字证书助手-3.7.7.0.exe" download>下载安装</a>天诚安信数字证书助手</div>`,
2511
- duration: 5000
2512
- })
2504
+ function init() {
2505
+ try {
2506
+ TCA.config(config)
2507
+ } catch (error) {
2508
+ Notification({
2509
+ title: '提示',
2510
+ dangerouslyUseHTMLString: true,
2511
+ message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="/portal/天诚安信数字证书助手-3.7.7.0.exe" download>下载安装</a>天诚安信数字证书助手</div>`,
2512
+ duration: 5000
2513
+ })
2514
+ }
2515
+
2516
+ initCertList()
2513
2517
  }
2514
- initCertList()
2515
2518
 
2516
2519
  function getDN() {
2517
2520
  let dn
@@ -2523,6 +2526,7 @@ function getDN() {
2523
2526
  }
2524
2527
 
2525
2528
  export function getCert(dn) {
2529
+ init()
2526
2530
  if (dn === undefined) {
2527
2531
  dn = getDN()
2528
2532
  }
@@ -2557,6 +2561,7 @@ export function getCert(dn) {
2557
2561
 
2558
2562
  // 签名方法
2559
2563
  export function getSign(plain, dn) {
2564
+ init()
2560
2565
  try {
2561
2566
  if (dn === undefined) {
2562
2567
  dn = getDN()