dedsudiyu 10 mesiacov pred
rodič
commit
3d936d10b8

+ 2 - 28
pages/views/home/home.vue

@@ -1,11 +1,7 @@
 <template>
 	<view id="home">
-		<teacherHome class="flex-box-page" v-if="userType==2"></teacherHome>
-		<pupilHome class="flex-box-page" v-if="userType==1"></pupilHome>
-		<!-- <manage-home v-if="userType==1" ref="manage"></manage-home> -->
-		<!-- <user-home v-if="userType==2"></user-home> -->
-		<!-- <supplier-home v-if="userType==3"></supplier-home> -->
-		<!-- <tab-bar v-if="userType!=3"></tab-bar> -->
+		<teacherHome class="flex-box-page" v-if="userType==1"></teacherHome>
+		<pupilHome class="flex-box-page" v-if="userType==2"></pupilHome>
 	</view>
 </template>
 <script>
@@ -15,34 +11,12 @@
 	import {
 		pupilHome
 	} from '@/pages/views/pupilPage/pupilHome'
-	/*
-	import {
-		manageHome
-	} from '@/pages/views/home/manageWorkbench'
-	import {
-		userHome
-	} from '@/pages/views/home/studentWorkbench.vue'
-	import {
-		supplierHome
-	} from '@/pages/views/home/supplierWorkbench.vue'
-	import {
-		tabBar
-	} from '@/pages/component/tabBar.vue'
-	*/
 	export default {
 		name: "home",
 		components: {
 			teacherHome,
 			pupilHome,
 		},
-		/*
-		components: {
-			manageHome,
-			userHome,
-			supplierHome,
-			tabBar
-		},
-		*/
 		data() {
 			return {
 				userType: 0,

+ 101 - 70
pages/views/mine/mine.vue

@@ -1,8 +1,14 @@
 <!-- 我的 -->
 <template>
 	<view id="mine">
+		<teacherMine class="flex-box-page" v-if="userType==1"></teacherMine>
+		<pupilMine class="flex-box-page" v-if="userType==2"></pupilMine>
+		
+		
+		
+		<!-- 
 		<view class="top-max-big-box" v-if="pageType">
-			<!--老师-->
+			
 			<view class="top-max-box-two" v-if="userType==1">
 				<view class="user-img-box" @click="selectImage">
 					<img v-if="userData.avatar" :src="baseUrl+userData.avatar">
@@ -14,7 +20,7 @@
 					<view>{{userData.deptName}}</view>
 				</view>
 			</view>
-			<!--学生-->
+			
 			<view class="user-top-max-box-one" v-if="userType==2">
 				<view class="back-posi"></view>
 				<view class="top-max-box-one">
@@ -64,73 +70,87 @@
 		<mineConfigurationSlot v-for="(item,index) in mineConfigData" :key="index" :mineConfig="item">
 		</mineConfigurationSlot>
 		<view class="out-button" @click="clickOut">退出登录</view>
-		<tab-bar></tab-bar>
+		<tab-bar></tab-bar> -->
 	</view>
 </template>
 
 <script>
 	import {
-		config
-	} from '@/api/request/config.js'
-	import {
-		logout,
-		studentinfoFacemy,
-		simpleInfo,
-		getSafeWarnList,
-		fingerprintQuantity,
-		fingerprintQueryList,
-		systemAppletLayoutSelect,
-		systemUserProfile,
-		examPointsRecordGetMyPointsLogInfo
-	} from '@/pages/api/index.js'
-	import {
-		getMineConfig
-	} from '@/utils/mineConfig'
-
-	import {
-		tabBar
-	} from '@/pages/component/tabBar.vue'
+		teacherMine
+	} from '@/pages/views/teacherPage/teacherMine'
 	import {
-		mineConfigurationSlot
-	} from '@/pages/component/mineConfigurationSlot'
+		pupilMine
+	} from '@/pages/views/pupilPage/pupilMine'
+	
+	
+	// import {
+	// 	config
+	// } from '@/api/request/config.js'
+	// import {
+	// 	logout,
+	// 	studentinfoFacemy,
+	// 	simpleInfo,
+	// 	getSafeWarnList,
+	// 	fingerprintQuantity,
+	// 	fingerprintQueryList,
+	// 	systemAppletLayoutSelect,
+	// 	systemUserProfile,
+	// 	examPointsRecordGetMyPointsLogInfo
+	// } from '@/pages/api/index.js'
+	// import {
+	// 	getMineConfig
+	// } from '@/utils/mineConfig'
+
+	// import {
+	// 	tabBar
+	// } from '@/pages/component/tabBar.vue'
+	// import {
+	// 	mineConfigurationSlot
+	// } from '@/pages/component/mineConfigurationSlot'
 
 	export default {
 
+		// components: {
+		// 	tabBar,
+		// 	mineConfigurationSlot,
+		// },
 		components: {
-			tabBar,
-			mineConfigurationSlot,
+			teacherMine,
+			pupilMine,
 		},
 		
 		data() {
 			return {
-				baseUrl: config.base_url,
-				mineConfigData: [],
-				//页面状态
-				pageType: false,
-				//认证数据
-				certification: {
-
-				},
 				userType: 0,
-				userData: {
-					deptName: "",
-					professional: "",
-					userName: "",
-				},
-				securityAlertNum: 0,
-				adminSubCount: 0,
-				wranDoCount: 0,
-				//奖励分
-				bonusPoints: 0,
-				//信用分
-				creditScore: 0,
-				//用户签名
-				signatureUrl: '',
-				// 人脸
-				ifFaceFeature: "",
-				//签名
-				isUpload: "",
-				Quantity: 0, //指纹录取数量
+				
+				// baseUrl: config.base_url,
+				// mineConfigData: [],
+				// //页面状态
+				// pageType: false,
+				// //认证数据
+				// certification: {
+
+				// },
+				// userType: 0,
+				// userData: {
+				// 	deptName: "",
+				// 	professional: "",
+				// 	userName: "",
+				// },
+				// securityAlertNum: 0,
+				// adminSubCount: 0,
+				// wranDoCount: 0,
+				// //奖励分
+				// bonusPoints: 0,
+				// //信用分
+				// creditScore: 0,
+				// //用户签名
+				// signatureUrl: '',
+				// // 人脸
+				// ifFaceFeature: "",
+				// //签名
+				// isUpload: "",
+				// Quantity: 0, //指纹录取数量
 
 			}
 		},
@@ -138,21 +158,22 @@
 
 		},
 		onShow() {
-			this.simpleInfo();
-			this.systemAppletLayoutSelect();
-			if (uni.getStorageSync('token') && uni.getStorageSync('userId') && uni.getStorageSync('userType')) {
-				this.userType = uni.getStorageSync('userType')
-				if(this.userType == '2'){
-					this.examPointsRecordGetMyPointsLogInfo();
-				}
-			} else {
-				uni.removeStorageSync('token');
-				uni.removeStorageSync('userId');
-				uni.removeStorageSync('userType');
-				uni.redirectTo({
-					url: '/pages/login',
-				});
-			}
+			this.userType = uni.getStorageSync('userType')
+			// this.simpleInfo();
+			// this.systemAppletLayoutSelect();
+			// if (uni.getStorageSync('token') && uni.getStorageSync('userId') && uni.getStorageSync('userType')) {
+			// 	this.userType = uni.getStorageSync('userType')
+			// 	if(this.userType == '2'){
+			// 		this.examPointsRecordGetMyPointsLogInfo();
+			// 	}
+			// } else {
+			// 	uni.removeStorageSync('token');
+			// 	uni.removeStorageSync('userId');
+			// 	uni.removeStorageSync('userType');
+			// 	uni.redirectTo({
+			// 		url: '/pages/login',
+			// 	});
+			// }
 		},
 
 		methods: {
@@ -343,7 +364,17 @@
 <style lang="stylus" scoped>
 	#mine {
 		height: 100%;
-
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+		.flex-box-page{
+			flex:1;
+			display: flex;
+			flex-direction: column;
+			overflow: hidden;
+		}
+		
+		
 		.top-max-big-box {
 
 			/*background:#ffffff;*/

+ 18 - 33
pages/views/pupilPage/pupilHome.vue

@@ -8,25 +8,25 @@
 			<img class="position-img" :src="rectangleLogo">
 		</view>
 		<view class="button-one-box">
-			<view class="button-min" @click="goPage('securityExamination')">
+			<view class="button-min" @click="goPage('securityExaminationPupil')">
 				<img class="button-img" src="@/pages/images/newImage/icon_sy_aqks@1x.png">
 				<view class="button-name">安全考试</view>
 			</view>
-			<view class="button-min" @click="goPage('securityAdmittance')">
+			<view class="button-min" @click="goPage('securityAdmittancePupil')">
 				<img class="button-img" src="@/pages/images/newImage/icon_sy_aqzr@1x.png">
 				<view class="button-name">安全准入</view>
 			</view>
-			<view class="button-min" @click="goPage('hierarchicalControl')">
+			<view class="button-min" @click="goPage('chemicalsPupil')">
 				<img class="button-img" src="@/pages/images/newImage/icon_sy_hxp@1x.png">
 				<view class="button-name">化学品</view>
 			</view>
-			<view class="button-min" @click="goPage('securityResponsibility')">
+			<view class="button-min" @click="goPage('cageSiteSubscribePupil')">
 				<img class="button-img" src="@/pages/images/newImage/icon_sy_lwgl@1x.png">
 				<view class="button-name">笼位预约</view>
 			</view>
 		</view>
 		<view class="button-two-box">
-			<view class="button-big-box" @click="goPage('snapshot')"
+			<view class="button-big-box" @click="goPage('snapshotPupil')"
 			style="background-color: #DFF0FF;margin-right:20rpx;">
 				<img src="@/pages/images/newImage/icon_sy_ssp@1x.png">
 				<view class="button-min-box">
@@ -34,7 +34,7 @@
 					<view>发现隐患</view>
 				</view>
 			</view>
-			<view class="button-big-box" @click="goPage('remoteDoorOpening')"
+			<view class="button-big-box" @click="goPage('leaveCheckPupil')"
 			style="background-color: #D6EBDA;">
 				<img src="@/pages/images/newImage/img_sy_lkjc@1x.png">
 				<view class="button-min-box">
@@ -44,7 +44,7 @@
 			</view>
 		</view>
 		<view class="button-three-box">
-			<view class="button-big-box" @click="goPage('chemicalsManagement')">
+			<view class="button-big-box" @click="goPage('violationRecordPupil')">
 				<img src="@/pages/images/newImage/img_wd_wgjl@1x.png">
 				<view class="button-min-box">
 					<view>违规记录</view>
@@ -96,41 +96,26 @@
 					});
 					return
 				}
