dedsudiyu hai 3 meses
pai
achega
89336ba862
Modificáronse 4 ficheiros con 75 adicións e 16 borrados
  1. 5 1
      api/request/config.js
  2. 17 10
      pages.json
  3. 48 0
      pages/views/login/ssoCertification.vue
  4. 5 5
      pages_basics/views/demo.vue

+ 5 - 1
api/request/config.js

@@ -28,7 +28,11 @@ const config = {
 	// base_url: 'https://metersphere.zjznai.com/labSystem/', //中国海关
 	
 	/****** 图片服务地址(imagesUrl.styl 文件内还需要配置一次css相关地址注意是否与imagesUrl.styl一致) ******/
-	imagesUrl: 'https://zj-wechat.oss-cn-beijing.aliyuncs.com/xcx_images/xcx_v3/'
+	imagesUrl: 'https://zj-wechat.oss-cn-beijing.aliyuncs.com/xcx_images/xcx_v3/',
+	/****** 登录方式 ******/
+	//account 账户登录
+	//certification 统一认证登录
+	loginType:'account',
 }
 export {
 	config

+ 17 - 10
pages.json

@@ -17,6 +17,22 @@
 			}
 		},
 		{
+			"path": "pages/views/login/ssoLogin", //统一认证页面
+			"style": {
+				"navigationBarTitleText": "统一身份认证",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
+		{
+			"path": "pages/views/login/ssoCertification", //统一认证后跳转登录页面
+			"style": {
+				"navigationBarTitleText": "身份认证",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
+		{
 			"path": "pages/views/dataBoard/dataBoard",
 			"style": {
 				"navigationBarTitleText": "",
@@ -135,16 +151,7 @@
 			/* 基础分包 */
 			"root": "pages_basics", //分包根路径
 			"name": "basics", //分包名字可写可不写
-			"pages": [
-				{
-					"path": "views/demo", //忘记密码
-					"style": {
-						"navigationBarTitleText": "测试",
-						"navigationBarTextStyle": "white", //导航文字颜色
-						"navigationBarBackgroundColor": "#0183FA" //导航背景色
-					}
-				},
-				{
+			"pages": [{
 					"path": "views/forgotPassword/forgotPassword", //忘记密码
 					"style": {
 						"navigationBarTitleText": "忘记密码",

+ 48 - 0
pages/views/login/ssoCertification.vue

@@ -0,0 +1,48 @@
+<!--扫描二维码页面-->
+<template>
+	<view id="ssoCertification">
+		登录中请稍后
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "ssoCertification",
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(option) {
+			console.log('option=>',option);
+			if(option.token){
+				uni.setStorageSync('token', option.token);
+				//获取登录人信息接口
+				this.getUserInfo();
+			}else{
+				uni.redirectTo({
+					url: '/pages/views/login/ssoLogin',
+				});
+			}
+		},
+		mounted() {
+
+		},
+
+		methods: {
+			getUserInfo(){
+				
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#ssoCertification {
+		width:100%;
+		height:100%;
+		overflow:scroll;
+		text-align: center;
+		line-height:200rpx;
+	}
+</style>

+ 5 - 5
pages_basics/views/demo.vue

@@ -1,6 +1,6 @@
 <!--扫描二维码页面-->
 <template>
-	<view id="demo-view-page">
+	<view id="ssoLogin">
 		<web-view @message="handleMessage"
 		:src="'http://192.168.1.10/#/miniProgramAuthentication?token='+'11112222'">
 		</web-view>
@@ -9,7 +9,7 @@
 
 <script>
 	export default {
-		name: "demo",
+		name: "ssoLogin",
 		data() {
 			return {
 				
@@ -24,9 +24,9 @@
 
 		methods: {
 			handleMessage(e) {
-				console.log('e>>>>>', e);
+				// console.log('e>>>>>', e);
 				const receivedData = e.detail.data; // 接收到的数据
-				console.log('收到H5消息:', receivedData);
+				// console.log('收到H5消息:', receivedData);
 				// 处理数据逻辑...
 			}
 		},
@@ -34,7 +34,7 @@
 </script>
 
 <style lang="stylus" scoped>
-	#demo-view-page {
+	#ssoLogin {
 		width:100%;
 		height:100%;
 		overflow:scroll;