Browse Source

fix(news): 解决验证失败时返回错误信息问题

- 添加 JSON 响应头确保正确的内容类型
- 设置 UTF-8 字符编码以支持中文字符
- 确保验证失败时能够正确返回错误信息
master
zhangf@suq.cn 2 days ago
parent
commit
503ec59c27
  1. 2
      member/xunliuAddNews.php

2
member/xunliuAddNews.php

@ -79,6 +79,8 @@ if($do->pass($post)) {
if(isset($post['sync_sina']) && $post['sync_sina']) {
$js .= sync_weibo('sina', $moduleid, $do->itemid);
}
// 验证失败时返回错误信息
header('Content-Type: application/json; charset=utf-8');
echo '{"success":true,"itemid":' . $do->itemid . '}';
}
?>
Loading…
Cancel
Save