diff --git a/html/contrastDetails.html b/html/contrastDetails.html
index 87508c1..524753e 100644
--- a/html/contrastDetails.html
+++ b/html/contrastDetails.html
@@ -53,7 +53,7 @@
-
{{ it.semester.text }}
+
{{ it?.semester?.text }}
{{ it.rank || '-' }}
@@ -206,7 +206,9 @@
let ids = []
onMounted(() => {
ids = "484,41".split(",") || []
- initData()
+ getBaseData().then(data => {
+ initData()
+ })
})
const initData = () => {
@@ -226,6 +228,7 @@
const obj = disciplineObj
Promise.allSettled(allArr).then(res => {
+ console.log("res", res)
let targetList = []
res.forEach(element => targetList.push(element.status === "fulfilled" ? element.value : {}))
targetList.forEach(element => {
diff --git a/js/common.js b/js/common.js
index e4ef547..6fd434b 100644
--- a/js/common.js
+++ b/js/common.js
@@ -81,9 +81,11 @@ function objectToQueryString(obj = {}) {
return queryString ? "?" + queryString : ""
}
-function decodeKey(encrypted, key) {
+function decodeKey(encrypted) {
return new Promise((resolve, reject) => {
try {
+ const storedData = localStorage.getItem("basicData")
+ const key = storedData.encodekey
const encryptedData = CryptoJS.enc.Base64.parse(encrypted)
const decrypted = CryptoJS.AES.decrypt(