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

fix: 去除警告

上级 05ec03c2
...@@ -74,11 +74,13 @@ ...@@ -74,11 +74,13 @@
}) })
uni.connectSocket({ uni.connectSocket({
url: 'ws://websocket.dcloud.net.cn', url: 'ws://websocket.dcloud.net.cn',
success: (res : any) => { header: null,
protocols: null,
success: (res: any) => {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意 // 这里是接口调用成功的回调,不是连接成功的回调,请注意
console.log('uni.connectSocket success', res) console.log('uni.connectSocket success', res)
}, },
fail: (err : any) => { fail: (err: any) => {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意 // 这里是接口调用失败的回调,不是连接失败的回调,请注意
console.log('uni.connectSocket fail', err) console.log('uni.connectSocket fail', err)
}, },
......
...@@ -23,11 +23,9 @@ ...@@ -23,11 +23,9 @@
} }
}, },
onLoad(event: OnLoadOptions) { onLoad(event: OnLoadOptions) {
if (event != null) {
this.post_id = event["post_id"] ?? ""; this.post_id = event["post_id"] ?? "";
this.cover = event["cover"] ?? ""; this.cover = event["cover"] ?? "";
this.title = event["title"] ?? ""; this.title = event["title"] ?? "";
}
this.getDetail(); this.getDetail();
}, },
methods: { methods: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册