LinkDataLogic.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* @remark :
* @name :LinkDataLogic.php
* @author :lyh
* @method :post
* @time :2025/3/14 17:20
*/
namespace App\Http\Logic\Bside\SeoSetting;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\SeoSetting\LinkData;
/**
* @remark :获取外链数据
* @name :LinkDataLogic
* @author :lyh
* @method :post
* @time :2025/3/14 17:21
*/
class LinkDataLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->param = $this->requestAll;
$this->model = new LinkData();
}
/**
* @remark :保存数据
* @name :batchSave
* @author :lyh
* @method :post
* @time :2025/3/14 17:22
* @param :url->外链;da_values->da值
*/
public function batchSave(){
$data = [];
foreach ($this->param['data'] as $v){
$data[] = [
'url'=>$v['url'],
'da_values'=>$v['da_values'],
];
}
if(!empty($data)){
$this->model->insertAll($data);
}
return $this->success();
}
}