-				if(type == 'dataBoard'){
-					//数据看板
-					
-				}else if(type == 'securityCheck'){
-					//安全检查
-					
-				}else if(type == 'securityExamination'){
+				if(type == 'securityExaminationPupil'){
 					//安全考试
 					
-				}else if(type == 'securityAdmittance'){
+				}else if(type == 'securityAdmittancePupil'){
 					//安全准入
 					
-				}else if(type == 'hierarchicalControl'){
-					//分级管控
-					
-				}else if(type == 'securityResponsibility'){
-					//安全责任
-					
-				}else if(type == 'deviceManagement'){
-					//设备管理
-					
-				}else if(type == 'emergencyDisposal'){
-					//应急处置
+				}else if(type == 'chemicalsPupil'){
+					//化学品
 					
-				}else if(type == 'cageSiteManagement'){
-					//笼位管理
+				}else if(type == 'cageSiteSubscribePupil'){
+					//笼位预约
 					
-				}else if(type == 'snapshot'){
+				}else if(type == 'snapshotPupil'){
 					//随手拍
 					
-				}else if(type == 'remoteDoorOpening'){
-					//远程开门
+				}else if(type == 'leaveCheckPupil'){
+					//离开检查
 					
-				}else if(type == 'chemicalsManagement'){
-					//化学品管控
+				}else if(type == 'violationRecordPupil'){
+					//违规记录
 					
 				}
 			},

