fix: 更新 examJudgeRealExam 和 examJudgeBeginExam 函数的参数类型,提升代码一致性
This commit is contained in:
parent
78ed717b9e
commit
175f9273c9
@ -1,5 +1,5 @@
|
|||||||
import libJudgeSdk from 'libjudgesdk.so';
|
import libJudgeSdk from 'libjudgesdk.so';
|
||||||
import { JudgeInitObj } from '../../../model';
|
import { JudgeBeginObj, JudgeInitObj, Plc } from '../../../model';
|
||||||
|
|
||||||
// import libJudgeSdk from '@ohos.judgesdk'
|
// import libJudgeSdk from '@ohos.judgesdk'
|
||||||
/**
|
/**
|
||||||
@ -44,7 +44,7 @@ export async function examJudgeInit(data: JudgeInitObj) {
|
|||||||
*
|
*
|
||||||
* @desc 执行实时考试过程 实时传递传感信息
|
* @desc 执行实时考试过程 实时传递传感信息
|
||||||
*/
|
*/
|
||||||
export async function examJudgeRealExam(data) {
|
export async function examJudgeRealExam(data: Plc) {
|
||||||
const str = JSON.stringify(data);
|
const str = JSON.stringify(data);
|
||||||
const temp: number = libJudgeSdk.examJudgeRealExam(str, str.length);
|
const temp: number = libJudgeSdk.examJudgeRealExam(str, str.length);
|
||||||
return await handle(temp, 'examJudgeRealExam')
|
return await handle(temp, 'examJudgeRealExam')
|
||||||
@ -115,7 +115,7 @@ export async function examJudgeMapSetDrawing(bool: boolean) {
|
|||||||
*
|
*
|
||||||
* @desc开始考试
|
* @desc开始考试
|
||||||
*/
|
*/
|
||||||
export async function examJudgeBeginExam(data) {
|
export async function examJudgeBeginExam(data: JudgeBeginObj) {
|
||||||
const str = JSON.stringify(data);
|
const str = JSON.stringify(data);
|
||||||
const temp: number = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
const temp: number = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
||||||
return await handle(temp, 'examJudgeBeginExam')
|
return await handle(temp, 'examJudgeBeginExam')
|
||||||
@ -169,7 +169,7 @@ export async function examJudgeMapSetScaling(scaling?: number) {
|
|||||||
*@desc设置考试过程数据回调
|
*@desc设置考试过程数据回调
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeSetPerformCallback(fn) {
|
export async function examJudgeSetPerformCallback(fn: Function) {
|
||||||
const temp: number = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
const temp: number = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
||||||
return await handle(temp, 'examJudgeSetPerformCallback')
|
return await handle(temp, 'examJudgeSetPerformCallback')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user