dedsudiyu 1 mese fa
parent
commit
662635794a
2 ha cambiato i file con 34 aggiunte e 1 eliminazioni
  1. 8 1
      pages/api/index.js
  2. 26 0
      pages/views/saoCode/saoCode.vue

+ 8 - 1
pages/api/index.js

@@ -393,7 +393,14 @@ export const chemicalAioVerifyAppletLogin  = (data) => {
 		data: data,
 	})
 };
-
+//电子信息牌二维码-小程序扫码验证
+export const appBoardScanCodeVerification  = (data) => {
+	return apiResquest({
+		url: `/app/board/scanCodeVerification`,
+		method: 'GET',
+		data: data,
+	})
+};
 
 /************************消息相关************************/
 

+ 26 - 0
pages/views/saoCode/saoCode.vue

@@ -12,6 +12,7 @@
 	import {
 		chemicalAioVerifyScanLogin,
 		chemicalAioVerifyAppletLogin,
+		appBoardScanCodeVerification,
 		laboratoryAppletGetSubDetailInfo
 	} from '@/pages/api/index.js'
 	export default {
@@ -77,6 +78,9 @@
 					} else if (codeData.type == 12) {
 						//化学品终端-双人认证
 						this.chemicalAioVerifyAppletLogin(codeData.doorId, codeData.subId, codeData.macId, codeData.code);
+					} else if (codeData.type == 13) {
+						//电子信息牌二维码-小程序扫码验证
+						this.appBoardScanCodeVerification(codeData.macId, codeData.subId);
 					} else if (codeData.type == 7) {
 						//培训课程
 						uni.reLaunch({
@@ -176,6 +180,28 @@
 					});
 				}, 2000);
 			},
+			//电子信息牌二维码-小程序扫码验证
+			async appBoardScanCodeVerification(macId, subId) {
+				const {
+					data
+				} = await appBoardScanCodeVerification({
+					macId: macId,
+					subId: subId,
+					userId: uni.getStorageSync('userId'),
+				});
+				uni.showToast({
+					mask: true,
+					icon: "none",
+					position: "center",
+					title: data.message,
+					duration: 2000
+				});
+				setTimeout(function() {
+					uni.reLaunch({
+						url: '/pages/views/mine/mine',
+					});
+				}, 2000);
+			},
 			//实验室详情-跳转
 			async laboratoryAppletGetSubDetailInfo(infoId) {
 				const {