|
...
|
...
|
@@ -80,13 +80,20 @@ class GeoController extends BaseController |
|
|
|
'content.max' => '内容过长保存失败',
|
|
|
|
]);
|
|
|
|
$token = trim($this->param['token']);
|
|
|
|
$data = GeoWritings::where(['uniqid' => $token])->first();
|
|
|
|
if (empty($data)){
|
|
|
|
$geoWritingsModel = new GeoWritings();
|
|
|
|
$info = $geoWritingsModel->read(['uniqid' => $token]);
|
|
|
|
if ($info === false){
|
|
|
|
return $this->error('非法请求');
|
|
|
|
}
|
|
|
|
if ($data->status != GeoWritings::STATUS_RUNNING){
|
|
|
|
if ($info['status'] != GeoWritings::STATUS_RUNNING){
|
|
|
|
return $this->error('当前文章已确认,不可再次确认');
|
|
|
|
}
|
|
|
|
$param = [
|
|
|
|
'confirm_ip'=>$this->request->ip(),
|
|
|
|
'confirm_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'content_length'=>$info['content'],
|
|
|
|
'status'
|
|
|
|
];
|
|
|
|
// FIXME 验证完成,保存数据,计算内容长度,处理内容中的资源, IP 确认时间 状态
|
|
|
|
return $data;
|
|
|
|
}
|
...
|
...
|
|