|
|
@@ -30,7 +30,7 @@ use app\api\lists\service\ServiceLists;
|
|
|
class ServiceController extends BaseApiController
|
|
|
{
|
|
|
|
|
|
- public array $notNeedLogin = ['getServiceList','getAreaList','getCateList','getServiceInfo','autoUpdateStatus','getServiceContent','getServiceDisclaimer'];
|
|
|
+ public array $notNeedLogin = ['getServiceList','getAreaList','getCateList','getServiceInfo','autoUpdateStatus','getServiceContent','getServiceDisclaimer','addScanLog'];
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -176,4 +176,21 @@ class ServiceController extends BaseApiController
|
|
|
return $this->data($result);
|
|
|
}
|
|
|
|
|
|
+ public function addScanLog(){
|
|
|
+ if($this->request->isPost()) {
|
|
|
+
|
|
|
+ $params = (new ServiceValidate())->post()->goCheck('log');
|
|
|
+ $userId = $this->userId;
|
|
|
+ $params['user_id'] = $userId;
|
|
|
+ $result = ServiceLogic::addLog($params);
|
|
|
+ if (true === $result) {
|
|
|
+
|
|
|
+ return $this->success('日志插入成功', [], 1, 1);
|
|
|
+ }
|
|
|
+ return $this->fail(ServiceLogic::getError());
|
|
|
+
|
|
|
+ }else{
|
|
|
+ return $this->fail('请求方式错误');
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|