代码语言:javascript复制以JOE主题为例,其他主题可以参考目录寻找对应文件 修改 /usr/themes/Joe/core/route.php
if (sizeof($row) > 0) {
// if ($type === "agree") {
// $db->query($db->update('table.contents')->rows(array('agree' => (int)$row['agree'] 1))->where('cid = ?', $cid));
// } else {
// $db->query($db->update('table.contents')->rows(array('agree' => (int)$row['agree'] - 1))->where('cid = ?', $cid));
// }
$db->query($db->update('table.contents')->rows(array('agree' => (int)$row['agree'] 1))->where('cid = ?', $cid));
$self->response->throwJson(array(
"code" => 1,
"data" => array('agree' => number_format($db->fetchRow($db->select('agree')->from('table.contents')->where('cid = ?', $cid))['agree']))
));
} else {
$self->response->throwJson(array("code" => 0, "data" => null));
}
找不到上面的文件可以搜索关键词