提交 a9b1b8be 编写于 作者: Z zha wei

description:说明文档格式修改

Signed-off-by: Nzha wei <zhawei@kaihong.com>
上级 3e67c30b
...@@ -66,7 +66,7 @@ try { ...@@ -66,7 +66,7 @@ try {
this.nfcSEService = secureElement.newSEService("serviceState", (state) => this.nfcSEService = secureElement.newSEService("serviceState", (state) =>
{ {
if (state == secureElement.ServiceState.DISCONNECTED) { if (state == secureElement.ServiceState.DISCONNECTED) {
this.result = "Service state is Disconnected"; this.result = "Service state is Disconnected";
} else { } else {
this.result = "Service state is connected"; this.result = "Service state is connected";
} }
...@@ -109,7 +109,8 @@ import secureElement from '@ohos.secureElement'; ...@@ -109,7 +109,8 @@ import secureElement from '@ohos.secureElement';
// get SEService // get SEService
try { try {
this.nfcSEService = secureElement.newSEService("serviceState", (state) => { this.nfcSEService = secureElement.newSEService("serviceState", (state) =>
{
if (state == secureElement.ServiceState.DISCONNECTED) { if (state == secureElement.ServiceState.DISCONNECTED) {
this.result = "Service state is Disconnected"; this.result = "Service state is Disconnected";
} else { } else {
...@@ -160,7 +161,7 @@ import secureElement from '@ohos.secureElement'; ...@@ -160,7 +161,7 @@ import secureElement from '@ohos.secureElement';
try { try {
let ret: boolean; let ret: boolean;
// 有效this.nfcSEService,获取方式参考newService // 有效this.nfcSEService,获取方式参考newSEService
ret = this.nfcSEService.isConnected(); ret = this.nfcSEService.isConnected();
if (ret) { if (ret) {
this.result = '获取连接状态:connected'; this.result = '获取连接状态:connected';
...@@ -202,7 +203,7 @@ import secureElement from '@ohos.secureElement'; ...@@ -202,7 +203,7 @@ import secureElement from '@ohos.secureElement';
@State nfcSEService: secureElement.SEService = null; @State nfcSEService: secureElement.SEService = null;
try { try {
// 有效this.nfcSEService,获取方式参考newService // 有效this.nfcSEService,获取方式参考newSEService
this.nfcSEService.shutdown(); this.nfcSEService.shutdown();
this.result = "shutdown成功"; this.result = "shutdown成功";
} catch (e) { } catch (e) {
...@@ -241,7 +242,7 @@ import secureElement from '@ohos.secureElement'; ...@@ -241,7 +242,7 @@ import secureElement from '@ohos.secureElement';
this.result = "版本名称:" this.result = "版本名称:"
try { try {
// 有效this.nfcSEService,获取方式参考newService // 有效this.nfcSEService,获取方式参考newSEService
this.result += this.nfcSEService.getVersion(); this.result += this.nfcSEService.getVersion();
} catch (e) { } catch (e) {
this.result += "getVersion异常:" + e.message; this.result += "getVersion异常:" + e.message;
...@@ -745,12 +746,12 @@ aidArray: number[] = [720, 1080] ...@@ -745,12 +746,12 @@ aidArray: number[] = [720, 1080]
try { try {
// this.nfcOmaSession:有效的Session,获取方式参考Reader.openSession // this.nfcOmaSession:有效的Session,获取方式参考Reader.openSession
this.nfcOmaSession.openBasicChannel(this.aidArray, (error, data) => { this.nfcOmaSession.openBasicChannel(this.aidArray, (error, data) => {
if (error) { if (error) {
this.result = "openBasicChannel2失败:" + JSON.stringify(error); this.result = "openBasicChannel2失败:" + JSON.stringify(error);
return; return;
} }
this.nfcOmaChannel = data; this.nfcOmaChannel = data;
this.result = "openBasicChannel2获取channel成功"; this.result = "openBasicChannel2获取channel成功";
}); });
} catch (e) { } catch (e) {
this.result = "openBasicChannel2出现异常:" + e.message; this.result = "openBasicChannel2出现异常:" + e.message;
...@@ -1057,8 +1058,8 @@ if (this.nfcOmaSession) { ...@@ -1057,8 +1058,8 @@ if (this.nfcOmaSession) {
this.nfcOmaChannel = channel; this.nfcOmaChannel = channel;
this.result = "openLogicChannel3获取channel成功"; this.result = "openLogicChannel3获取channel成功";
}).catch((err) => { }).catch((err) => {
this.result = "openLogicChannel3 出现异常"; this.result = "openLogicChannel3 出现异常";
}); });
} catch (e) { } catch (e) {
this.result = "openLogicChannel3出现异常:" + e.message; this.result = "openLogicChannel3出现异常:" + e.message;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册