dedsudiyu 1 일 전
부모
커밋
8d412d4c65
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      pages/views/teacherPage/teacherHome.vue

+ 13 - 0
pages/views/teacherPage/teacherHome.vue

@@ -119,6 +119,7 @@
 	import {
 		chemicalAppletSelectStockInfo,
 		laboratorySubPassOutIsotopeSubSign,
+		systemUserProfile,
 	} from '@/pages/api/index.js'
 	import {
 		tabBar
@@ -161,8 +162,20 @@
 			}
 		},
 		mounted() {
+			this.systemUserProfile();
 		},
 		methods: {
+			//获取个人信息
+			async systemUserProfile() {
+				const {
+					data
+				} = await systemUserProfile();
+				if (data.code == 200) {
+					this.$set(this, 'userData', data.data)
+					uni.setStorageSync('userDeptId', data.data.deptId);
+					uni.setStorageSync('userDeptName', data.data.deptName);
+				}
+			},
 			goHome() {
 				this.pageType = 2;
 			},