dedsudiyu преди 3 седмици
родител
ревизия
8b4fb479ca

+ 2 - 2
api/request/config.js

@@ -1,7 +1,7 @@
 const config = {
 	/************************************ 后台服务地址 ************************************/
 	
-	base_url: 'http://192.168.1.43/api', //43服务器
+	// base_url: 'http://192.168.1.43/api', //43服务器
 	// base_url: 'http://192.168.1.8/api',//1.8服务器
 	// base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
@@ -22,7 +22,7 @@ const config = {
 	// base_url: 'https://lab.zjznai.com/api/', //暨大化材
 	// base_url: 'https://lab.zjznai.com/kdwclabSystem/', //矿大文昌地址
     //base_url: 'https://znyj.zjznai.suda.edu.cn/labSystem/', //苏大临时地址
-	// base_url: 'https://labcontrol.nwafu.edu.cn/api/', //西北农林
+	base_url: 'https://labcontrol.nwafu.edu.cn/api/', //西北农林
 	// base_url: 'http://172.16.0.65/api/', //西北农林
 	//base_url: 'https://lab.zjznai.com/labapp/', //43测试
 	// base_url: 'https://metersphere.zjznai.com/labSystem/', //中国海关

+ 1 - 4
api/request/request.js

@@ -448,11 +448,8 @@ export function loginTimeout(params) {
 	uni.removeStorageSync('userId');
 	uni.removeStorageSync('userType');
 	setTimeout(function() {
-		// uni.redirectTo({
-		// 	url: '/pages/views/login/login',
-		// });
 		uni.redirectTo({
-			url: '/pages/views/login/ssoLogin',
+			url: '/pages/views/login/login',
 		});
 	}, 2000);
 }

+ 8 - 0
pages.json

@@ -16,6 +16,14 @@
 				"navigationStyle": "custom" //关闭原生导航
 			}
 		},
