n20-common-lib 2.16.8 → 2.16.9
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
|
@@ -171,7 +171,7 @@ function getUserCert(uno) {
|
|
|
171
171
|
* @param {*} cspName
|
|
172
172
|
* @returns
|
|
173
173
|
*/
|
|
174
|
-
export function updateCert(cspName) {
|
|
174
|
+
export function updateCert(cspName, onSuccess) {
|
|
175
175
|
let oldContainer = ''
|
|
176
176
|
// 设置提供者 'ArgusKey CSP For BEHFC v1.0'
|
|
177
177
|
IWSA_rsa_csp_setProvider(cspName)
|
|
@@ -214,6 +214,9 @@ export function updateCert(cspName) {
|
|
|
214
214
|
IWSA_rsa_csp_deleteContainer(oldContainer)
|
|
215
215
|
}
|
|
216
216
|
Message.success('证书导入成功')
|
|
217
|
+
if (typeof onSuccess === 'function') {
|
|
218
|
+
onSuccess()
|
|
219
|
+
}
|
|
217
220
|
} else {
|
|
218
221
|
IWSA_rsa_csp_deleteContainer(res[1])
|
|
219
222
|
Message.error('证书导入失败,请联系管理员,错误码为' + code)
|
package/src/plugins/Sign/sign.js
CHANGED
|
@@ -177,5 +177,16 @@ function verifyDn(dnList, dn) {
|
|
|
177
177
|
Message.error(`证书Dn不匹配:${dnList}里面无法匹配===>${dn}`)
|
|
178
178
|
return index
|
|
179
179
|
}
|
|
180
|
+
if (index !== -1) {
|
|
181
|
+
// GMT时间字符串
|
|
182
|
+
const gmtTimeString = dnList[index].validEnd?.replace(/GMT$/, ' GMT')
|
|
183
|
+
// 创建Date对象
|
|
184
|
+
if (gmtTimeString) {
|
|
185
|
+
const gmtTime = new Date(gmtTimeString)
|
|
186
|
+
// 转换为CST(中国标准时间)
|
|
187
|
+
const cstTime = gmtTime.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })
|
|
188
|
+
sessionStorage.setItem('certValidEnd', cstTime)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
180
191
|
return index
|
|
181
192
|
}
|