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

fix: 判空处理

上级 b5a3deff
......@@ -23,10 +23,11 @@
}
},
onLoad(event) {
// console.log(event);
this.post_id = event["post_id"] ?? "";
this.cover = event["cover"] ?? "";
this.title = event["title"] ?? "";
if (event != null) {
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.
先完成此消息的编辑!
想要评论请 注册