请问这种响应体该怎么写?
Closed this issue · 1 comments
kai2ou commented
{ "status" : "success", "messaage" : "签到成功,系统送您 4073M 流量" }
alpha87 commented
$task.fetch(Req).then(response => {
try {
let doc = JSON.parse(response.body);
if (doc["status"] == "success") {
$notify("机场名称", "成功", doc["messaage"]);
} else {
$notify("机场名称", "失败", doc["messaage"]);
}
} catch (error) {
$notify("机场名称", "失败", error);
}
});
检查一下返回的响应体是 messaage 还是 message