bzkf3 2 yıl önce
ebeveyn
işleme
e86a1333fe
1 değiştirilmiş dosya ile 6 ekleme ve 5 silme
  1. 6 5
      src/pages/_user/index.vue

+ 6 - 5
src/pages/_user/index.vue

@@ -265,12 +265,13 @@ export default {
             this.activeChild = userXx.user_id;
             this.childId = userXx.user_role_id;
             this.childName = userXx.user_realname;
-          } else if (this.childData[0].user_id) {
+          } else if (this.childData?.[0]?.user_id) {
             let userXx = this.childData[0];
-            localStorage.setItem(
-              "childInfo_" + this.userInfo.user_id,
-              JSON.stringify(this.childData[0])
-            );
+            // localStorage.setItem(
+            //   "childInfo_" + this.userInfo.user_id,
+            //   JSON.stringify(this.childData[0])
+            // );
+            setChild(item);
 
             this.activeChild = userXx.user_id;
             this.childId = userXx.user_role_id;