diff --git a/entry/src/main/ets/common/utils/tempRequest.ts b/entry/src/main/ets/common/utils/tempRequest.ts index add30a7d..2ec7c0a8 100644 --- a/entry/src/main/ets/common/utils/tempRequest.ts +++ b/entry/src/main/ets/common/utils/tempRequest.ts @@ -1,10 +1,6 @@ import http from '@ohos.net.http'; import convertxml from '@ohos.convertxml'; -import prompt from '@ohos.prompt' -import { sendGreen } from '../../pages/judgeSDK/utils/judgeCommon'; -import { GlobalConfig } from '../../config/index' -import FileUtil from '../../common/utils/File'; -import { dateFormat } from '../utils/tools' +import prompt from '@ohos.prompt'; import Prompt from '@system.prompt'; @@ -95,10 +91,10 @@ export default async function tempRequest(req: any): Promise { } }).catch(Error => { console.info('test-error0' + url + ' error:resp: ' + JSON.stringify(Error.message)) - Prompt.showToast({ - message: Error?.message=='Failure when receiving data from the peer'?'网络异常,请重试':Error?.message, - duration: 5000 - }); + // Prompt.showToast({ + // message: Error?.message == 'Failure when receiving data from the peer' ? '网络异常,请重试' : Error?.message, + // duration: 5000 + // }); reject(Error) }) @@ -110,10 +106,10 @@ export default async function tempRequest(req: any): Promise { code: -1 }) } - Prompt.showToast({ - message: e?.message=='Failure when receiving data from the peer'?'网络异常,请重试':e?.message, - duration: 5000 - }); + // Prompt.showToast({ + // message: e?.message=='Failure when receiving data from the peer'?'网络异常,请重试':e?.message, + // duration: 5000 + // }); reject({ code: e.code }) @@ -123,7 +119,6 @@ export default async function tempRequest(req: any): Promise { } - //xml格式转JSON function xmlToJson(result, url) { console.log("xmlToJson begin", url);