Browse Source

Merge branch 'master' of http://81.70.224.233:10080/yichael/ZhongChuang_front_2

yu 4 years ago
parent
commit
c9dca0b1f0

+ 14 - 4
components/home/teacherCreation.vue

@@ -3,9 +3,13 @@
 		<view class="m_left">
 			<view class="m_hander">
 				<view class="m_teacher">
-					<image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image>
-					<view class="m_teacher_name" v-text="name"></view>
-					<view class="m_teacher_position" v-text="position"></view>
+
+					<view class="user-left-avatar df">
+						<img :src="userInfo.avatarSrc"></img>
+					</view>
+					<!-- <image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image> -->
+					<view class="m_teacher_name" v-text="userInfo.Name+userInfo.role"></view>
+					<view class="m_teacher_position" v-text="userInfo.Position"></view>
 				</view>
 			</view>
 			<view class="m_menu">
@@ -77,6 +81,7 @@
 				}],
 				scrollTop: 0,
 				oldScrollTop: 0,
+				userInfo: mydata_userInfo,
 
 			}
 		},
@@ -128,7 +133,7 @@
 			viewProject(obj, index) {
 				console.log("查看项目", obj, index);
 				this.menu[1].list[0].title = '项目' + (index + 1);
-				this.checkMenu(this.menu[1].list[0],1);
+				this.checkMenu(this.menu[1].list[0], 1);
 				this.$refs.project.viewProject(obj);
 			},
 			onBackCreateInfo(){
@@ -396,4 +401,9 @@
 	.m_menu-item-checked .cact {
 		color: #EA252C;
 	}
+
+	.user-left-avatar img {
+		width: px2vw(120);
+		margin-top: px2vw(74);
+	}
 </style>

+ 1 - 0
components/login/loginByPWD.vue

@@ -97,6 +97,7 @@
 							}
 							mydata_userInfo.Name = data.Name;
 							mydata_userInfo.UserID = data.UserID;
+							mydata_userInfo.Position = data.Position;
 							// console.log("登陆成功,个人信息", mydata_userInfo);
 							if (mydata_userInfo.role == '老师') {
 								userController.updateStudentList(null,null);

+ 15 - 3
components/student/Index.vue

@@ -3,9 +3,16 @@
 		<view class="m_left">
 			<view class="m_hander">
 				<view class="m_teacher">
-					<image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image>
+					<!-- <image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image>
 					<view class="m_teacher_name" v-text="name"></view>
-					<view class="m_teacher_position" v-text="position"></view>
+					<view class="m_teacher_position" v-text="position"></view> -->
+
+					<view class="user-left-avatar df">
+						<img :src="userInfo.avatarSrc"></img>
+					</view>
+					<!-- <image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image> -->
+					<view class="m_teacher_name" v-text="userInfo.Name+userInfo.role"></view>
+					<view class="m_teacher_position" v-text="userInfo.Position"></view>
 				</view>
 			</view>
 			<view class="m_menu">
@@ -47,7 +54,8 @@
 					icon: "icon-bianzu22",
 					select: true,
 					title: '项目一'
-				}]
+				}],
+				userInfo: mydata_userInfo,
 
 			}
 		},
@@ -343,4 +351,8 @@
 	.m_menu-item-checked .cact {
 		color: #EA252C;
 	}
+	.user-left-avatar img {
+		width: px2vw(120);
+		margin-top: px2vw(74);
+	}
 </style>

+ 1 - 1
components/user/selfInfo.vue

@@ -145,7 +145,7 @@
 					</view>
 					<view class="btn-box df fdr aic jcc">
 						<view class="btn-submit df aic jcc" @click="onClick_commit">提交</view>
-						<view class="btn-cancel df aic jcc">取消</view>
+						<!-- <view class="btn-cancel df aic jcc">取消</view> -->
 					</view>
 				</view>
 			</view>

+ 1 - 0
myData.js

@@ -24,5 +24,6 @@ mydata_userInfo = {
 	"Name": "张林",
 	"UserID": "12321zxc",
 	"email":'',
+	"Position":''
 }
 mydata_api='http://39.105.166.141:8085'