|
...
|
...
|
@@ -54,7 +54,30 @@ class RatingLogic extends BaseLogic |
|
|
|
'data'=>json_encode($this->param['data']),
|
|
|
|
'mobile'=>$this->param['mobile'],
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
|
|
'type'=>$this->param['type']
|
|
|
|
];
|
|
|
|
return $this->scoringModel->add($param);
|
|
|
|
$this->scoringModel->add($param);
|
|
|
|
return $this->httpSore($this->param['data'],$this->project['post_id'],$this->param['type']);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :同步数据
|
|
|
|
* @name :httpSore
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/1/24 15:04
|
|
|
|
*/
|
|
|
|
public function httpSore($data,$postId,$fType){
|
|
|
|
$fType = (int)($fType + 1);
|
|
|
|
$token = md5('qqs'.$postId.$fType.date("Y-m-d"));
|
|
|
|
//$ftype 2,3,4
|
|
|
|
$str = '';
|
|
|
|
foreach ($data as $k => $v){
|
|
|
|
$str .= 'name_'.(int)($k+1).'='.$v['level'].'&';
|
|
|
|
}
|
|
|
|
$str = trim($str,'&');
|
|
|
|
$url = "http://www.quanqiusou.cn/extend_api/api/service_score.php?postid=$postId&token=$token&ftype=$fType&$str";
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($url, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
return http_get($url,['charset=utf-8']);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|