zhaoke 1 жил өмнө
parent
commit
44c4245d0f

+ 5 - 3
src/components/publicPageForm/index.vue

@@ -319,9 +319,11 @@ export default {
         const pubKeyStr = sessionStorage.getItem('pubKeyStr')
         if (!pubKeyStr) return
         ndata.map(({ pagecode }) => {
-          const jse = new JSEncrypt()
-          jse.setPublicKey(pubKeyStr)
-          this.tableForm[pagecode] = jse.encrypt(this.tableForm[pagecode].replace(/\s+/g, ""))
+          if (this.tableForm[pagecode]) {
+            const jse = new JSEncrypt()
+            jse.setPublicKey(pubKeyStr)
+            this.tableForm[pagecode] = jse.encrypt(this.tableForm[pagecode].replace(/\s+/g, ""))
+          }
         })
       }
     },