Browse Source

fix:小孩初始化失败

bzkf3 2 years ago
parent
commit
483793fd4d
3 changed files with 35 additions and 4 deletions
  1. 1 0
      .gitignore
  2. 29 0
      src/components.d.ts
  3. 5 4
      src/pages/_user/index.vue

+ 1 - 0
.gitignore

@@ -24,3 +24,4 @@ dist-ssr
 *.sw?
 
 src/*.d.ts
+src/components.d.ts

+ 29 - 0
src/components.d.ts

@@ -11,13 +11,41 @@ declare module '@vue/runtime-core' {
     RemoteList: typeof import('./components/RemoteList/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
+    VanButton: typeof import('vant/es')['Button']
     VanCard: typeof import('vant/es')['Card']
+    VanCascader: typeof import('vant/es')['Cascader']
+    VanCellGroup: typeof import('vant/es')['CellGroup']
+    VanCheckbox: typeof import('vant/es')['Checkbox']
+    VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
+    VanCollapse: typeof import('vant/es')['Collapse']
+    VanCollapseItem: typeof import('vant/es')['CollapseItem']
     VanConfigProvider: typeof import('vant/es')['ConfigProvider']
+    VanCountDown: typeof import('vant/es')['CountDown']
+    VanDialog: typeof import('vant/es')['Dialog']
+    VanDivider: typeof import('vant/es')['Divider']
+    VanDropdownItem: typeof import('vant/es')['DropdownItem']
+    VanDropdownMenu: typeof import('vant/es')['DropdownMenu']
+    VanField: typeof import('vant/es')['Field']
+    VanForm: typeof import('vant/es')['Form']
     VanGrid: typeof import('vant/es')['Grid']
     VanGridItem: typeof import('vant/es')['GridItem']
     VanIcon: typeof import('vant/es')['Icon']
+    VanImage: typeof import('vant/es')['Image']
     VanList: typeof import('vant/es')['List']
+    VanLoading: typeof import('vant/es')['Loading']
+    VanNavBar: typeof import('vant/es')['NavBar']
+    VanOverlay: typeof import('vant/es')['Overlay']
+    VanPicker: typeof import('vant/es')['Picker']
+    VanPopup: typeof import('vant/es')['Popup']
     VanPullRefresh: typeof import('vant/es')['PullRefresh']
+    VanRadio: typeof import('vant/es')['Radio']
+    VanRadioGroup: typeof import('vant/es')['RadioGroup']
+    VanRate: typeof import('vant/es')['Rate']
+    VanSkeleton: typeof import('vant/es')['Skeleton']
+    VanStep: typeof import('vant/es')['Step']
+    VanSteps: typeof import('vant/es')['Steps']
+    VanSticky: typeof import('vant/es')['Sticky']
+    VanSubmitBar: typeof import('vant/es')['SubmitBar']
     VanSwipe: typeof import('vant/es')['Swipe']
     VanSwipeItem: typeof import('vant/es')['SwipeItem']
     VanTab: typeof import('vant/es')['Tab']
@@ -25,5 +53,6 @@ declare module '@vue/runtime-core' {
     VanTabbarItem: typeof import('vant/es')['TabbarItem']
     VanTabs: typeof import('vant/es')['Tabs']
     VanTag: typeof import('vant/es')['Tag']
+    VanUploader: typeof import('vant/es')['Uploader']
   }
 }

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

@@ -270,14 +270,15 @@ export default {
               this.childName = userXx.user_realname;
             } 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])
+              // );
               this.activeChild = userXx.user_id;
               this.childId = userXx.user_role_id;
               this.childName = userXx.user_realname;
               //  console.log(this.childData[0].user_id, 2222);
+              setChild(this.childData[0])
             }
           }
         }