+		{
+			"path": "pages/views/login/accountLogin", //账号密码登录
+			"style": {
+				"navigationBarTitleText": "账号密码登录",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
 		{
 			"path": "pages/views/login/ssoLogin", //统一认证页面
 			"style": {

+ 1 - 4
pages/views/home/home.vue

@@ -37,11 +37,8 @@
 				uni.removeStorageSync('token');
 				uni.removeStorageSync('userId');
 				uni.removeStorageSync('userType');
-				// uni.redirectTo({
-				// 	url: '/pages/views/login/login',
-				// });
 				uni.redirectTo({
-					url: '/pages/views/login/ssoLogin',
+					url: '/pages/views/login/login',
 				});
 			}
 		},

+ 499 - 0
pages/views/login/accountLogin.vue

@@ -0,0 +1,499 @@
+<!-- 登录 -->
+<template>
+	<view id="accountLogin">
+		<img class="login-max-big" :src="loginBanner">
+		<view class="login-box">
+			<view class="tabTitle">
+				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
+					<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
+					<!-- <view :class="{on:curTab==index}" class="tabTitle_across"></view> -->
+				</view>
+			</view>
+			<view class="input-max-box-one">
+				<view class="input-box">
+					<img :src="imagesUrl('commonality/img_log_in_account.png')">
+					<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
+				</view>
+			</view>
+			<view class="input-max-box-two">
+				<view class="input-box">
+					<img :src="imagesUrl('commonality/img_log_in_password.png')">
+					<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
+				</view>
+			</view>
+			<view class="check-box" @click="checkboxChange()">
+				<img v-if="checkedType" :src="imagesUrl('commonality/icon_13.png')">
+				<img v-if="!checkedType" :src="imagesUrl('commonality/icon_12.png')"/>
+				<view>记住我</view>
+			</view>
+			<view class="button-box" @click="login()">登录</view>
+			<view class="passwrod-button-box" @click="forgotPasswordButton()">忘记密码?</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import md5 from '@/utils/md5.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		login,
+		configInfo,
+		getConfigByType,
+		systemAppletRolePermission,
+		securityDataStatisticsGetUserIdentity
+	} from '@/pages/api/index.js'
+	import {
+		Encrypt,
+		Decrypt
+	} from '@/utils/secret.js'
+	export default {
+		data() {
+			return {
+				identityStatus: 1,
+				username: "",
+				password: "",
+				checkedType: false,
+				loginBanner: uni.getStorageSync('loginBanner'),
+				infoList: [], //模板消息Id
+				tabText: ['师生登录'],
+				curTab: 0,
+				pageType: 0,
+				supplierType: false,
+			}
+		},
+
+		onLoad(option) {
+			//供应商注册成功后返回到供应商注册页面
+			if (option.status) {
+				this.identityStatus = 2
+			}
+			if (uni.getStorageSync('userName') && uni.getStorageSync('password')) {
+				this.username = uni.getStorageSync('userName');
+				this.password = uni.getStorageSync('password');
+				this.checkedType = true;
+			}
+		},
+		onShow() {
+			this.getConfigInfo();
+		},
+		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				this.curTab = index;
+			},
+			//跳转忘记密码
+			forgotPasswordButton(){
+				uni.navigateTo({
+					url: '/pages_basics/views/forgotPassword/forgotPassword',
+				});
+			},
+			//登录
+			async login() {
+				let self = this;
+				let obj = {
+					account: this.username,
+					password: md5.hex_md5(this.password),
+				}
+				const {
+					data
+				} = await login(obj)
+				if (data.code == 200) {
+					if(data.data.userType == 0 || data.data.userType == 1 || data.data.userType == 2){
+						uni.setStorageSync('dataBoardType', false);
+						uni.setStorageSync('token', data.data.token);
+						uni.setStorageSync('userId', data.data.userId);
+						uni.setStorageSync('isInitPwd', true);
+						// userType 0-系统 1-教职工 2-学生 3-大屏
+						uni.setStorageSync('userType', data.data.userType == 0 || data.data.userType == 1 ? '1' :
+							(data.data.userType == 2 ? '2' : (data.data.userType == 3 ? '3' : 'none')));
+						if (this.checkedType) {
+							uni.setStorageSync('userName', this.username)
+							uni.setStorageSync('password', this.password)
+						} else {
+							uni.removeStorageSync('userName')
+							uni.removeStorageSync('password')
+						}
+						//等待配置与字段获取到后跳转
+						Promise.all([
+							//获取开发配置
+							this.getConfigByType(),
+							//获取权限字段
+							this.systemAppletRolePermission(),
+							//查询身份
+							this.securityDataStatisticsGetUserIdentity()
+						]).then((result) => {
+							if (uni.getStorageSync('codeData')) {
+								uni.redirectTo({
+									url: '/pages/views/saoCode/saoCode',
+								});
+							} else if (uni.getStorageSync('warningId')) {
+								uni.redirectTo({
+									url: '/pages_basics/views/earlyWarningManage/earlyWarningDetail',
+								});
+							} else {
+								uni.redirectTo({
+									url: '/pages/views/home/home',
+								});
+							}
+						}).catch((error) => {
+							wx.showToast({
+								title: '数据异常,请稍候再试!',
+								icon: "none",
+								duration: 3000
+							});
+						})
+					}else{
+						wx.showToast({
+							title: '非教职工/学生账号,无法登录本系统.',
+							icon: "none",
+							duration: 3000
+						});
+					}
+				}
+			},
+			//获取权限字段
+			async systemAppletRolePermission() {
+				let self = this;
+				const {
+					data
+				} = await systemAppletRolePermission();
+				if (data.code == 200) {
+					uni.setStorageSync('permissions', data.data.data)
+					uni.setStorageSync('controlsRestrict', data.data.roleKeys ? data.data.roleKeys : [])
+					uni.setStorageSync('user', data.data.userInfo)
+				}
+			},
+			switchClick() {
+				if (this.identityStatus == 1) {
+					this.identityStatus = 2;
+				} else {
+					this.identityStatus = 1;
+				}
+			},
+			//查询公共配置
+			async getConfigInfo() {
+				const {
+					data
+				} = await configInfo({
+					type: '1,2,4'
+				});
+				if (data.code == 200) {
+					let list = JSON.parse(data.data)
+					let newData = {};
+					list.forEach((item) => {
+						let obj = JSON.parse(item.configValue)
+						newData = {
+							...newData,
+							...obj
+						}
+					})
+					uni.setStorageSync('circularLogo', config.base_url + newData.circularLogo)
+					uni.setStorageSync('rectangleLogo', config.base_url + newData.rectangleLogo)
+					uni.setStorageSync('videoCover', config.base_url + newData.videoCover)
+					this.$set(this, 'loginBanner', config.base_url + newData.loginBanner);
+					uni.setStorageSync('loginBanner', config.base_url + newData.loginBanner)
+					this.$set(this, 'supplierType', newData.supplier);
+					uni.setStorageSync('supplierType', newData.supplier)
+					uni.setStorageSync('homepageBanner', config.base_url + newData.homepageBanner)
+				}
+			},
+			//获取开发配置
+			async getConfigByType() {
+				const {
+					data
+				} = await getConfigByType({
+					category: 2,
+					configType: 5
+				});
+				if (data.code == 200) {
+					let obj = JSON.parse(data.data.configValue)
+					//文件预览地址
+					uni.setStorageSync('filePreviewUrl', 'https://' + obj.fileExtranetUrl)
+					//小程序视频地址
+					uni.setStorageSync('cameraExtranetAgent', 'https://' + obj.cameraExtranetAgent)
+					//MQTT地址
+					uni.setStorageSync('mqttUrl', Decrypt(obj.mqttExtranetUrl))
+					//MQTT地址-内网
+					uni.setStorageSync('mqttIntranetUrl', Decrypt(obj.mqttIntranetUrl))
+					//MQTT账号
+					uni.setStorageSync('mqttUser', Decrypt(obj.mqttExtranetUser))
+					//MQTT密码
+					uni.setStorageSync('mqttPassword', Decrypt(obj.mqttExtranetPassword))
+					//文件浏览环境
+					uni.setStorageSync('fileBrowseEnvironment','http://'+Decrypt(obj.fileBrowseEnvironment))
+					uni.setStorageSync('fileBrowseEnvironmentExtranet','https://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
+				}
+			},
+			//查询身份
+			async securityDataStatisticsGetUserIdentity(routeUrl) {
+				let self = this;
+				const {
+					data
+				} = await securityDataStatisticsGetUserIdentity();
+				if(data.schoolAdmin){
+					//校级管理员
+					uni.setStorageSync('identityData',{
+						type:'schoolAdmin'
+					});
+				}else if(data.collegeAdmin){
+					//院级管理员
+					uni.setStorageSync('identityData',{
+						type:'collegeAdmin'
+					});
+				}else if(data.schoolGroup){
+					//校级督导组
+					uni.setStorageSync('identityData',{
+						type:'schoolGroup',
+						groupIds:data.groupIds
+					});
+				}else if(data.collegeGroup){
+					//院级督导组
+					uni.setStorageSync('identityData',{
+						type:'collegeGroup',
+						groupIds:data.groupIds
+					});
+				}else{
+					uni.removeStorageSync('identityData');
+				}
+			},
+			checkboxChange() {
+				this.checkedType = !this.checkedType;
+			},
+
+		},
+
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#accountLogin {
+		height: 100%;
+		width: 100%;
+
+		background #f5f5f5;
+		position relative;
+		.login-max-big {
+			width: 750rpx;
+			height: 1177rpx;
+			z-index: 0;
+		}
+
+		.login-box {
+			z-index: 3;
+			position: absolute;
+			top: 430rpx;
+			left: 46rpx;
+			width: 658rpx;
+			height: 700rpx;
+
+			// background #fff
+			/* 切换按钮 */
+			.tabTitle {
+				display flex;
+				width: 100%;
+				height: 100rpx;
+				position: absolute;
+				// top: 50rpx;
+				justify-content: center;
+
+				.tabTitle_li {
+					width: 168rpx;
+					text-align center;
+
+					.tabTitle_text {
+						display: inline-block;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						line-height: 90rpx;
+
+						&.on {
+							color: #0183FA;
+						}
+					}
+
+					.tabTitle_across {
+						width: 100rpx;
+						height: 4rpx;
+						background: #0183FA;
+						border-radius: 2rpx;
+						margin-left 30rpx;
+						display none;
+
+						&.on {
+							display block;
+						}
+					}
+
+				}
+			}
+
+			border-radius:20rpx;
+
+			.input-max-box-one {
+				overflow: hidden;
+				// margin-top: 68rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 147rpx auto 0;
+
+					img {
+						width: 28rpx;
+						height: 32rpx;
+						margin: 24rpx 31rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.input-max-box-two {
+				margin-top: 40rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 0 auto 0;
+
+					img {
+						width: 30rpx;
+						height: 32rpx;
+						margin: 24rpx 30rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.check-box {
+				margin: 30rpx 0 30rpx 104rpx;
+				width: 300rpx;
+				height: 50rpx;
+				display: flex;
+
+				img {
+					margin-top: 10rpx;
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 10rpx;
+				}
+
+				view {
+					font-size: 24rpx;
+					line-height: 50rpx;
+				}
+			}
+
+			.button-box {
+				width: 600rpx;
+				line-height: 80rpx;
+				background: #0183FA;
+				border-radius: 40rpx;
+				font-size: 36rpx;
+				color: #fff;
+				text-align center;
+				margin: 0 auto 0;
+			}
+			.passwrod-button-box{
+				line-height:60rpx;
+				width:120rpx;
+				margin:20rpx 0 0 40rpx;
+				color:#333;
+				font-size:24rpx;
+			}
+			/* 供应商注册 */
+			.supplier {
+				display: flex;
+				justify-content: space-between;
+				margin: 30rpx 40rpx 0;
+
+				.supplier_l {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+				}
+
+				.supplier_r {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+
+					>text {
+						color: #0183FA;
+					}
+				}
+			}
+
+			/* 供应商切换 */
+			.switch_btn {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 24rpx;
+				margin-top: 60rpx;
+
+				>img {
+					width: 24rpx;
+					height: 24rpx;
+					margin-left: 12rpx;
+				}
+			}
+		}
+
+		.top-back {
+			z-index: 2;
+			position: absolute;
+			top: 261rpx;
+			left: 375rpx;
+			height: 296rpx;
+			width: 366rpx;
+		}
+	}
+</style>

+ 57 - 467
pages/views/login/login.vue

@@ -1,499 +1,89 @@
-<!-- 登录 -->
 <template>
 	<view id="login">
-		<img class="login-max-big" :src="loginBanner">
-		<view class="login-box">
-			<view class="tabTitle">
-				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
-					<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-					<!-- <view :class="{on:curTab==index}" class="tabTitle_across"></view> -->
-				</view>
-			</view>
-			<view class="input-max-box-one">
-				<view class="input-box">
-					<img :src="imagesUrl('commonality/img_log_in_account.png')">
-					<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
-				</view>
-			</view>
-			<view class="input-max-box-two">
-				<view class="input-box">
-					<img :src="imagesUrl('commonality/img_log_in_password.png')">
-					<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
-				</view>
-			</view>
-			<view class="check-box" @click="checkboxChange()">
-				<img v-if="checkedType" :src="imagesUrl('commonality/icon_13.png')">
-				<img v-if="!checkedType" :src="imagesUrl('commonality/icon_12.png')"/>
-				<view>记住我</view>
-			</view>
-			<view class="button-box" @click="login()">登录</view>
-			<view class="passwrod-button-box" @click="forgotPasswordButton()">忘记密码?</view>
-		</view>
+		<view class="title-1">欢迎使用</view>
+		<view class="title-2">实验室安全智慧化管控系统</view>
+		<view class="null-p"></view>
+		<view class="ssoButton" @click="goPage('ssoLogin')">统一身份认证登录</view>
+		<view class="accountButton" @click="goPage('accountLogin')">账号密码登录</view>
 	</view>
 </template>
 
 <script>
-	import md5 from '@/utils/md5.js'
-	import {
-		config
-	} from '@/api/request/config.js'
-	import {
-		login,
-		configInfo,
-		getConfigByType,
-		systemAppletRolePermission,
-		securityDataStatisticsGetUserIdentity
-	} from '@/pages/api/index.js'
-	import {
-		Encrypt,
-		Decrypt
-	} from '@/utils/secret.js'
 	export default {
+		name: "ssoLogin",
 		data() {
 			return {
-				identityStatus: 1,
-				username: "",
-				password: "",
-				checkedType: false,
-				loginBanner: uni.getStorageSync('loginBanner'),
-				infoList: [], //模板消息Id
-				tabText: ['师生登录'],
-				curTab: 0,
-				pageType: 0,
-				supplierType: false,
+				
 			}
 		},
-
 		onLoad(option) {
-			//供应商注册成功后返回到供应商注册页面
-			if (option.status) {
-				this.identityStatus = 2
-			}
-			if (uni.getStorageSync('userName') && uni.getStorageSync('password')) {
-				this.username = uni.getStorageSync('userName');
-				this.password = uni.getStorageSync('password');
-				this.checkedType = true;
-			}
+			
 		},
-		onShow() {
-			this.getConfigInfo();
+		mounted() {
+
 		},
+
 		methods: {
-			//顶部tab点击
-			tabClick(index) {
-				this.curTab = index;
-			},
-			//跳转忘记密码
-			forgotPasswordButton(){
-				uni.navigateTo({
-					url: '/pages_basics/views/forgotPassword/forgotPassword',
-				});
-			},
-			//登录
-			async login() {
-				let self = this;
-				let obj = {
-					account: this.username,
-					password: md5.hex_md5(this.password),
-				}
-				const {
-					data
-				} = await login(obj)
-				if (data.code == 200) {
-					if(data.data.userType == 0 || data.data.userType == 1 || data.data.userType == 2){
-						uni.setStorageSync('dataBoardType', false);
-						uni.setStorageSync('token', data.data.token);
-						uni.setStorageSync('userId', data.data.userId);
-						uni.setStorageSync('isInitPwd', true);
-						// userType 0-系统 1-教职工 2-学生 3-大屏
-						uni.setStorageSync('userType', data.data.userType == 0 || data.data.userType == 1 ? '1' :
-							(data.data.userType == 2 ? '2' : (data.data.userType == 3 ? '3' : 'none')));
-						if (this.checkedType) {
-							uni.setStorageSync('userName', this.username)
-							uni.setStorageSync('password', this.password)
-						} else {
-							uni.removeStorageSync('userName')
-							uni.removeStorageSync('password')
-						}
-						//等待配置与字段获取到后跳转
-						Promise.all([
-							//获取开发配置
-							this.getConfigByType(),
-							//获取权限字段
-							this.systemAppletRolePermission(),
-							//查询身份
-							this.securityDataStatisticsGetUserIdentity()
-						]).then((result) => {
-							if (uni.getStorageSync('codeData')) {
-								uni.redirectTo({
-									url: '/pages/views/saoCode/saoCode',
-								});
-							} else if (uni.getStorageSync('warningId')) {
-								uni.redirectTo({
-									url: '/pages_basics/views/earlyWarningManage/earlyWarningDetail',
-								});
-							} else {
-								uni.redirectTo({
-									url: '/pages/views/home/home',
-								});
-							}
-						}).catch((error) => {
-							wx.showToast({
-								title: '数据异常,请稍候再试!',
-								icon: "none",
-								duration: 3000
-							});
-						})
-					}else{
-						wx.showToast({
-							title: '非教职工/学生账号,无法登录本系统.',
-							icon: "none",
-							duration: 3000
-						});
-					}
-				}
-			},
-			//获取权限字段
-			async systemAppletRolePermission() {
-				let self = this;
-				const {
-					data
-				} = await systemAppletRolePermission();
-				if (data.code == 200) {
-					uni.setStorageSync('permissions', data.data.data)
-					uni.setStorageSync('controlsRestrict', data.data.roleKeys ? data.data.roleKeys : [])
-					uni.setStorageSync('user', data.data.userInfo)
-				}
-			},
-			switchClick() {
-				if (this.identityStatus == 1) {
-					this.identityStatus = 2;
-				} else {
-					this.identityStatus = 1;
-				}
-			},
-			//查询公共配置
-			async getConfigInfo() {
-				const {
-					data
-				} = await configInfo({
-					type: '1,2,4'
-				});
-				if (data.code == 200) {
-					let list = JSON.parse(data.data)
-					let newData = {};
-					list.forEach((item) => {
-						let obj = JSON.parse(item.configValue)
-						newData = {
-							...newData,
-							...obj
-						}
-					})
-					uni.setStorageSync('circularLogo', config.base_url + newData.circularLogo)
-					uni.setStorageSync('rectangleLogo', config.base_url + newData.rectangleLogo)
-					uni.setStorageSync('videoCover', config.base_url + newData.videoCover)
-					this.$set(this, 'loginBanner', config.base_url + newData.loginBanner);
-					uni.setStorageSync('loginBanner', config.base_url + newData.loginBanner)
-					this.$set(this, 'supplierType', newData.supplier);
-					uni.setStorageSync('supplierType', newData.supplier)
-					uni.setStorageSync('homepageBanner', config.base_url + newData.homepageBanner)
-				}
-			},
-			//获取开发配置
-			async getConfigByType() {
-				const {
-					data
-				} = await getConfigByType({
-					category: 2,
-					configType: 5
-				});
-				if (data.code == 200) {
-					let obj = JSON.parse(data.data.configValue)
-					//文件预览地址
-					uni.setStorageSync('filePreviewUrl', 'https://' + obj.fileExtranetUrl)
-					//小程序视频地址
-					uni.setStorageSync('cameraExtranetAgent', 'https://' + obj.cameraExtranetAgent)
-					//MQTT地址
-					uni.setStorageSync('mqttUrl', Decrypt(obj.mqttExtranetUrl))
-					//MQTT地址-内网
-					uni.setStorageSync('mqttIntranetUrl', Decrypt(obj.mqttIntranetUrl))
-					//MQTT账号
-					uni.setStorageSync('mqttUser', Decrypt(obj.mqttExtranetUser))
-					//MQTT密码
-					uni.setStorageSync('mqttPassword', Decrypt(obj.mqttExtranetPassword))
-					//文件浏览环境
-					uni.setStorageSync('fileBrowseEnvironment','http://'+Decrypt(obj.fileBrowseEnvironment))
-					uni.setStorageSync('fileBrowseEnvironmentExtranet','https://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
-				}
-			},
-			//查询身份
-			async securityDataStatisticsGetUserIdentity(routeUrl) {
-				let self = this;
-				const {
-					data
-				} = await securityDataStatisticsGetUserIdentity();
-				if(data.schoolAdmin){
-					//校级管理员
-					uni.setStorageSync('identityData',{
-						type:'schoolAdmin'
-					});
-				}else if(data.collegeAdmin){
-					//院级管理员
-					uni.setStorageSync('identityData',{
-						type:'collegeAdmin'
+			goPage(type){
+				if(type == 'ssoLogin'){
+					uni.navigateTo({
+						url: '/pages/views/login/ssoLogin'
 					});
-				}else if(data.schoolGroup){
-					//校级督导组
-					uni.setStorageSync('identityData',{
-						type:'schoolGroup',
-						groupIds:data.groupIds
+				}else if(type == 'accountLogin'){
+					uni.navigateTo({
+						url: '/pages/views/login/accountLogin'
 					});
-				}else if(data.collegeGroup){
-					//院级督导组
-					uni.setStorageSync('identityData',{
-						type:'collegeGroup',
-						groupIds:data.groupIds
-					});
-				}else{
-					uni.removeStorageSync('identityData');
 				}
 			},
-			checkboxChange() {
-				this.checkedType = !this.checkedType;
-			},
-
 		},
-
 	}
 </script>
 
 <style lang="stylus" scoped>
-	#login {
+	#login{
 		height: 100%;
 		width: 100%;
-
 		background #f5f5f5;
 		position relative;
-		.login-max-big {
-			width: 750rpx;
-			height: 1177rpx;
-			z-index: 0;
+		display: flex;
+		flex-direction: column;
+		.title-1{
+			font-size:38rpx;
+			line-height:38rpx;
+			height:38rpx;
+			text-align: center;
+			color:#333;
+			margin:200rpx 0 60rpx;
 		}
-
-		.login-box {
-			z-index: 3;
-			position: absolute;
-			top: 430rpx;
-			left: 46rpx;
-			width: 658rpx;
-			height: 700rpx;
-
-			// background #fff
-			/* 切换按钮 */
-			.tabTitle {
-				display flex;
-				width: 100%;
-				height: 100rpx;
-				position: absolute;
-				// top: 50rpx;
-				justify-content: center;
-
-				.tabTitle_li {
-					width: 168rpx;
-					text-align center;
-
-					.tabTitle_text {
-						display: inline-block;
-						font-size: 32rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #333333;
-						line-height: 90rpx;
-
-						&.on {
-							color: #0183FA;
-						}
-					}
-
-					.tabTitle_across {
-						width: 100rpx;
-						height: 4rpx;
-						background: #0183FA;
-						border-radius: 2rpx;
-						margin-left 30rpx;
-						display none;
-
-						&.on {
-							display block;
-						}
-					}
-
-				}
-			}
-
-			border-radius:20rpx;
-
-			.input-max-box-one {
-				overflow: hidden;
-				// margin-top: 68rpx;
-
-				.input-box {
-					display flex;
-					width: 600rpx;
-					height: 80rpx;
-					border: 1rpx solid #e0e0e0;
-					border-radius: 40rpx;
-					margin: 147rpx auto 0;
-
-					img {
-						width: 28rpx;
-						height: 32rpx;
-						margin: 24rpx 31rpx;
-					}
-
-					input {
-						flex: 1;
-						font-size: 24rpx;
-						height: 80rpx;
-						line-height: 80rpx;
-						margin-right: 31rpx;
-					}
-				}
-
-				.text-box {
-					height: 59rpx;
-					line-height: 59rpx;
-					color: #DC1616;
-					font-size: 24rpx;
-					margin-left: 102rpx;
-				}
-			}
-
-			.input-max-box-two {
-				margin-top: 40rpx;
-
-				.input-box {
-					display flex;
-					width: 600rpx;
-					height: 80rpx;
-					border: 1rpx solid #e0e0e0;
-					border-radius: 40rpx;
-					margin: 0 auto 0;
-
-					img {
-						width: 30rpx;
-						height: 32rpx;
-						margin: 24rpx 30rpx;
-					}
-
-					input {
-						flex: 1;
-						font-size: 24rpx;
-						height: 80rpx;
-						line-height: 80rpx;
-						margin-right: 31rpx;
-					}
-				}
-
-				.text-box {
-					height: 59rpx;
-					line-height: 59rpx;
-					color: #DC1616;
-					font-size: 24rpx;
-					margin-left: 102rpx;
-				}
-			}
-
-			.check-box {
-				margin: 30rpx 0 30rpx 104rpx;
-				width: 300rpx;
-				height: 50rpx;
-				display: flex;
-
-				img {
-					margin-top: 10rpx;
-					width: 32rpx;
-					height: 32rpx;
-					margin-right: 10rpx;
-				}
-
-				view {
-					font-size: 24rpx;
-					line-height: 50rpx;
-				}
-			}
-
-			.button-box {
-				width: 600rpx;
-				line-height: 80rpx;
-				background: #0183FA;
-				border-radius: 40rpx;
-				font-size: 36rpx;
-				color: #fff;
-				text-align center;
-				margin: 0 auto 0;
-			}
-			.passwrod-button-box{
-				line-height:60rpx;
-				width:120rpx;
-				margin:20rpx 0 0 40rpx;
-				color:#333;
-				font-size:24rpx;
-			}
-			/* 供应商注册 */
-			.supplier {
-				display: flex;
-				justify-content: space-between;
-				margin: 30rpx 40rpx 0;
-
-				.supplier_l {
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 400;
-					color: #333333;
-					line-height: 24rpx;
-				}
-
-				.supplier_r {
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 400;
-					color: #333333;
-					line-height: 24rpx;
-
-					>text {
-						color: #0183FA;
-					}
-				}
-			}
-
-			/* 供应商切换 */
-			.switch_btn {
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 400;
-				color: #0183FA;
-				line-height: 24rpx;
-				margin-top: 60rpx;
-
-				>img {
-					width: 24rpx;
-					height: 24rpx;
-					margin-left: 12rpx;
-				}
-			}
+		.title-2{
+			font-size:40rpx;
+			line-height:40rpx;
+			height:40rpx;
+			text-align: center;
+			color:#0183fa;
 		}
-
-		.top-back {
-			z-index: 2;
-			position: absolute;
-			top: 261rpx;
-			left: 375rpx;
-			height: 296rpx;
-			width: 366rpx;
+		.null-p{
+			flex:1;
+		}
+		.ssoButton{
+			width:650rpx;
+			height:80rpx;
+			line-height:80rpx;
+			text-align: center;
+			background-color:#0183fa;
+			color:#fff;
+			font-size:32rpx;
+			margin:0 auto 200rpx;
+			border-radius:50rpx;
+		}
+		.accountButton{
+			width:200;
+			height:80rpx;
+			line-height:80rpx;
+			text-align: center;
+			color:#0183fa;
+			font-size:28rpx;
+			margin:0 auto 50rpx;
 		}
 	}
-</style>
+</style>

+ 22 - 6
pages/views/login/ssoCertification.vue

@@ -28,15 +28,24 @@
 			}
 		},
 		onLoad(option) {
-			console.log('option=>',option);
 			if(option.token){
 				uni.setStorageSync('token', option.token);
 				//获取登录人信息接口
 				this.authGetAppletUser();
 			}else{
-				uni.redirectTo({
-					url: '/pages/views/login/ssoLogin',
+				uni.showToast({
+					mask: true,
+					icon: "none",
+					position: "center",
+					title: '数据异常,请稍候再试!',
+					duration: 2000
 				});
+				setTimeout(function() {
+					uni.redirectTo({
+						url: '/pages/views/login/login',
+					});
+				}, 2000);
+				
 			}
 		},
 		mounted() {
@@ -79,11 +88,18 @@
 							});
 						}
 					}).catch((error) => {
-						wx.showToast({
-							title: '数据异常,请稍候再试!',
+						uni.showToast({
+							mask: true,
 							icon: "none",
-							duration: 3000
+							position: "center",
+							title: '数据异常,请稍候再试!',
+							duration: 2000
 						});
+						setTimeout(function() {
+							uni.redirectTo({
+								url: '/pages/views/login/login',
+							});
+						}, 2000);
 					})
 				}else{
 					uni.redirectTo({

+ 10 - 7
pages/views/login/ssoLogin.vue

@@ -2,8 +2,8 @@
 <template>
 	<view id="ssoLogin">
 		<web-view @message="handleMessage"
-		src="http://192.168.1.10:80/#/miniProgramAuthentication?token=41cd8b02-f612-4dd5-abbd-efb5c45d69ad">
-		<!-- src="https://labcontrol.nwafu.edu.cn/stream/#/miniProgramAuthentication"> -->
+		src="https://labcontrol.nwafu.edu.cn/stream/#/miniProgramAuthentication">
+		<!-- src="http://192.168.1.10:80/#/miniProgramAuthentication?token=41cd8b02-f612-4dd5-abbd-efb5c45d69ad"> -->
 		</web-view>
 	</view>
 </template>
@@ -20,15 +20,18 @@
 			
 		},
 		mounted() {
-
+			const pages = getCurrentPages();
+			const currentPage = pages[pages.length - 1];
+			const prevPage = pages[pages.length - 2];
+			if (prevPage && prevPage.route === 'pages/views/login/ssoCertification') {
+				uni.redirectTo({
+					url: '/pages/views/login/login',
+				});
+			}
 		},
-
 		methods: {
 			handleMessage(e) {
-				// console.log('e>>>>>', e);
 				const receivedData = e.detail.data; // 接收到的数据
-				// console.log('收到H5消息:', receivedData);
-				// 处理数据逻辑...
 			}
 		},
 	}

+ 1 - 4
pages/views/pupilPage/pupilMine.vue

@@ -237,11 +237,8 @@
 					uni.removeStorageSync('token');
 					uni.removeStorageSync('userId');
 					uni.removeStorageSync('userType');
-					// uni.redirectTo({
-					// 	url: '/pages/views/login/login',
-					// });
 					uni.redirectTo({
-						url: '/pages/views/login/ssoLogin',
+						url: '/pages/views/login/login',
 					});
 				}
 			},

+ 2 - 5
pages/views/saoCode/saoCode.vue

@@ -36,11 +36,8 @@
 				})
 				if (!uni.getStorageSync('token')) {
 					uni.setStorageSync('codeData', codeData);
-					// uni.reLaunch({
-					// 	url: '/pages/views/login/login',
-					// });
-					uni.redirectTo({
-						url: '/pages/views/login/ssoLogin',
+					uni.reLaunch({
+						url: '/pages/views/login/login',
 					});
 				} else {
 					//二维码功能识别

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

@@ -257,11 +257,8 @@
 					uni.removeStorageSync('token');
 					uni.removeStorageSync('userId');
 					uni.removeStorageSync('userType');
-					// uni.redirectTo({
-					// 	url: '/pages/views/login/login',
-					// });
 					uni.redirectTo({
-						url: '/pages/views/login/ssoLogin',
+						url: '/pages/views/login/login',
 					});
 				}
 			},

+ 1 - 4
pages_basics/views/earlyWarningManage/earlyWarningDetail.vue

@@ -277,11 +277,8 @@
 					uni.setStorageSync('warningId', option.id);
 					uni.setStorageSync('warnType', '4');
 				}
-				// uni.redirectTo({
-				// 	url: '/pages/views/login/login',
-				// });
 				uni.redirectTo({
-					url: '/pages/views/login/ssoLogin',
+					url: '/pages/views/login/login',
 				});
 			} else {
 				if (option.noticeId) {

+ 2 - 8
pages_student/views/integralManage/codeSuccess.vue

@@ -69,11 +69,8 @@
 					uni.setStorageSync('sid', this.sid);
 					uni.setStorageSync('pid', this.pid);
 					uni.setStorageSync('pri', this.pri);
-					// uni.redirectTo({
-					// 	url: '/pages/views/login/login',
-					// });
 					uni.redirectTo({
-						url: '/pages/views/login/ssoLogin',
+						url: '/pages/views/login/login',
 					});
 					return
 				}
@@ -84,11 +81,8 @@
 					uni.setStorageSync('sid', this.sid);
 					uni.setStorageSync('pid', this.pid);
 					uni.setStorageSync('pri', this.pri);
-					// uni.redirectTo({
-					// 	url: '/pages/views/login/login',
-					// });
 					uni.redirectTo({
-						url: '/pages/views/login/ssoLogin',
+						url: '/pages/views/login/login',
 					});
 					return
 				}