master
2023-02-10 17:55:52 +08:00
parent dc15439861
commit fc5a6a6f7f
1 changed files with 12 additions and 24 deletions

View File

@ -228,7 +228,7 @@ export default {
uni.closeSocket(); uni.closeSocket();
} }
}, },
onReady (options) { onLoad (options) {
// goodsid // goodsid
this.showHideModel = options.goodsid this.showHideModel = options.goodsid
// localimGoodId // localimGoodId
@ -283,9 +283,6 @@ export default {
onHide () { onHide () {
uni.closeSocket(); uni.closeSocket();
}, },
onUnload () {
uni.closeSocket();
},
onPullDownRefresh () { onPullDownRefresh () {
this.params.pageNumber = this.params.pageNumber + 1 this.params.pageNumber = this.params.pageNumber + 1
this.getTalkMessage() this.getTalkMessage()
@ -363,17 +360,12 @@ export default {
let data = JSON.stringify(msg); let data = JSON.stringify(msg);
uni.sendSocketMessage({ uni.sendSocketMessage({
data: data, data: data,
success: () => { });
this.msgList.push({ this.msgList.push({
"text": this.msg, "text": this.msg,
"my": true, "my": true,
"messageType": 'MESSAGE' "messageType": 'MESSAGE'
}) })
},
fail: () => {
this.sokcet()
}
});
let type = 'down'; let type = 'down';
this.msgGo(type) this.msgGo(type)
this.msg = "" this.msg = ""
@ -390,17 +382,12 @@ export default {
let data = JSON.stringify(msg); let data = JSON.stringify(msg);
uni.sendSocketMessage({ uni.sendSocketMessage({
data: data, data: data,
success: () => { });
this.msgList.push({ this.msgList.push({
"text": JSON.stringify(this.goodListData), "text": JSON.stringify(this.goodListData),
"my": true, "my": true,
"messageType": 'GOODS' "messageType": 'GOODS'
}) })
},
fail: () => {
this.sokcet()
}
});
this.showHide = false this.showHide = false
// #ifdef H5 // #ifdef H5
uni.setStorageSync("imGoodId", 1111111); uni.setStorageSync("imGoodId", 1111111);
@ -442,6 +429,7 @@ export default {
} else { } else {
uni.closeSocket(); uni.closeSocket();
} }
this.count++
}); });
} }
// //