diff --git a/entry/src/main/ets/common/utils/TcpClient.ts b/entry/src/main/ets/common/utils/TcpClient.ts index 61889fa8..7fcb893c 100644 --- a/entry/src/main/ets/common/utils/TcpClient.ts +++ b/entry/src/main/ets/common/utils/TcpClient.ts @@ -1,10 +1,9 @@ import socket from '@ohos.net.socket'; import hilog from '@ohos.hilog'; import { getTCP } from './GlobalTcp'; -import prompt from '@ohos.prompt'; import FileUtil from './File'; import { dateFormat } from './tools'; - +import Prompt from '@system.prompt'; const TAG = 'socketTag[TcpDemo.TcpClient]' export default class TcpClient { @@ -187,7 +186,7 @@ export default class TcpClient { if (globalThis.tcpUdpError) { console.log(TAG,'tcp信号丢失') // getTCP() - prompt.showToast({ + Prompt.showToast({ message: 'tcp信号丢失', duration: 2000 });