略微完善注释与逻辑

master
Chopper711 2023-02-10 14:29:18 +08:00
parent 63ebf1a7c5
commit 44cf46fed3
1 changed files with 8 additions and 6 deletions

View File

@ -228,7 +228,7 @@ export default {
uni.closeSocket();
}
},
onLoad (options) {
onReady (options) {
// goodsid
this.showHideModel = options.goodsid
// localimGoodId
@ -318,8 +318,7 @@ export default {
scrollHeight: 0,
ws: new SocketService(),
resolve: {},
goodListData: {},
count: 0
goodListData: {}
}
},
// watch: {
@ -417,15 +416,15 @@ export default {
if (!this.socketOpen) {
//
uni.onSocketError(function (err) {
if (this.count < 3) {
if (err && err.code !== 1000) {
//线3
setTimeout(()=>{},3000)
_this.socketOpen = true;
uni.connectSocket({
url: url,
});
}
}
this.count++
});
}
//
@ -452,7 +451,10 @@ export default {
})
} catch (e) {
}
}finally{
uni.closeSocket()
}
},
beautifyTime,