Compare commits

..

No commits in common. "7dfc959aa2faa54956cd297cbbc38d412b00d3ca" and "7c57ba3e936d43a7a8c51e577d74cb17f1f679c1" have entirely different histories.

5 changed files with 13 additions and 4 deletions

View File

@ -109,6 +109,12 @@ export async function writeObjectOut(params, filePath?: string): Promise<WR> {
await fileUtil.initFolder(filePath);
fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`, JSON.stringify(temp) + `\n`);
}
// const {code} = temp;
// if(code == '2300007' || code == '2300028'){
// return await writeObjectOut(params,filePath)
// }else{
// return temp
// }
return temp
}

View File

@ -17,7 +17,7 @@ export default class TcpClient {
//重连次数
private folderPath
private tcp: socket.TCPSocket = null
private tcp: any = null
constructor(tcplocalIp: string, tcplocalIpPort: string, tcpOppositeIp: string, tcpOppositePort: string) {
this.localIp = tcplocalIp
@ -65,7 +65,7 @@ export default class TcpClient {
this.tcp.connect({
address: {
address: this.oppositeIp, port: Number(this.oppositeIpPort), family: 1
}, timeout: 1000 * 15
}, timeout: 6000
}).then(() => {
this.tcp.setExtraOptions({
keepAlive: true,
@ -148,7 +148,7 @@ export default class TcpClient {
offTcp(callback) {
console.log(TAG, 'tcpofff')
this.tcp.off('message', callback);
this.tcp.off('testTagofmessg', callback);
}
closeTcp(callback) {

View File

@ -342,6 +342,9 @@ export default struct SignDisplayCom {
}
async aboutToAppear() {
// const fileUtil = new FileUtil(globalThis.context)
// const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt')
// this.udplocalIp=JSON.parse(data)?.udplocalIp||'192.168.7.170'
this.ratio = this.ratio * (this.scaleNum || 1);
const {showBack,getSignal} = this

View File

@ -607,7 +607,7 @@ export default class Judge {
const temp = await writeObjectOut(data, filePath);
console.log("wzj", JSON.stringify(temp))
//断网&网络超时次数计算
if (temp.code != 1) {
if (temp.code == 2300007 || temp.code == 2300028) {
this.disConnectNum += 1;
if (this.disConnectNum < 5) {
return await this.sendWriteObjectOut(data, filePath)