Compare commits

...

1 Commits

Author SHA1 Message Date
CaiHQ
222b254f07 fix duplicate import pubkey 2022-12-13 10:38:24 +08:00

View File

@ -49,9 +49,15 @@ var initVue = function () {
newKey.id = this.sm2KeyList.length;
newKey.title = headerVue.shortName;
newKey.sm2Key = this.sm2KeyStr;
this.sm2KeyList.push(newKey);
var exist = false;
for (var i=0;i<this.sm2KeyList.length;i++){
var iterKey = this.sm2KeyList[i];
if (iterKey.sm2Key==newKey.sm2Key)
exist = true;
}
if (!exist)
this.sm2KeyList.push(newKey);
localStorage.setItem("PrivKeyList", JSON.stringify(this.sm2KeyList));
getSession();
listProjects("priv");
}