提交 78305075 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

fix: 去除警告

上级 05ec03c2
......@@ -72,16 +72,18 @@
uni.showLoading({
title: '连接中...',
})
uni.connectSocket({
url: 'ws://websocket.dcloud.net.cn',
success: (res : any) => {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
console.log('uni.connectSocket success', res)
},
fail: (err : any) => {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
console.log('uni.connectSocket fail', err)
},
uni.connectSocket({
url: 'ws://websocket.dcloud.net.cn',
header: null,
protocols: null,
success: (res: any) => {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
console.log('uni.connectSocket success', res)
},
fail: (err: any) => {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
console.log('uni.connectSocket fail', err)
},
})
uni.onSocketOpen((res) => {
this.connecting = false
......@@ -170,4 +172,4 @@
line-height: 24px;
color: #666666;
}
</style>
\ No newline at end of file
</style>
......@@ -23,11 +23,9 @@
}
},
onLoad(event: OnLoadOptions) {
if (event != null) {
this.post_id = event["post_id"] ?? "";
this.cover = event["cover"] ?? "";
this.title = event["title"] ?? "";
}
this.post_id = event["post_id"] ?? "";
this.cover = event["cover"] ?? "";
this.title = event["title"] ?? "";
this.getDetail();
},
methods: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册