+ 410 - 0
pages/views/pupilPage/pupilMine.vue

@@ -0,0 +1,410 @@
+<template>
+	<view class="pupilMine">
+		<!-- 背景渐变色 -->
+		<view class="back-img-box"></view>
+		<!-- 信息面板 -->
+		<view class="user-info-box">
+			<view class="left-img-box">
+				<img v-if="userData.avatar" class="avatar-img" :src="userData.avatar">
+				<img v-else class="avatar-img" src="@/pages/images/icon_01.png">
+				<img class="edit-img" src="@/pages/images/newImage/icon_wd_bj@1x.png">
+			</view>
+			<view class="right-name-box">
+				<view class="right-name-top-box">
+					<view>{{userData.userName}}</view>
+					<view v-if="negativeType">负面清单</view>
+				</view>
+				<view class="right-name-bottom-box">{{userData.deptName}}</view>
+			</view>
+		</view>
+		<!-- 信用分面板 -->
+		<view class="points-max-box">
+			<view class="points-big-box">
+				<view class="num-p colorA">{{creditScore?creditScore:'-'}}</view>
+				<view class="img-box">
+					<img src="@/pages/images/newImage/icon_wd_xyf@1x.png">
+					<view>信用分</view>
+				</view>
+			</view>
+			<view class="border-null-p"></view>
+			<view class="points-big-box">
+				<view class="num-p colorB">{{bonusPoints?bonusPoints:'-'}}</view>
+				<view class="img-box">
+					<img src="@/pages/images/newImage/icon_wd_jlf@1x.png">
+					<view>奖励分</view>
+				</view>
+			</view>
+			<view class="border-null-p"></view>
+			<view class="points-big-box">
+				<view class="num-p colorC">扫一扫</view>
+				<view class="img-box">
+					<img style="margin-left:30rpx;" src="@/pages/images/newImage/icon_wd_dh@1x.png">
+					<view>积分兑换</view>
+				</view>
+			</view>
+		</view>
+		<!-- 按钮部分 -->
+		<view class="button-max-big-box">
+			<view class="button-big-box" @click="goPage('entryAndExitRecordPupil')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_jcjl.png">
+				<view class="left-text-p">进出记录</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+		</view>
+		<view class="button-max-big-box">
+			<view class="button-big-box" @click="goPage('identityAuthenticationPupil')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_sfyz@1x.png">
+				<view class="left-text-p">身份验证</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+			<view class="button-big-box" @click="goPage('electronicSignaturePupil')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_dzqm@1x.png">
+				<view class="left-text-p">电子签名</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+		</view>
+		<view class="out-button" @click="clickOut">退出登录</view>
+		<tab-bar></tab-bar>
+	</view>
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		logout,
+		systemUserProfile,
+		examPointsRecordGetMyPointsLogInfo,
+	} from '@/pages/api/index.js'
+	import {
+		pageRestrictVerify
+	} from '@/utils/index'
+	import {
+		tabBar
+	} from '@/pages/component/tabBar.vue'
+	export default {
+		name: "pupilMine",
+		components: {
+			tabBar,
+		},
+		data() {
+			return {
+				userData:{},
+				bonusPoints:null,
+				creditScore:null,
+				negativeType:false,
+			}
+		},
+		created() {
+
+		},
+		mounted() {
+			this.systemUserProfile();
+			this.examPointsRecordGetMyPointsLogInfo();
+		},
+		methods: {
+			goPage(type) {
+				if (!pageRestrictVerify(type)) {
+					uni.showToast({
+						title: '没有相关权限,请联系管理员',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (type == 'entryAndExitRecordPupil') {
+					//进出记录
+
+				}else if (type == 'identityAuthenticationPupil') {
+					//身份验证
+
+				} else if (type == 'electronicSignaturePupil') {
+					//电子签名
+
+				}
+			},
+			//获取个人信息
+			async systemUserProfile() {
+				const {
+					data
+				} = await systemUserProfile();
+				if (data.code == 200) {
+					this.$set(this, 'userData', data.data)
+					uni.setStorageSync('faceImg', data.data.faceImg);
+				}
+			},
+			//查询学生-信用分/奖励分
+			async examPointsRecordGetMyPointsLogInfo() {
+				const {
+					data
+				} = await examPointsRecordGetMyPointsLogInfo();
+				if (data.code == 200) {
+					this.bonusPoints = data.data.bonusPoints;
+					this.creditScore = data.data.creditScore;
+				}
+			},
+			//退出按钮
+			clickOut() {
+				let self = this;
+				uni.showModal({
+					// title: '确认要退出吗?',
+					content: '确认要退出吗',
+					cancelColor: "#999",
+					confirmColor: "#0183FA",
+					success: function(res) {
+						if (res.confirm) {
+							self.logout();
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			//退出登录
+			async logout() {
+				let self = this;
+				const {
+					data
+				} = await logout();
+				if (data.code == 200) {
+					uni.removeStorageSync('token');
+					uni.removeStorageSync('userId');
+					uni.removeStorageSync('userType');
+					uni.redirectTo({
+						url: '/pages/views/login/login',
+					});
+				}
+			},
+			// 头像上传
+			selectImage() {
+				let self = this;
+				wx.chooseImage({
+					count: 1,
+					sizeType: ["original", "compressed"],
+					sourceType: ["album", "camera"],
+					success: function(res) {
+						let tempFilePaths = res.tempFilePaths[0];
+						self.uploadImg(tempFilePaths);
+					}
+				});
+			},
+			async uploadImg(tempFilePaths) {
+				var self = this;
+				uni.showLoading({
+					title: '上传中',
+					mask: true
+				});
+				uni.uploadFile({
+					url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
+					header: {
+						'Authorization': uni.getStorageSync('token')
+					},
+					filePath: tempFilePaths,
+					name: 'file',
+					formData: {
+						'user': 'test'
+					},
+					success: (uploadFileRes) => {
+						let res = JSON.parse(uploadFileRes.data);
+						if (res.code == 200) {
+							uni.navigateTo({
+								url: '/pages_basics/views/avatar?src=' + config.base_url + res.data.url,
+							});
+
+
+
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					},
+					fail: err => {},
+					complete: () => {
+						uni.hideLoading()
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.pupilMine {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+		.back-img-box{
+			z-index:0;
+			position: absolute;
+			top:0;
+			left: 0;
+			width:750rpx;
+			height:291rpx;
+		  background: linear-gradient(180deg, rgba(1,131,250,1) 0%, rgba(255,255,255,0) 100%);
+		}
+		.user-info-box{
+			z-index:10;
+			margin:39rpx 24rpx 0;
+			display: flex;
+			.left-img-box{
+				width:132rpx;
+				height:132rpx;
+				position: relative;
+				margin-right:22rpx;
+				.avatar-img{
+					position: absolute;
+					top:6rpx;
+					left:6rpx;
+					width:116rpx;
+					height:116rpx;
+					border-radius:50%;
+					border:2rpx solid #fff;
+				}
+				.edit-img{
+					z-index:5;
+					position: absolute;
+					right:0;
+					bottom:6rpx;
+					width:40rpx;
+					height:40rpx;
+				}
+			}
+			.right-name-box{
+				padding-top:6rpx;
+				.right-name-top-box{
+					display: flex;
+					view:nth-child(1){
+						height:68rpx;
+						line-height:62rpx;
+						font-size:32rpx;
+						color:#fff;
+					}
+					view:nth-child(2){
+						margin-top:14rpx;
+						margin-left:30rpx;
+						width: 120rpx;
+						height:40rpx;
+						line-height:40rpx;
+						background: #FF8C00;
+						border-radius: 50rpx;
+						font-size:24rpx;
+						color:#fff;
+						text-align: center;
+					}
+				}
+				.right-name-bottom-box{
+						height:50rpx;
+						line-height:50rpx;
+						font-size:28rpx;
+						color:#fff;
+				}
+			}
+		}
+		.points-max-box{
+			z-index:10;
+			width: 690rpx;
+			height: 160rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			margin:38rpx 30rpx 0;
+			display: flex;
+			.points-big-box{
+				flex:1;
+				.num-p{
+					margin:39rpx 0 19rpx 0;
+					text-align: center;
+					font-size:28rpx;
+					line-height:39rpx;
+				}
+				.img-box{
+					display: flex;
+					img{
+						width:30rpx;
+						height:30rpx;
+						display: block;
+						margin:0 20rpx 0 42rpx;
+					}
+					view{
+						color:#333333;
+						line-height:30rpx;
+						font-size:28rpx;
+					}
+				}
+				.colorA{
+					color:#0183FA;
+				}
+				.colorB{
+					color:#26C736;
+				}
+				.colorC{
+					color:#333333;
+				}
+			}
+			.border-null-p{
+				width:1rpx;
+				height:40rpx;
+				margin:60rpx 0 0;
+				background-color: #e0e0e0;
+			}
+		}
+		.button-max-big-box{
+			background-color: #fff;
+			border-radius:20rpx;
+			margin:20rpx 30rpx 0;
+			.button-big-box:nth-child(1){
+				border-top:none;
+			}
+			.button-big-box{
+				border-top:1px solid #E0E0E0;
+				display: flex;
+				padding:0 30rpx 0 26rpx;
+				.left-img{
+					display: block;
+					width:36rpx;
+					height:36rpx;
+					margin-top:25rpx;
+					margin-right:21rpx;
+				}
+				.left-text-p{
+					flex:1;
+					front-size:30rpx;
+					line-height:40rpx;
+					margin:20rpx 0;
+				}
+				.right-text-p{
+					front-size:30rpx;
+					line-height:40rpx;
+					margin:20rpx 0;
+				}
+				.right-img{
+					display: block;
+					width:30rpx;
+					height:30rpx;
+					margin-top:28rpx;
+				}
+			}
+		}
+		.out-button {
+			position absolute;
+			bottom: 140rpx;
+			left: 75rpx;
+			width: 600rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 100rpx;
+			text-align center;
+			background #0183FA;
+			color: #ffffff;
+			font-size: 30rpx;
+			margin: 0 auto;
+		}
+	}
+</style>

+ 421 - 1
pages/views/teacherPage/teacherMine.vue

@@ -1,8 +1,428 @@
 <template>
+	<view class="teacherMine">
+		<!-- 背景渐变色 -->
+		<view class="back-img-box"></view>
+		<!-- 信息面板 -->
+		<view class="user-info-box">
+			<view class="left-img-box">
+				<img v-if="userData.avatar" class="avatar-img" :src="userData.avatar">
+				<img v-else class="avatar-img" src="@/pages/images/icon_01.png">
+				<img class="edit-img" src="@/pages/images/newImage/icon_wd_bj@1x.png">
+			</view>
+			<view class="right-name-box">
+				<view class="right-name-top-box">
+					<view>{{userData.userName}}</view>
+				</view>
+				<view class="right-name-bottom-box">{{userData.deptName}}</view>
+			</view>
+		</view>
+		<!-- 信用分面板 -->
+		<view class="points-max-box">
+			<view class="points-big-box">
+				<view class="num-p colorA">{{creditScore?creditScore:'-'}}</view>
+				<view class="img-box">
+					<img src="@/pages/images/newImage/icon_wd_xyf@1x.png">
+					<view>信用分</view>
+				</view>
+			</view>
+			<view class="border-null-p"></view>
+			<view class="points-big-box">
+				<view class="num-p colorB">{{bonusPoints?bonusPoints:'-'}}</view>
+				<view class="img-box">
+					<img src="@/pages/images/newImage/icon_wd_jlf@1x.png">
+					<view>奖励分</view>
+				</view>
+			</view>
+			<view class="border-null-p"></view>
+			<view class="points-big-box">
+				<view class="num-p colorC">扫一扫</view>
+				<view class="img-box">
+					<img style="margin-left:30rpx;" src="@/pages/images/newImage/icon_wd_dh@1x.png">
+					<view>积分兑换</view>
+				</view>
+			</view>
+		</view>
+		<!-- 按钮部分 -->
+		<view class="button-max-big-box">
+			<view class="button-big-box" @click="goPage('riskEarlyWarning')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_fxyj@1x.png">
+				<view class="left-text-p">风险预警</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+			<view class="button-big-box" @click="goPage('entryAndExitRecord')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_jcjl.png">
+				<view class="left-text-p">进出记录</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+		</view>
+		<view class="button-max-big-box">
+			<view class="button-big-box" @click="goPage('accessControlAuthorization')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_mjsq@1x.png">
+				<view class="left-text-p">门禁授权</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+		</view>
+		<view class="button-max-big-box">
+			<view class="button-big-box" @click="goPage('identityAuthentication')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_sfyz@1x.png">
+				<view class="left-text-p">身份验证</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+			<view class="button-big-box" @click="goPage('electronicSignature')">
+				<img class="left-img" src="@/pages/images/newImage/icon_wd_dzqm@1x.png">
+				<view class="left-text-p">电子签名</view>
+				<view class="right-text-p"></view>
+				<img class="right-img" src="@/pages/images/newImage/icon_wd_gd@1x.png">
+			</view>
+		</view>
+		<view class="out-button" @click="clickOut">退出登录</view>
+		<tab-bar></tab-bar>
+	</view>
 </template>
 
 <script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		logout,
+		systemUserProfile,
+		examPointsRecordGetMyPointsLogInfo,
+	} from '@/pages/api/index.js'
+	import {
+		pageRestrictVerify
+	} from '@/utils/index'
+	import {
+		tabBar
+	} from '@/pages/component/tabBar.vue'
+	export default {
+		name: "teacherMine",
+		components: {
+			tabBar,
+		},
+		data() {
+			return {
+				userData:{},
+				bonusPoints:null,
+				creditScore:null,
+			}
+		},
+		created() {
+
+		},
+		mounted() {
+			this.systemUserProfile();
+			this.examPointsRecordGetMyPointsLogInfo();
+		},
+		methods: {
+			goPage(type) {
+				if (!pageRestrictVerify(type)) {
+					uni.showToast({
+						title: '没有相关权限,请联系管理员',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (type == 'riskEarlyWarning') {
+					//风险预警
+
+				} else if (type == 'entryAndExitRecord') {
+					//进出记录
+
+				} else if (type == 'accessControlAuthorization') {
+					//门禁授权
+
+				} else if (type == 'identityAuthentication') {
+					//身份验证
+
+				} else if (type == 'electronicSignature') {
+					//电子签名
+
+				}
+			},
+			//获取个人信息
+			async systemUserProfile() {
+				const {
+					data
+				} = await systemUserProfile();
+				if (data.code == 200) {
+					this.$set(this, 'userData', data.data)
+					uni.setStorageSync('faceImg', data.data.faceImg);
+				}
+			},
+			//查询学生-信用分/奖励分
+			async examPointsRecordGetMyPointsLogInfo() {
+				const {
+					data
+				} = await examPointsRecordGetMyPointsLogInfo();
+				if (data.code == 200) {
+					this.bonusPoints = data.data.bonusPoints;
+					this.creditScore = data.data.creditScore;
+				}
+			},
+			//退出按钮
+			clickOut() {
+				let self = this;
+				uni.showModal({
+					// title: '确认要退出吗?',
+					content: '确认要退出吗',
+					cancelColor: "#999",
+					confirmColor: "#0183FA",
+					success: function(res) {
+						if (res.confirm) {
+							self.logout();
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			//退出登录
+			async logout() {
+				let self = this;
+				const {
+					data
+				} = await logout();
+				if (data.code == 200) {
+					uni.removeStorageSync('token');
+					uni.removeStorageSync('userId');
+					uni.removeStorageSync('userType');
+					uni.redirectTo({
+						url: '/pages/views/login/login',
+					});
+				}
+			},
+			// 头像上传
+			selectImage() {
+				let self = this;
+				wx.chooseImage({
+					count: 1,
+					sizeType: ["original", "compressed"],
+					sourceType: ["album", "camera"],
+					success: function(res) {
+						let tempFilePaths = res.tempFilePaths[0];
+						self.uploadImg(tempFilePaths);
+					}
+				});
+			},
+			async uploadImg(tempFilePaths) {
+				var self = this;
+				uni.showLoading({
+					title: '上传中',
+					mask: true
+				});
+				uni.uploadFile({
+					url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
+					header: {
+						'Authorization': uni.getStorageSync('token')
+					},
+					filePath: tempFilePaths,
+					name: 'file',
+					formData: {
+						'user': 'test'
+					},
+					success: (uploadFileRes) => {
+						let res = JSON.parse(uploadFileRes.data);
+						if (res.code == 200) {
+							uni.navigateTo({
+								url: '/pages_basics/views/avatar?src=' + config.base_url + res.data.url,
+							});
+
+
+
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					},
+					fail: err => {},
+					complete: () => {
+						uni.hideLoading()
+					}
+				});
+			},
+		}
+	}
 </script>
 
-<style>
+<style lang="stylus" scoped>
+	.teacherMine {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+		.back-img-box{
+			z-index:0;
+			position: absolute;
+			top:0;
+			left: 0;
+			width:750rpx;
+			height:291rpx;
+      background: linear-gradient(180deg, rgba(1,131,250,1) 0%, rgba(255,255,255,0) 100%);
+		}
+		.user-info-box{
+			z-index:10;
+			margin:39rpx 24rpx 0;
+			display: flex;
+			.left-img-box{
+				width:132rpx;
+				height:132rpx;
+				position: relative;
+				margin-right:22rpx;
+				.avatar-img{
+					position: absolute;
+					top:6rpx;
+					left:6rpx;
+					width:116rpx;
+					height:116rpx;
+					border-radius:50%;
+					border:2rpx solid #fff;
+				}
+				.edit-img{
+					z-index:5;
+					position: absolute;
+					right:0;
+					bottom:6rpx;
+					width:40rpx;
+					height:40rpx;
+				}
+			}
+			.right-name-box{
+				padding-top:6rpx;
+				.right-name-top-box{
+					display: flex;
+					view:nth-child(1){
+						height:68rpx;
+						line-height:62rpx;
+						font-size:32rpx;
+						color:#fff;
+					}
+					view:nth-child(2){
+						margin-top:14rpx;
+						margin-left:30rpx;
+						width: 120rpx;
+						height:40rpx;
+						line-height:40rpx;
+						background: #FF8C00;
+						border-radius: 50rpx;
+						font-size:24rpx;
+						color:#fff;
+						text-align: center;
+					}
+				}
+				.right-name-bottom-box{
+						height:50rpx;
+						line-height:50rpx;
+						font-size:28rpx;
+						color:#fff;
+				}
+			}
+		}
+		.points-max-box{
+			z-index:10;
+			width: 690rpx;
+			height: 160rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			margin:38rpx 30rpx 0;
+			display: flex;
+			.points-big-box{
+				flex:1;
+				.num-p{
+					margin:39rpx 0 19rpx 0;
+					text-align: center;
+					font-size:28rpx;
+					line-height:39rpx;
+				}
+				.img-box{
+					display: flex;
+					img{
+						width:30rpx;
+						height:30rpx;
+						display: block;
+						margin:0 20rpx 0 42rpx;
+					}
+					view{
+						color:#333333;
+						line-height:30rpx;
+						font-size:28rpx;
+					}
+				}
+				.colorA{
+					color:#0183FA;
+				}
+				.colorB{
+					color:#26C736;
+				}
+				.colorC{
+					color:#333333;
+				}
+			}
+			.border-null-p{
+				width:1rpx;
+				height:40rpx;
+				margin:60rpx 0 0;
+				background-color: #e0e0e0;
+			}
+		}
+		.button-max-big-box{
+			background-color: #fff;
+			border-radius:20rpx;
+			margin:20rpx 30rpx 0;
+			.button-big-box:nth-child(1){
+				border-top:none;
+			}
+			.button-big-box{
+				border-top:1px solid #E0E0E0;
+				display: flex;
+				padding:0 30rpx 0 26rpx;
+				.left-img{
+					display: block;
+					width:36rpx;
+					height:36rpx;
+					margin-top:25rpx;
+					margin-right:21rpx;
+				}
+				.left-text-p{
+					flex:1;
+					front-size:30rpx;
+					line-height:40rpx;
+					margin:20rpx 0;
+				}
+				.right-text-p{
+					front-size:30rpx;
+					line-height:40rpx;
+					margin:20rpx 0;
+				}
+				.right-img{
+					display: block;
+					width:30rpx;
+					height:30rpx;
+					margin-top:28rpx;
+				}
+			}
+		}
+		.out-button {
+			position absolute;
+			bottom: 140rpx;
+			left: 75rpx;
+			width: 600rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			border-radius: 100rpx;
+			text-align center;
+			background #0183FA;
+			color: #ffffff;
+			font-size: 30rpx;
+			margin: 0 auto;
+		}
+	}
 </style>