作者 lyh

变更数据

... ... @@ -85,15 +85,14 @@ class GeoController extends BaseController
if ($info === false){
return $this->error('非法请求');
}
if ($info['status'] != GeoWritings::STATUS_RUNNING){
if ($info['status'] == GeoWritings::STATUS_FINISH){
return $this->error('当前文章已确认,不可再次确认');
}
$this->param['confirm_ip'] = $this->request->ip();
$this->param['confirm_at'] = date('Y-m-d H:i:s');
$this->param['content_length'] = strlen($this->param['content']);
$this->param['status'] = 3;
$this->param['status'] = GeoWritings::STATUS_FINISH;
$geoWritingsModel->edit($this->param,['uniqid' => $token]);
// FIXME 验证完成,保存数据,计算内容长度,处理内容中的资源, IP 确认时间 状态
return true;
}
... ...
... ... @@ -49,6 +49,7 @@ class GeoWritingsLogic extends BaseLogic
*/
public function saveWriting(){
try {
$this->param['status'] = GeoWritings::STATUS_INIT;
if(isset($this->param['id']) &&!empty($this->param['id'])){
$id = $this->param['id'];
$this->model->edit($this->param,['id'=>$id]);
... ...